MCPcopy Create free account
hub / github.com/SagerNet/sing-tun / System

Struct System

stack_system.go:25–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23var ErrIncludeAllNetworks = E.New("`system` and `mixed` stack are not available when `includeAllNetworks` is enabled. See https://github.com/SagerNet/sing-tun/issues/25")
24
25type System struct {
26 ctx context.Context
27 tun Tun
28 tunName string
29 mtu int
30 handler Handler
31 logger logger.Logger
32 inet4Prefixes []netip.Prefix
33 inet6Prefixes []netip.Prefix
34 inet4Address netip.Addr
35 inet4NextAddress netip.Addr
36 inet6Address netip.Addr
37 inet6NextAddress netip.Addr
38 broadcastAddr netip.Addr
39 inet4LoopbackAddress []netip.Addr
40 inet6LoopbackAddress []netip.Addr
41 udpTimeout time.Duration
42 icmpTimeout time.Duration
43 tcpListener net.Listener
44 tcpListener6 net.Listener
45 tcpPort uint16
46 tcpPort6 uint16
47 tcpNat *TCPNat
48 udpNat *udpnat.Service
49 directNat *DirectRouteMapping
50 bindInterface bool
51 interfaceFinder control.InterfaceFinder
52 frontHeadroom int
53 txChecksumOffload bool
54 multiPendingPackets bool
55}
56
57type Session struct {
58 SourceAddress netip.Addr

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected