move connhandler to proxy

This commit is contained in:
v2ray committed 2016-01-02 23:32:18 +01:00
1 parent 54ce82fbfa
commit 0780db7999
21 files changed
+76 -81

No files matched your search

+2 -2
View File
@@ -12,7 +12,7 @@ import (
"github.com/v2ray/v2ray-core/common/alloc"
v2net "github.com/v2ray/v2ray-core/common/net"
v2nettesting "github.com/v2ray/v2ray-core/common/net/testing"
"github.com/v2ray/v2ray-core/proxy/common/connhandler"
v2proxy "github.com/v2ray/v2ray-core/proxy"
_ "github.com/v2ray/v2ray-core/proxy/socks"
_ "github.com/v2ray/v2ray-core/proxy/socks/json"
proxytesting "github.com/v2ray/v2ray-core/proxy/testing"
@@ -49,7 +49,7 @@ func TestUDPSend(t *testing.T) {
ConnOutput: connOutput,
}
protocol, err := proxytesting.RegisterInboundConnectionHandlerCreator("mock_ich", func(space app.Space, config interface{}) (connhandler.InboundConnectionHandler, error) {
protocol, err := proxytesting.RegisterInboundConnectionHandlerCreator("mock_ich", func(space app.Space, config interface{}) (v2proxy.InboundConnectionHandler, error) {
ich.Space = space
return ich, nil
})
+2 -2
View File
@@ -2,12 +2,12 @@ package freedom
import (
"github.com/v2ray/v2ray-core/app"
"github.com/v2ray/v2ray-core/proxy/common/connhandler"
"github.com/v2ray/v2ray-core/proxy"
"github.com/v2ray/v2ray-core/proxy/internal"
)
func init() {
if err := internal.RegisterOutboundConnectionHandlerFactory("freedom", func(space app.Space, config interface{}) (connhandler.OutboundConnectionHandler, error) {
if err := internal.RegisterOutboundConnectionHandlerFactory("freedom", func(space app.Space, config interface{}) (proxy.OutboundConnectionHandler, error) {
return &FreedomConnection{space: space}, nil
}); err != nil {
panic(err)