Documentation
¶
Index ¶
Constants ¶
View Source
const DefaultBindAddress = "127.0.0.1:1080"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BufferedConn ¶
func NewBufferedConn ¶
func NewBufferedConn(c net.Conn) *BufferedConn
func (*BufferedConn) Buffered ¶
func (c *BufferedConn) Buffered() int
func (*BufferedConn) Peek ¶
func (c *BufferedConn) Peek(n int) ([]byte, error)
Peek returns the next n bytes without advancing the reader.
func (*BufferedConn) ReadByte ¶
func (c *BufferedConn) ReadByte() (byte, error)
func (*BufferedConn) Reader ¶
func (c *BufferedConn) Reader() *bufio.Reader
Reader returns the internal bufio.Reader.
func (*BufferedConn) UnreadByte ¶
func (c *BufferedConn) UnreadByte() error
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{})
func (DefaultLogger) Info ¶
func (l DefaultLogger) Info(v ...interface{})
type Logger ¶
type Logger interface { Debug(v ...interface{}) Info(v ...interface{}) 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.