Documentation ¶
Index ¶
- func ExchangeDNSPacket(ctx context.Context, router *Router, conn N.PacketConn, buffer *buf.Buffer, ...)
- type DNSReverseMapping
- type Router
- func (r *Router) AutoDetectInterface() bool
- func (r *Router) AutoDetectInterfaceFunc() control.Func
- func (r *Router) AutoRedirectOutputMark() uint32
- func (r *Router) ClashServer() adapter.ClashServer
- func (r *Router) Cleanup() error
- func (r *Router) ClearDNSCache()
- func (r *Router) Close() error
- func (r *Router) DefaultInterface() string
- func (r *Router) DefaultMark() uint32
- func (r *Router) DefaultOutbound(network string) (adapter.Outbound, error)
- func (r *Router) Exchange(ctx context.Context, message *mDNS.Msg) (*mDNS.Msg, error)
- func (r *Router) FakeIPStore() adapter.FakeIPStore
- func (r *Router) GeoIPReader() *geoip.Reader
- func (r *Router) Initialize(inbounds []adapter.Inbound, outbounds []adapter.Outbound, ...) error
- func (r *Router) InterfaceFinder() control.InterfaceFinder
- func (r *Router) InterfaceMonitor() tun.DefaultInterfaceMonitor
- func (r *Router) LoadGeosite(code string) (adapter.Rule, error)
- func (r *Router) Lookup(ctx context.Context, domain string, strategy dns.DomainStrategy) ([]netip.Addr, error)
- func (r *Router) LookupDefault(ctx context.Context, domain string) ([]netip.Addr, error)
- func (r *Router) NeedWIFIState() bool
- func (r *Router) NetworkMonitor() tun.NetworkUpdateMonitor
- func (r *Router) NewError(ctx context.Context, err error)
- func (r *Router) OnPackagesUpdated(packages int, sharedUsers int)
- func (r *Router) Outbound(tag string) (adapter.Outbound, bool)
- func (r *Router) Outbounds() []adapter.Outbound
- func (r *Router) PackageManager() tun.PackageManager
- func (r *Router) PostStart() error
- func (r *Router) PreMatch(metadata adapter.InboundContext) error
- func (r *Router) PreStart() error
- func (r *Router) RegisterAutoRedirectOutputMark(mark uint32) error
- func (r *Router) ResetNetwork() error
- func (r *Router) RouteConnection(ctx context.Context, conn net.Conn, metadata adapter.InboundContext) errordeprecated
- func (r *Router) RouteConnectionEx(ctx context.Context, conn net.Conn, metadata adapter.InboundContext, ...)
- func (r *Router) RoutePacketConnection(ctx context.Context, conn N.PacketConn, metadata adapter.InboundContext) error
- func (r *Router) RoutePacketConnectionEx(ctx context.Context, conn N.PacketConn, metadata adapter.InboundContext, ...)
- func (r *Router) RuleSet(tag string) (adapter.RuleSet, bool)
- func (r *Router) Rules() []adapter.Rule
- func (r *Router) SetClashServer(server adapter.ClashServer)
- func (r *Router) SetV2RayServer(server adapter.V2RayServer)
- func (r *Router) Start() error
- func (r *Router) UpdateInterfaces() error
- func (r *Router) V2RayServer() adapter.V2RayServer
- func (r *Router) WIFIState() adapter.WIFIState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExchangeDNSPacket ¶
Types ¶
type DNSReverseMapping ¶ added in v1.3.0
type DNSReverseMapping struct {
// contains filtered or unexported fields
}
func NewDNSReverseMapping ¶ added in v1.3.0
func NewDNSReverseMapping() *DNSReverseMapping
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
func NewRouter ¶
func NewRouter( ctx context.Context, logFactory log.Factory, options option.RouteOptions, dnsOptions option.DNSOptions, ntpOptions option.NTPOptions, inbounds []option.Inbound, ) (*Router, error)
func (*Router) AutoDetectInterface ¶
func (*Router) AutoDetectInterfaceFunc ¶ added in v1.2.0
func (*Router) AutoRedirectOutputMark ¶ added in v1.10.0
func (*Router) ClashServer ¶ added in v1.1.0
func (r *Router) ClashServer() adapter.ClashServer
func (*Router) ClearDNSCache ¶ added in v1.4.0
func (r *Router) ClearDNSCache()
func (*Router) DefaultInterface ¶
func (*Router) DefaultMark ¶
func (*Router) DefaultOutbound ¶
func (*Router) FakeIPStore ¶ added in v1.3.0
func (r *Router) FakeIPStore() adapter.FakeIPStore
func (*Router) GeoIPReader ¶
func (*Router) Initialize ¶
func (*Router) InterfaceFinder ¶ added in v1.1.0
func (r *Router) InterfaceFinder() control.InterfaceFinder
func (*Router) InterfaceMonitor ¶
func (r *Router) InterfaceMonitor() tun.DefaultInterfaceMonitor
func (*Router) LookupDefault ¶
func (*Router) NeedWIFIState ¶ added in v1.8.6
func (*Router) NetworkMonitor ¶
func (r *Router) NetworkMonitor() tun.NetworkUpdateMonitor
func (*Router) OnPackagesUpdated ¶ added in v1.0.1
func (*Router) PackageManager ¶ added in v1.0.1
func (r *Router) PackageManager() tun.PackageManager
func (*Router) RegisterAutoRedirectOutputMark ¶ added in v1.10.0
func (*Router) ResetNetwork ¶ added in v1.3.0
func (*Router) RouteConnection
deprecated
func (*Router) RouteConnectionEx ¶
func (r *Router) RouteConnectionEx(ctx context.Context, conn net.Conn, metadata adapter.InboundContext, onClose N.CloseHandlerFunc)
func (*Router) RoutePacketConnection ¶
func (r *Router) RoutePacketConnection(ctx context.Context, conn N.PacketConn, metadata adapter.InboundContext) error
func (*Router) RoutePacketConnectionEx ¶
func (r *Router) RoutePacketConnectionEx(ctx context.Context, conn N.PacketConn, metadata adapter.InboundContext, onClose N.CloseHandlerFunc)
func (*Router) SetClashServer ¶ added in v1.1.0
func (r *Router) SetClashServer(server adapter.ClashServer)
func (*Router) SetV2RayServer ¶ added in v1.1.0
func (r *Router) SetV2RayServer(server adapter.V2RayServer)
func (*Router) UpdateInterfaces ¶ added in v1.2.5
func (*Router) V2RayServer ¶ added in v1.1.0
func (r *Router) V2RayServer() adapter.V2RayServer
Source Files ¶
Click to show internal directories.
Click to hide internal directories.