Versions in this module Expand all Collapse all v0 v0.16.0 May 31, 2026 Changes in this version + const CGROUP_UNKNOWN + const GID_UNKNOWN + const PID_UNKNOWN + const ROUTE_MARK_UNKNOWN + const UID_UNKNOWN + type BuildOpts struct + DnsNeeded bool + Exclude []Rule + MTU int + TunAddrs []string + TunNeeded bool + TunRoutes []string + type DebugIPMatcher struct + FixedInfo NetInfo + TrueRules []Rule + func (d *DebugIPMatcher) Close() error + func (d *DebugIPMatcher) Map(rule Rule) uint64 + func (d *DebugIPMatcher) Match(pkt []byte, rule uint64) bool + func (d *DebugIPMatcher) PktInfo(pkt []byte) *NetInfo + func (d *DebugIPMatcher) UnMap(rule uint64) + func (d *DebugIPMatcher) UnMapAll() + type DebugSysBuilder struct + CgroupSupported bool + DNSIn func(dns.Interface) + DNSOut dns.Interface + FixedInfo NetInfo + IPAlloc subnet.IPAllocator + LocalNet gonnect.Network + OutNet gonnect.Network + RuleCompletions map[string][]string + SubnetAlloc subnet.SubnetAllocator + SupportedRules []RuleTypeInfo + TrueRules []Rule + Tun tun.Tun + TunFormat string + ValidTunNames []string + func NewDebugSysBuilder() *DebugSysBuilder + func (d *DebugSysBuilder) AllocIP() subnet.IPAllocator + func (d *DebugSysBuilder) AllocSubnet() subnet.SubnetAllocator + func (d *DebugSysBuilder) Build(opts BuildOpts) (*System, error) + func (d *DebugSysBuilder) Close() error + func (d *DebugSysBuilder) ConnInfo(c net.Conn) *NetInfo + func (d *DebugSysBuilder) ConnRule(c net.Conn, rule Rule) bool + func (d *DebugSysBuilder) ListRules() []RuleTypeInfo + func (d *DebugSysBuilder) RuleCompl(rule Rule) []string + func (d *DebugSysBuilder) RuleVerify(rule Rule) bool + func (d *DebugSysBuilder) TunNameFormat() string + func (d *DebugSysBuilder) TunNameVerify(name string) bool + type IPMatcher interface + Close func() error + Lock func() + Map func(rule Rule) uint64 + Match func(pkt []byte, rule uint64) bool + PktInfo func(pkt []byte) *NetInfo + UnMap func(rule uint64) + UnMapAll func() + Unlock func() + type NetInfo struct + Cgroup uint64 + GID uint64 + PID int + RouteMark int + UID uint64 + User string + type Rule struct + Rule string + Type string + type RuleTypeInfo struct + Description string + Type string + type SysBuilder interface + AllocIP func() subnet.IPAllocator + AllocSubnet func() subnet.SubnetAllocator + Build func(opts BuildOpts) (*System, error) + ConnInfo func(c net.Conn) *NetInfo + ConnRule func(c net.Conn, rule Rule) bool + ListRules func() []RuleTypeInfo + RuleCompl func(rule Rule) []string + RuleVerify func(rule Rule) bool + TunNameFormat func() string + TunNameVerify func(name string) bool + type System struct + DNSIn func(dns.Interface) + DNSOut dns.Interface + LocalNet gonnect.Network + Matcher IPMatcher + OutNet gonnect.Network + Tun tun.Tun