Documentation ¶
Index ¶
- func DialKCP(addr string, cookie []byte) (conn net.Conn, err error)
- type E2EConn
- func (e2e *E2EConn) Close() error
- func (e2e *E2EConn) DebugInfo() [][]LinkInfo
- func (e2e *E2EConn) LocalAddr() net.Addr
- func (e2e *E2EConn) ReadFrom(p []byte) (n int, from net.Addr, err error)
- func (e2e *E2EConn) SetDeadline(t time.Time) error
- func (e2e *E2EConn) SetReadDeadline(t time.Time) error
- func (e2e *E2EConn) SetSessPath(sid SessionAddr, host net.Addr)
- func (e2e *E2EConn) SetWriteDeadline(t time.Time) error
- func (e2e *E2EConn) UnderlyingLoss(destAddr net.Addr) (frac float64)
- func (e2e *E2EConn) WriteTo(p []byte, addr net.Addr) (n int, err error)
- type KCPListener
- type LinkInfo
- type ObfsSocket
- func (os *ObfsSocket) AddCookieException(addr net.Addr, cookie []byte)
- func (os *ObfsSocket) Close() error
- func (os *ObfsSocket) LocalAddr() net.Addr
- func (os *ObfsSocket) ReadFrom(b []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 SessionAddr
- 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 E2EConn ¶ added in v0.13.0
type E2EConn struct { Closed bool // contains filtered or unexported fields }
E2EConn is a PacketConn implementing the E2E protocol.
func NewE2EConn ¶ added in v0.13.0
func NewE2EConn(wire net.PacketConn) *E2EConn
NewE2EConn creates a new e2e connection.
func (*E2EConn) SetDeadline ¶ added in v0.13.0
SetDeadline lala
func (*E2EConn) SetReadDeadline ¶ added in v0.13.0
SetReadDeadline lala
func (*E2EConn) SetSessPath ¶ added in v0.13.0
func (e2e *E2EConn) SetSessPath(sid SessionAddr, host net.Addr)
SetSessPath is used by clients to have certain sessions go along certain paths.
func (*E2EConn) SetWriteDeadline ¶ added in v0.13.0
SetWriteDeadline lala
func (*E2EConn) UnderlyingLoss ¶ added in v0.18.0
UnderlyingLoss returns the underlying loss.
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 net.PacketConn) *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.
func (*KCPListener) Close ¶ added in v0.17.0
func (l *KCPListener) Close() error
Close closes the thing.
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) AddCookieException ¶ added in v0.17.0
func (os *ObfsSocket) AddCookieException(addr net.Addr, cookie []byte)
AddCookieException adds a cookie exception to a particular destination.
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
type SessionAddr ¶ added in v0.13.0
type SessionAddr [16]byte
SessionAddr is a net.Addr that represents the ultimate counterparty in an e2e session.
func NewSessAddr ¶ added in v0.13.0
func NewSessAddr() SessionAddr
NewSessAddr generates a new random sess addr
func (SessionAddr) Network ¶ added in v0.13.0
func (sa SessionAddr) Network() string
Network fulfills net.Addr
func (SessionAddr) String ¶ added in v0.13.0
func (sa SessionAddr) String() string