mirror of
https://github.com/v2ray/v2ray-core.git
synced 2026-11-03 00:22:05 +00:00
Move connection handler interfaces to proxy/common/connhandler
This commit is contained in:
1 parent
361a22d74d
commit
f93b29993b
14 files changed
+40
-40
No files matched your search
@@ -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{
|
||||
|
||||
@@ -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{})
|
||||
}
|
||||
Reference in new issue
Block a user