Documentation ¶
Index ¶
- Constants
- func DefaultContext() context.Context
- func Tunnel(ctx context.Context, c1, c2 io.ReadWriteCloser, buf1, buf2 []byte) error
- type BytesPool
- type DefaultLogger
- type Logger
- type PacketForwardAddress
- type ProxyDialFunc
- type ProxyListenPacket
- type ProxyRequest
- type UserAssociateHandler
- type UserConnectHandler
Constants ¶
View Source
const DefaultBindAddress = "127.0.0.1:1080"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BytesPool ¶
BytesPool is an interface for getting and returning temporary bytes for use by io.CopyBuffer.
type DefaultLogger ¶
type DefaultLogger struct{}
func (DefaultLogger) Debug ¶
func (l DefaultLogger) Debug(v ...interface{})
func (DefaultLogger) Error ¶
func (l DefaultLogger) Error(v ...interface{})
type PacketForwardAddress ¶
type PacketForwardAddress func(ctx context.Context, destinationAddr string, packet net.PacketConn, conn net.Conn) (net.IP, int, error)
PacketForwardAddress specifies the packet forwarding address
type ProxyDialFunc ¶
ProxyDialFunc is used for socks5, socks4 and http
func DefaultProxyDial ¶
func DefaultProxyDial() ProxyDialFunc
DefaultProxyDial for ProxyDialFunc type
type ProxyListenPacket ¶
type ProxyListenPacket func(ctx context.Context, network string, address string) (net.PacketConn, error)
ProxyListenPacket specifies the optional proxyListenPacket function for establishing the transport connection.
func DefaultProxyListenPacket ¶
func DefaultProxyListenPacket() ProxyListenPacket
DefaultProxyListenPacket for ProxyListenPacket type
type ProxyRequest ¶
type UserAssociateHandler ¶
type UserAssociateHandler func(request *ProxyRequest) error
UserAssociateHandler is used for socks5
type UserConnectHandler ¶
type UserConnectHandler func(request *ProxyRequest) error
UserConnectHandler is used for socks5, socks4 and http
Click to show internal directories.
Click to hide internal directories.