router

package
v1.6.4 Latest Latest
Warning

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

Go to latest
Published: May 2, 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. The DNS router forwards port 53 traffic to internal tunnel ports.

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 (stops others, starts the selected one).

func SwitchMode

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

SwitchMode is kept for backward compatibility but all tunnels now use the DNS router. Restarting services ensures they bind to internal ports.

Types

This section is empty.

Jump to

Keyboard shortcuts

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