warp

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2026 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WarpDir     = "/etc/slipgate/warp"
	WarpConf    = "/etc/slipgate/warp/wg0.conf"
	AccountFile = "/etc/slipgate/warp/wgcf-account.toml"
	ProfileFile = "/etc/slipgate/warp/wgcf-profile.conf"
	WgcfBin     = "/usr/local/bin/wgcf"
	ServiceName = "slipgate-warp"
	RouteTable  = 200

	// SocksUser is a dedicated system user for the SOCKS5 proxy so its
	// outbound traffic can be routed through WARP independently of the
	// tunnel processes that also run as config.SystemUser.
	SocksUser = "slipgate-socks"

	// NaiveUser is a dedicated system user for the Caddy/NaiveProxy
	// process so its forward-proxy traffic can be routed through WARP.
	NaiveUser = "slipgate-naive"
)

Variables

This section is empty.

Functions

func Disable

func Disable() error

Disable stops the WARP WireGuard interface.

func Enable

func Enable() error

Enable starts the WARP WireGuard interface.

func IsRunning

func IsRunning() bool

IsRunning checks if the WARP interface is active.

func IsSetUp

func IsSetUp() bool

IsSetUp checks if WARP has been configured.

func RefreshRouting

func RefreshRouting(cfg *config.Config) error

RefreshRouting regenerates the wg0.conf with current user UIDs and restarts if running.

func RemoveUsers

func RemoveUsers()

RemoveUsers removes the dedicated SOCKS and NaiveProxy system users created for WARP routing.

func Setup

func Setup(cfg *config.Config, log func(string)) error

Setup registers a WARP account, generates WireGuard config, and creates the systemd service.

func Uninstall

func Uninstall()

Uninstall removes all WARP configuration, services, and the wgcf binary.

Types

This section is empty.

Jump to

Keyboard shortcuts

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