simplify connection handler registration

This commit is contained in:
v2ray committed 2016-01-06 16:23:54 +01:00
1 parent 350b31cad9
commit 5b1854f842
10 files changed
+59 -52

No files matched your search

+4 -5
View File
@@ -7,9 +7,8 @@ import (
)
func init() {
if err := internal.RegisterInboundConnectionHandlerFactory("socks", func(space app.Space, rawConfig interface{}) (proxy.InboundConnectionHandler, error) {
return NewSocksServer(space, rawConfig.(Config)), nil
}); err != nil {
panic(err)
}
internal.MustRegisterInboundConnectionHandlerCreator("socks",
func(space app.Space, rawConfig interface{}) (proxy.InboundConnectionHandler, error) {
return NewSocksServer(space, rawConfig.(Config)), nil
})
}