Documentation ¶
Index ¶
- Constants
- Variables
- func CopyLink(dst, src io.ReadWriteCloser)
- func CoreCopy(dst io.Writer, src io.Reader) (written int64, err error)
- func Dial(contexts []ConnLayerContext) (c net.Conn, err error)
- func NewListener(contexts []ConnLayerContext) (l net.Listener, err error)
- type ConnDialer
- type ConnLayer
- type ConnLayerContext
- type ConnListener
- type TransProtocol
Constants ¶
View Source
const ( STREAM_LAYER = ConnLayer(1) OBS_LAYER = ConnLayer(2) CRYPT_LAYER = ConnLayer(3) AUTH_LAYER = ConnLayer(4) APPCATIOIN_LAYER = ConnLayer(5) )
View Source
const ( PROTO_TCP = TransProtocol("tcp") PROTO_KCP = TransProtocol("kcp") PROTO_OBFS4 = TransProtocol("obfs4") )
Variables ¶
View Source
var ( ErrInvalidArgs = errors.New("Invalid arguments.") ErrInvalidCtx = errors.New("Invalid context") )
Functions ¶
func CopyLink ¶
func CopyLink(dst, src io.ReadWriteCloser)
func NewListener ¶
func NewListener(contexts []ConnLayerContext) (l net.Listener, err error)
Types ¶
type ConnLayerContext ¶
type ConnLayerContext interface { Layer() ConnLayer ConnDialer ConnListener }
type TransProtocol ¶
type TransProtocol string
func (*TransProtocol) UnmarshalTOML ¶
func (self *TransProtocol) UnmarshalTOML(data []byte) (err error)
Click to show internal directories.
Click to hide internal directories.