commons

package
v1.65.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 4, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigInterfaceAddress

func ConfigInterfaceAddress(dev device.Device, addr netip.Prefix, _ int, autoRoute bool) error

func GetAutoDetectInterface

func GetAutoDetectInterface() (string, error)

func RelayDnsPacket

func RelayDnsPacket(payload []byte) ([]byte, error)

func SetTunChangeCallback

func SetTunChangeCallback(callback C.TUNChangeCallback)

func SetTunStatus

func SetTunStatus(status C.TUNState)

func ShouldHijackDns

func ShouldHijackDns(dnsHijack []C.DNSUrl, targetAddr netip.AddrPort, network string) bool

func StartDefaultInterfaceChangeMonitor

func StartDefaultInterfaceChangeMonitor()

func StopDefaultInterfaceChangeMonitor

func StopDefaultInterfaceChangeMonitor()

func UpdateWireGuardBind

func UpdateWireGuardBind()

Types

type DefaultInterface

type DefaultInterface struct {
	Name    string
	Index   int
	IP      netip.Addr
	Gateway netip.Addr
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL