Versions in this module Expand all Collapse all v1 v1.26.2 Mar 31, 2026 v1.26.1 Mar 24, 2026 v1.26.0 Mar 18, 2026 v1.25.5 Mar 11, 2026 v1.25.4 Jan 27, 2026 Changes in this version + var ResolverPublic = struct{ ... } + type ResolverPublicConfig struct + Dns string + Doh string + Dot string v1.25.3 Oct 8, 2025 v1.25.2 Sep 2, 2025 v1.25.1 Sep 1, 2025 Changes in this version + var Conf = struct{ ... } + var Expv = struct{ ... } + func Dial(network string, address string) (net.Conn, error) + func Gravity(conn io.ReadWriteCloser, k []byte) io.ReadWriteCloser + func GravityReader(r io.Reader, k []byte) io.Reader + func GravityWriter(w io.Writer, k []byte) io.Writer + func Link(a, b io.ReadWriteCloser) + func LoadApnic() map[string][]*net.IPNet + func LoadReservedIP() []*net.IPNet + func NewExpvarPercent(name string, n string, d string) expvar.Func + func OpenFile(name string) (io.ReadCloser, error) + func ResolverAny(addr string) *net.Resolver + func ResolverDns(addr string) *net.Resolver + func ResolverDoh(addr string) *net.Resolver + func ResolverDot(addr string) *net.Resolver + func Salt(s string) []byte + func SizeParser(s string) uint64 + type Aimbot struct + Locale Dialer + Remote Dialer + Router Router + func NewAimbot(client Dialer, option *AimbotOption) *Aimbot + func (s *Aimbot) Dial(ctx *Context, network string, address string) (io.ReadWriteCloser, error) + type AimbotOption struct + Cidr string + Rule string + Type string + type Context struct + Cid uint32 + type Dialer interface + Dial func(ctx *Context, network string, address string) (io.ReadWriteCloser, error) + type Direct struct + func (d *Direct) Dial(ctx *Context, network string, address string) (io.ReadWriteCloser, error) + type ExpvarAverage struct + F *expvar.Float + L float64 + func NewExpvarAverage(name string, length int) *ExpvarAverage + func (e *ExpvarAverage) Add(value float64) + type Locale struct + Closer io.Closer + Dialer Dialer + Limits *rate.Limits + Listen string + func NewLocale(listen string, dialer Dialer) *Locale + func (l *Locale) Close() error + func (l *Locale) Run() error + func (l *Locale) Serve(ctx *Context, cli io.ReadWriteCloser) error + func (l *Locale) ServeProxy(ctx *Context, cli io.ReadWriteCloser) error + func (l *Locale) ServeSocks4(ctx *Context, cli io.ReadWriteCloser) error + func (l *Locale) ServeSocks5(ctx *Context, cli io.ReadWriteCloser) error + func (l *Locale) ServeSocks5TCP(ctx *Context, cli io.ReadWriteCloser, dst string) error + func (l *Locale) ServeSocks5UDP(ctx *Context, cli io.ReadWriteCloser) error + func (l *Locale) ServeSocks5UDPRead(srv io.Reader, bnd *net.UDPConn, app *net.UDPAddr, pre []byte) error + type PrettyReader struct + E uint64 + F uint64 + R io.Reader + func (r *PrettyReader) Read(p []byte) (int, error) + type RandomReader struct + func (r *RandomReader) Read(p []byte) (int, error) + type RateConn struct + Conn io.ReadWriteCloser + Rate *rate.Limits + func (r *RateConn) Close() error + func (r *RateConn) Read(p []byte) (int, error) + func (r *RateConn) Write(p []byte) (int, error) + type ReadWriteCloser struct + type Road uint32 + const RoadFucked + const RoadLocale + const RoadPuzzle + const RoadRemote + func (r Road) String() string + type Router interface + Road func(ctx *Context, host string) Road + type RouterCache struct + Lru *lru.Lru[string, Road] + Raw Router + func NewRouterCache(r Router) *RouterCache + func (r *RouterCache) Road(ctx *Context, host string) Road + type RouterChain struct + L []Router + func NewRouterChain(router ...Router) *RouterChain + func (r *RouterChain) Road(ctx *Context, host string) Road + type RouterIPNet struct + B []*net.IPNet + L []*net.IPNet + R []*net.IPNet + func NewRouterIPNet() *RouterIPNet + func (r *RouterIPNet) FromFile(name string) + func (r *RouterIPNet) Road(ctx *Context, host string) Road + type RouterRight struct + R Road + func NewRouterRight(road Road) *RouterRight + func (r *RouterRight) Road(ctx *Context, host string) Road + type RouterRules struct + B []string + L []string + R []string + func NewRouterRules() *RouterRules + func (r *RouterRules) FromFile(name string) + func (r *RouterRules) Road(ctx *Context, host string) Road + type Tester struct + Closer io.Closer + Listen string + func NewTester(listen string) *Tester + func (t *Tester) Close() error + func (t *Tester) TCP() error + func (t *Tester) TCPServe(cli io.ReadWriteCloser) + func (t *Tester) UDP() error + func (t *Tester) UDPServe(cli *net.UDPConn) error + type WireConn struct + Call func(b []byte) ([]byte, error) + Data *bytes.Buffer + func (c *WireConn) Close() error + func (c *WireConn) LocalAddr() net.Addr + func (c *WireConn) Read(b []byte) (n int, err error) + func (c *WireConn) RemoteAddr() net.Addr + func (c *WireConn) SetDeadline(t time.Time) error + func (c *WireConn) SetReadDeadline(t time.Time) error + func (c *WireConn) SetWriteDeadline(t time.Time) error + func (c *WireConn) Write(b []byte) (n int, err error)