mirror of
https://github.com/v2ray/v2ray-core.git
synced 2026-11-17 22:57:10 +00:00
simplify connection handler registration
This commit is contained in:
1 parent
350b31cad9
commit
5b1854f842
10 files changed
+59
-52
No files matched your search
@@ -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
|
||||
})
|
||||
}
|
||||
Reference in new issue
Block a user