Documentation ¶
Index ¶
- Constants
- func InitLogger(ctx context.Context)
- func NewStack(ctx context.Context, ep stack.LinkEndpoint, streamCreator tunnel.StreamCreator) (*stack.Stack, error)
- type Device
- type Router
- func (rt *Router) Close(ctx context.Context)
- func (rt *Router) GetRoutedSubnets() []netip.Prefix
- func (rt *Router) UpdateRoutes(ctx context.Context, pleaseProxy, dontProxy, dontProxyOverrides []netip.Prefix) error
- func (rt *Router) UpdateWhitelist(whitelist []netip.Prefix)
- func (rt *Router) ValidateRoutes(ctx context.Context, routes []netip.Prefix) error
- type TunnelingDevice
Constants ¶
View Source
const ( SIOCAIFADDR_IN6 = (unix.SIOCAIFADDR & 0xe000ffff) | (uint(unsafe.Sizeof(addrIfReq6{})) << 16) ND6_INFINITE_LIFETIME = 0xffffffff IN6_IFF_NODAD = 0x0020 IN6_IFF_SECURED = 0x0400 )
SIOCAIFADDR_IN6 is the same ioctlHandle identifier as unix.SIOCAIFADDR adjusted with size of addrIfReq6.
View Source
const SIOCDIFADDR_IN6 = (unix.SIOCDIFADDR & 0xe000ffff) | (uint(unsafe.Sizeof(addrIfReq6{})) << 16)
SIOCDIFADDR_IN6 is the same ioctlHandle identifier as unix.SIOCDIFADDR adjusted with size of addrIfReq6.
Variables ¶
This section is empty.
Functions ¶
func InitLogger ¶ added in v2.7.2
Types ¶
type Device ¶
type Device interface { Close() // Overrides stack.LinkEndpoint.Close. Must not return error. NewLinkEndpoint() (stack.LinkEndpoint, error) Index() uint32 Name() string AddSubnet(context.Context, netip.Prefix) error RemoveSubnet(context.Context, netip.Prefix) error SetDNS(context.Context, string, netip.Addr, []string) (err error) WaitForDevice() }
type Router ¶ added in v2.13.0
type Router struct {
// contains filtered or unexported fields
}
func (*Router) GetRoutedSubnets ¶ added in v2.13.0
func (*Router) UpdateRoutes ¶ added in v2.13.0
func (*Router) UpdateWhitelist ¶ added in v2.14.0
type TunnelingDevice ¶ added in v2.13.0
type TunnelingDevice struct { Device Device Router *Router // contains filtered or unexported fields }
func NewTunnelingDevice ¶ added in v2.13.0
func NewTunnelingDevice(ctx context.Context, tunnelStreamCreator tunnel.StreamCreator) (*TunnelingDevice, error)
Click to show internal directories.
Click to hide internal directories.