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

+3 -3
View File
@@ -2,19 +2,19 @@ package socks
import (
"github.com/v2ray/v2ray-core/app"
"github.com/v2ray/v2ray-core/proxy"
"github.com/v2ray/v2ray-core/proxy/common/connhandler"
"github.com/v2ray/v2ray-core/proxy/socks/config/json"
)
type SocksServerFactory struct {
}
func (factory SocksServerFactory) Create(dispatcher app.PacketDispatcher, rawConfig interface{}) (proxy.InboundConnectionHandler, error) {
func (factory SocksServerFactory) Create(dispatcher app.PacketDispatcher, rawConfig interface{}) (connhandler.InboundConnectionHandler, error) {
config := rawConfig.(*json.SocksConfig)
config.Initialize()
return NewSocksServer(dispatcher, config), nil
}
func init() {
proxy.RegisterInboundConnectionHandlerFactory("socks", SocksServerFactory{})
connhandler.RegisterInboundConnectionHandlerFactory("socks", SocksServerFactory{})
}