tun

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TUN_NAME = "nextmn-ue-lite"
	TUN_MTU  = 1400
)

Variables

This section is empty.

Functions

This section is empty.

Types

type TunManager

type TunManager struct {
	// contains filtered or unexported fields
}

func NewTunManager

func NewTunManager() *TunManager

func (*TunManager) AddIp

func (t *TunManager) AddIp(ctx context.Context, ip netip.Addr) error

func (*TunManager) CloseTun

func (t *TunManager) CloseTun()

func (*TunManager) DelIp

func (t *TunManager) DelIp(ctx context.Context, ip netip.Addr) error

func (*TunManager) OpenTun

func (t *TunManager) OpenTun() *water.Interface

Get a tun interface. Don't forget to run CloseTun when no longer in use

func (*TunManager) Start

func (t *TunManager) Start(ctx context.Context) error

func (*TunManager) WaitShutdown

func (t *TunManager) WaitShutdown(ctx context.Context) error

Jump to

Keyboard shortcuts

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