tunset

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2025 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Tun6FollowsDefaultNIC

type Tun6FollowsDefaultNIC struct {
	sync.Mutex
	DefaultNICMon i.DefaultInterfaceInfo
	// whether current tun support ipv6
	TunSupport6 bool
	TunSetter   TunSetter
	// contains filtered or unexported fields
}

make sure tun ipv6 follows default nic ipv6, i.e., when default nic has global ipv6, tun should also support ipv6(a default route, have ipv6 address and dns server)

func NewTun6FollowsDefaultNIC

func NewTun6FollowsDefaultNIC(defaultNICMon i.DefaultInterfaceInfo, tunSupport6 bool, tunSetter TunSetter) *Tun6FollowsDefaultNIC

func (*Tun6FollowsDefaultNIC) Close

func (t *Tun6FollowsDefaultNIC) Close() error

func (*Tun6FollowsDefaultNIC) OnDefaultInterfaceChanged

func (t *Tun6FollowsDefaultNIC) OnDefaultInterfaceChanged()

func (*Tun6FollowsDefaultNIC) Start

func (t *Tun6FollowsDefaultNIC) Start() error

type TunSetter

type TunSetter interface {
	SetTunSupport6(support6 bool) error
}

Jump to

Keyboard shortcuts

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