socksfactory.go 356 B

1234567891011121314
  1. package socks
  2. import (
  3. "github.com/v2ray/v2ray-core/app"
  4. "github.com/v2ray/v2ray-core/proxy"
  5. "github.com/v2ray/v2ray-core/proxy/internal"
  6. )
  7. func init() {
  8. internal.MustRegisterInboundHandlerCreator("socks",
  9. func(space app.Space, rawConfig interface{}) (proxy.InboundHandler, error) {
  10. return NewSocksServer(space, rawConfig.(*Config)), nil
  11. })
  12. }