socksfactory.go 343 B

12345678910111213141516
  1. package socks
  2. import (
  3. "github.com/v2ray/v2ray-core"
  4. )
  5. type SocksServerFactory struct {
  6. }
  7. func (factory SocksServerFactory) Create(vp *core.Point, config []byte) (core.InboundConnectionHandler, error) {
  8. return NewSocksServer(vp, config), nil
  9. }
  10. func init() {
  11. core.RegisterInboundConnectionHandlerFactory("socks", SocksServerFactory{})
  12. }