freedomfactory.go 421 B

1234567891011121314151617
  1. package freedom
  2. import (
  3. "github.com/v2ray/v2ray-core/app"
  4. "github.com/v2ray/v2ray-core/proxy/common/connhandler"
  5. )
  6. type FreedomFactory struct {
  7. }
  8. func (this FreedomFactory) Create(space *app.Space, config interface{}) (connhandler.OutboundConnectionHandler, error) {
  9. return &FreedomConnection{space: space}, nil
  10. }
  11. func init() {
  12. connhandler.RegisterOutboundConnectionHandlerFactory("freedom", FreedomFactory{})
  13. }