dokodemo_factory.go 472 B

123456789101112131415161718
  1. package dokodemo
  2. import (
  3. "github.com/v2ray/v2ray-core/app"
  4. "github.com/v2ray/v2ray-core/proxy/common/connhandler"
  5. )
  6. type DokodemoDoorFactory struct {
  7. }
  8. func (this DokodemoDoorFactory) Create(space *app.Space, rawConfig interface{}) (connhandler.InboundConnectionHandler, error) {
  9. config := rawConfig.(Config)
  10. return NewDokodemoDoor(space, config), nil
  11. }
  12. func init() {
  13. connhandler.RegisterInboundConnectionHandlerFactory("dokodemo-door", DokodemoDoorFactory{})
  14. }