freedomfactory.go 410 B

1234567891011121314151617
  1. package freedom
  2. import (
  3. "github.com/v2ray/v2ray-core"
  4. v2net "github.com/v2ray/v2ray-core/common/net"
  5. )
  6. type FreedomFactory struct {
  7. }
  8. func (factory FreedomFactory) Create(vp *core.Point, config []byte, dest *v2net.Destination) (core.OutboundConnectionHandler, error) {
  9. return NewFreedomConnection(dest), nil
  10. }
  11. func init() {
  12. core.RegisterOutboundConnectionHandlerFactory("freedom", FreedomFactory{})
  13. }