mirror of
https://github.com/v2ray/v2ray-core.git
synced 2026-11-17 22:57:10 +00:00
Cleanup root directory
This commit is contained in:
1 parent
1b80a1a85a
commit
890d185979
17 files changed
+152
-103
No files matched your search
@@ -1,19 +1,20 @@
|
||||
package socks
|
||||
|
||||
import (
|
||||
"github.com/v2ray/v2ray-core"
|
||||
"github.com/v2ray/v2ray-core/app"
|
||||
"github.com/v2ray/v2ray-core/proxy"
|
||||
"github.com/v2ray/v2ray-core/proxy/socks/config/json"
|
||||
)
|
||||
|
||||
type SocksServerFactory struct {
|
||||
}
|
||||
|
||||
func (factory SocksServerFactory) Create(vp *core.Point, rawConfig interface{}) (core.InboundConnectionHandler, error) {
|
||||
func (factory SocksServerFactory) Create(dispatcher app.PacketDispatcher, rawConfig interface{}) (proxy.InboundConnectionHandler, error) {
|
||||
config := rawConfig.(*json.SocksConfig)
|
||||
config.Initialize()
|
||||
return NewSocksServer(vp, config), nil
|
||||
return NewSocksServer(dispatcher, config), nil
|
||||
}
|
||||
|
||||
func init() {
|
||||
core.RegisterInboundConnectionHandlerFactory("socks", SocksServerFactory{})
|
||||
proxy.RegisterInboundConnectionHandlerFactory("socks", SocksServerFactory{})
|
||||
}
|
||||
Reference in new issue
Block a user