1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2026-06-07 11:39:11 -04:00

Move connection handler interfaces to proxy/common/connhandler

This commit is contained in:
V2Ray
2015-10-30 00:11:29 +01:00
parent 361a22d74d
commit f93b29993b
14 changed files with 40 additions and 40 deletions

View File

@@ -5,15 +5,15 @@ import (
v2net "github.com/v2ray/v2ray-core/common/net"
"github.com/v2ray/v2ray-core/common/retry"
"github.com/v2ray/v2ray-core/config"
"github.com/v2ray/v2ray-core/proxy"
"github.com/v2ray/v2ray-core/proxy/common/connhandler"
"github.com/v2ray/v2ray-core/transport/ray"
)
// Point is an single server in V2Ray system.
type Point struct {
port uint16
ich proxy.InboundConnectionHandler
och proxy.OutboundConnectionHandler
ich connhandler.InboundConnectionHandler
och connhandler.OutboundConnectionHandler
}
// NewPoint returns a new Point server based on given configuration.
@@ -22,7 +22,7 @@ func NewPoint(pConfig config.PointConfig) (*Point, error) {
var vpoint = new(Point)
vpoint.port = pConfig.Port()
ichFactory := proxy.GetInboundConnectionHandlerFactory(pConfig.InboundConfig().Protocol())
ichFactory := connhandler.GetInboundConnectionHandlerFactory(pConfig.InboundConfig().Protocol())
if ichFactory == nil {
log.Error("Unknown inbound connection handler factory %s", pConfig.InboundConfig().Protocol())
return nil, config.BadConfiguration
@@ -35,7 +35,7 @@ func NewPoint(pConfig config.PointConfig) (*Point, error) {
}
vpoint.ich = ich
ochFactory := proxy.GetOutboundConnectionHandlerFactory(pConfig.OutboundConfig().Protocol())
ochFactory := connhandler.GetOutboundConnectionHandlerFactory(pConfig.OutboundConfig().Protocol())
if ochFactory == nil {
log.Error("Unknown outbound connection handler factory %s", pConfig.OutboundConfig().Protocol())
return nil, config.BadConfiguration