Versions in this module Expand all Collapse all v0 v0.2.0 May 10, 2024 v0.1.0 Aug 26, 2023 Changes in this version + const AtypDomainName + const AtypIPv4 + const AtypIPv6 + const DefaultTCPTimeout + const DefaultUDPTimeout + const HTTP + const HTTPCONNECT + const Name + const REDIR + const SOCKS4 + const SOCKS5 + const TCP + const TPROXY + const UDP + var BuildTime = "unknown time" + var DNSModeMapping = map[string]DNSMode + var Path = func() *path { ... }() + var Version = "unknown version" + func SetConfig(file string) + func SetHomeDir(root string) + type AdapterType int + const Direct + const Fallback + const Http + const LoadBalance + const Reject + const Relay + const Selector + const Shadowsocks + const ShadowsocksR + const Snell + const Socks5 + const Trojan + const URLTest + const Vmess + func (at AdapterType) String() string + type Chain []string + func (c Chain) Last() string + func (c Chain) String() string + type Conn interface + type ConnContext interface + Conn func() net.Conn + Metadata func() *Metadata + type Connection interface + AppendToChains func(adapter ProxyAdapter) + Chains func() Chain + type DNSMode int + const DNSFakeIP + const DNSMapping + const DNSNormal + func (e *DNSMode) UnmarshalJSON(data []byte) error + func (e *DNSMode) UnmarshalYAML(unmarshal func(interface{}) error) error + func (e DNSMode) MarshalJSON() ([]byte, error) + func (e DNSMode) MarshalYAML() (interface{}, error) + func (e DNSMode) String() string + type DelayHistory struct + Delay uint16 + Time time.Time + type Listener interface + Address func() string + Close func() error + RawAddress func() string + type Metadata struct + AddrType int + DNSMode DNSMode + DstIP net.IP + DstPort string + Host string + NetWork NetWork + SrcIP net.IP + SrcPort string + Type Type + func (m *Metadata) Pure() *Metadata + func (m *Metadata) RemoteAddress() string + func (m *Metadata) Resolved() bool + func (m *Metadata) SourceAddress() string + func (m *Metadata) String() string + func (m *Metadata) UDPAddr() *net.UDPAddr + func (m *Metadata) Valid() bool + type NetWork int + func (n NetWork) MarshalJSON() ([]byte, error) + func (n NetWork) String() string + type PacketConn interface + type PacketConnContext interface + Metadata func() *Metadata + PacketConn func() net.PacketConn + type PlainContext interface + ID func() uuid.UUID + type Proxy interface + Alive func() bool + DelayHistory func() []DelayHistory + Dial func(metadata *Metadata) (Conn, error) + DialUDP func(metadata *Metadata) (PacketConn, error) + LastDelay func() uint16 + URLTest func(ctx context.Context, url string) (uint16, error) + type ProxyAdapter interface + Addr func() string + DialContext func(ctx context.Context, metadata *Metadata, opts ...dialer.Option) (Conn, error) + ListenPacketContext func(ctx context.Context, metadata *Metadata, opts ...dialer.Option) (PacketConn, error) + MarshalJSON func() ([]byte, error) + Name func() string + StreamConn func(c net.Conn, metadata *Metadata) (net.Conn, error) + SupportUDP func() bool + Type func() AdapterType + Unwrap func(metadata *Metadata) Proxy + type Rule interface + Adapter func() string + Match func(metadata *Metadata) bool + Payload func() string + RuleType func() RuleType + ShouldResolveIP func() bool + type RuleType int + const Domain + const DomainKeyword + const DomainSuffix + const DstPort + const GEOIP + const IPCIDR + const MATCH + const Process + const SrcIPCIDR + const SrcPort + func (rt RuleType) String() string + type Type int + func (t Type) MarshalJSON() ([]byte, error) + func (t Type) String() string + type UDPPacket interface + Data func() []byte + Drop func() + LocalAddr func() net.Addr + WriteBack func(b []byte, addr net.Addr) (n int, err error)