router

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2026 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddTunnel

func AddTunnel(cfg *config.Config, tunnel *config.TunnelConfig) error

AddTunnel registers a tunnel with the routing layer. DNS tunnels always use internal ports (5310+), so the DNS router must be running to forward port 53 traffic regardless of single or multi mode. If the router is already running, it is restarted to pick up new config.

func AllocatePort

func AllocatePort(cfg *config.Config) int

AllocatePort assigns the next available port for a DNS tunnel.

func RemoveTunnel

func RemoveTunnel(cfg *config.Config, tag string) error

RemoveTunnel unregisters a tunnel from routing. Restarts the router to drop the removed tunnel's route.

func ServiceName

func ServiceName(tag string) string

ServiceName returns the systemd service name for a tunnel.

func SwitchActive

func SwitchActive(cfg *config.Config, tag string) error

SwitchActive changes the active tunnel in single mode.

func SwitchMode

func SwitchMode(cfg *config.Config, newMode string) error

SwitchMode transitions between single and multi mode.

Types

This section is empty.

Jump to

Keyboard shortcuts

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