dokodemo_factory.go 463 B

12345678910111213141516
  1. package dokodemo
  2. import (
  3. "github.com/v2ray/v2ray-core/app"
  4. "github.com/v2ray/v2ray-core/proxy/common/connhandler"
  5. "github.com/v2ray/v2ray-core/proxy/internal"
  6. )
  7. func init() {
  8. if err := internal.RegisterInboundConnectionHandlerFactory("dokodemo-door", func(space app.Space, rawConfig interface{}) (connhandler.InboundConnectionHandler, error) {
  9. config := rawConfig.(Config)
  10. return NewDokodemoDoor(space, config), nil
  11. }); err != nil {
  12. panic(err)
  13. }
  14. }