v2ray-core/proxy/freedom/freedomfactory.go

22 lines
482 B
Go
Raw Normal View History

2015-09-11 12:12:09 +00:00
package freedom
import (
"github.com/v2ray/v2ray-core"
v2net "github.com/v2ray/v2ray-core/common/net"
2015-09-11 12:12:09 +00:00
)
type FreedomFactory struct {
}
2015-09-22 16:11:55 +00:00
func (factory FreedomFactory) Initialize(config []byte) error {
return nil
}
func (factory FreedomFactory) Create(vp *core.Point, firstPacket v2net.Packet) (core.OutboundConnectionHandler, error) {
return NewFreedomConnection(firstPacket), nil
2015-09-11 12:12:09 +00:00
}
2015-09-12 18:36:21 +00:00
func init() {
core.RegisterOutboundConnectionHandlerFactory("freedom", FreedomFactory{})
}