mirror of
https://github.com/v2ray/v2ray-core.git
synced 2026-11-03 16:24:04 +00:00
move connhandler to proxy
This commit is contained in:
1 parent
54ce82fbfa
commit
0780db7999
21 files changed
+76
-81
No files matched your search
@@ -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,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)
|
||||
|
||||
Reference in new issue
Block a user