freedomfactory.go 426 B

123456789101112131415
  1. package freedom
  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.RegisterOutboundConnectionHandlerFactory("freedom", func(space app.Space, config interface{}) (connhandler.OutboundConnectionHandler, error) {
  9. return &FreedomConnection{space: space}, nil
  10. }); err != nil {
  11. panic(err)
  12. }
  13. }