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