Documentation
¶
Index ¶
- func AddTunnel(cfg *config.Config, tunnel *config.TunnelConfig) error
- func AllocatePort(cfg *config.Config) int
- func RemoveTunnel(cfg *config.Config, tag string) error
- func ServiceName(tag string) string
- func SwitchActive(cfg *config.Config, tag string) error
- func SwitchMode(cfg *config.Config, newMode string) error
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 ¶
AllocatePort assigns the next available port for a DNS tunnel.
func RemoveTunnel ¶
RemoveTunnel unregisters a tunnel from routing. Restarts the router to drop the removed tunnel's route.
func ServiceName ¶
ServiceName returns the systemd service name for a tunnel.
func SwitchActive ¶
SwitchActive changes the active tunnel in single mode.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.