Versions in this module Expand all Collapse all v0 v0.1.0 Mar 10, 2025 Changes in this version + var ErrNotSupported = errors.New("not supported") + var TCPBufSize = 32 << 10 + var UDPBufSize = 2 << 10 + func AddUsage(name, usage string) + func Copy(dst io.Writer, src io.Reader) (written int64, err error) + func CopyBuffer(dst io.Writer, src io.Reader) (written int64, err error) + func CopyN(dst io.Writer, src io.Reader, n int64) (written int64, err error) + func CopyUDP(dst net.PacketConn, writeTo net.Addr, src net.PacketConn, ...) error + func DialerSchemes() string + func RegisterDialer(name string, c DialerCreator) + func RegisterServer(name string, c ServerCreator) + func Relay(left, right net.Conn) error + func ServerSchemes() string + func Usage(name string) string + type Conn struct + func NewConn(c net.Conn) *Conn + func (c *Conn) Close() error + func (c *Conn) Peek(n int) ([]byte, error) + func (c *Conn) Read(p []byte) (int, error) + func (c *Conn) Reader() *bufio.Reader + func (c *Conn) WriteTo(w io.Writer) (n int64, err error) + type Dialer interface + func DialerFromURL(s string, dialer Dialer) (Dialer, error) + func NewDirectDialer(s string, d Dialer) (Dialer, error) + type DialerCreator func(s string, dialer Dialer) (Dialer, error) + type Direct struct + func NewDirect(intface string, dialTimeout, relayTimeout time.Duration) (*Direct, error) + func (d *Direct) Addr() string + func (d *Direct) Dial(network, addr string) (c net.Conn, err error) + func (d *Direct) DialUDP(network, addr string) (net.PacketConn, error) + func (d *Direct) IFaceIPs() (ips []net.IP) + type PacketServer interface + ServePacket func(pc net.PacketConn) + type Proxy interface + Dial func(network, addr string) (c net.Conn, dialer Dialer, err error) + DialUDP func(network, addr string) (pc net.PacketConn, dialer UDPDialer, err error) + NextDialer func(dstAddr string) Dialer + Record func(dialer Dialer, success bool) + type Server interface + ListenAndServe func() + Serve func(c net.Conn) + func ServerFromURL(s string, proxy Proxy) (Server, error) + type ServerCreator func(s string, proxy Proxy) (Server, error) + type TCPDialer interface + Addr func() string + Dial func(network, addr string) (c net.Conn, err error) + type UDPDialer interface + Addr func() string + DialUDP func(network, addr string) (pc net.PacketConn, err error)