Move connection handler interfaces to proxy/common/connhandler

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

No files matched your search

+2 -2
View File
@@ -11,7 +11,7 @@ import (
"github.com/v2ray/v2ray-core/app/point"
"github.com/v2ray/v2ray-core/common/alloc"
v2net "github.com/v2ray/v2ray-core/common/net"
v2proxy "github.com/v2ray/v2ray-core/proxy"
"github.com/v2ray/v2ray-core/proxy/common/connhandler"
_ "github.com/v2ray/v2ray-core/proxy/socks"
"github.com/v2ray/v2ray-core/proxy/socks/config/json"
"github.com/v2ray/v2ray-core/testing/mocks"
@@ -43,7 +43,7 @@ func TestUDPSend(t *testing.T) {
DataReturned: bytes.NewBuffer(make([]byte, 0, 1024)),
}
v2proxy.RegisterInboundConnectionHandlerFactory("mock_ich", ich)
connhandler.RegisterInboundConnectionHandlerFactory("mock_ich", ich)
pointPort := uint16(38724)
config := mocks.Config{
+3 -3
View File
@@ -1,16 +1,16 @@
package freedom
import (
"github.com/v2ray/v2ray-core/proxy"
"github.com/v2ray/v2ray-core/proxy/common/connhandler"
)
type FreedomFactory struct {
}
func (factory FreedomFactory) Create(config interface{}) (proxy.OutboundConnectionHandler, error) {
func (factory FreedomFactory) Create(config interface{}) (connhandler.OutboundConnectionHandler, error) {
return NewFreedomConnection(), nil
}
func init() {
proxy.RegisterOutboundConnectionHandlerFactory("freedom", FreedomFactory{})
connhandler.RegisterOutboundConnectionHandlerFactory("freedom", FreedomFactory{})
}