Documentation ¶
Index ¶
- func DialKCP(addr string, cookie []byte) (conn net.Conn, err error)
- type KCPListener
- type ObfsSocket
- func (os *ObfsSocket) Close() error
- func (os *ObfsSocket) LocalAddr() net.Addr
- func (os *ObfsSocket) ReadFrom(p []byte) (n int, addr net.Addr, err error)
- func (os *ObfsSocket) SetDeadline(t time.Time) error
- func (os *ObfsSocket) SetReadDeadline(t time.Time) error
- func (os *ObfsSocket) SetWriteDeadline(t time.Time) error
- func (os *ObfsSocket) WriteTo(b []byte, addr net.Addr) (int, error)
- type ObfsStream
- func (os *ObfsStream) Close() error
- func (os *ObfsStream) LocalAddr() net.Addr
- func (os *ObfsStream) Read(p []byte) (n int, err error)
- func (os *ObfsStream) RemoteAddr() net.Addr
- func (os *ObfsStream) SetDeadline(t time.Time) error
- func (os *ObfsStream) SetReadDeadline(t time.Time) error
- func (os *ObfsStream) SetWriteDeadline(t time.Time) error
- func (os *ObfsStream) Write(p []byte) (n int, err error)
- type Wrapper
- func (w *Wrapper) Close() error
- func (w *Wrapper) LocalAddr() net.Addr
- func (w *Wrapper) ReadFrom(p []byte) (n int, addr net.Addr, err error)
- func (w *Wrapper) SetDeadline(t time.Time) error
- func (w *Wrapper) SetReadDeadline(t time.Time) error
- func (w *Wrapper) SetWriteDeadline(t time.Time) error
- func (w *Wrapper) WriteTo(b []byte, addr net.Addr) (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type KCPListener ¶ added in v0.12.0
type KCPListener struct {
// contains filtered or unexported fields
}
KCPListener operates KCP over obfs. Standard caveats about KCP not having proper open and close signaling apply.
func ListenKCP ¶ added in v0.12.0
func ListenKCP(sock *ObfsSocket) *KCPListener
ListenKCP creates a new listener.
func (*KCPListener) Accept ¶ added in v0.12.0
func (l *KCPListener) Accept() (c *kcp.UDPSession, err error)
Accept accepts a new connection.
type ObfsSocket ¶
type ObfsSocket struct {
// contains filtered or unexported fields
}
ObfsSocket represents an obfuscated PacketConn.
func ObfsListen ¶
func ObfsListen(cookie []byte, wire net.PacketConn) *ObfsSocket
ObfsListen opens a new obfuscated PacketConn.
func (*ObfsSocket) Close ¶
func (os *ObfsSocket) Close() error
func (*ObfsSocket) LocalAddr ¶
func (os *ObfsSocket) LocalAddr() net.Addr
func (*ObfsSocket) SetDeadline ¶
func (os *ObfsSocket) SetDeadline(t time.Time) error
func (*ObfsSocket) SetReadDeadline ¶
func (os *ObfsSocket) SetReadDeadline(t time.Time) error
func (*ObfsSocket) SetWriteDeadline ¶
func (os *ObfsSocket) SetWriteDeadline(t time.Time) error
type ObfsStream ¶ added in v0.12.0
type ObfsStream struct {
// contains filtered or unexported fields
}
func NewObfsStream ¶ added in v0.12.0
func NewObfsStream(wire net.Conn, key []byte, isServ bool) *ObfsStream
func (*ObfsStream) Close ¶ added in v0.12.0
func (os *ObfsStream) Close() error
func (*ObfsStream) LocalAddr ¶ added in v0.12.0
func (os *ObfsStream) LocalAddr() net.Addr
func (*ObfsStream) RemoteAddr ¶ added in v0.12.0
func (os *ObfsStream) RemoteAddr() net.Addr
func (*ObfsStream) SetDeadline ¶ added in v0.12.0
func (os *ObfsStream) SetDeadline(t time.Time) error
func (*ObfsStream) SetReadDeadline ¶ added in v0.12.0
func (os *ObfsStream) SetReadDeadline(t time.Time) error
func (*ObfsStream) SetWriteDeadline ¶ added in v0.12.0
func (os *ObfsStream) SetWriteDeadline(t time.Time) error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.