diff --git a/const.go b/const.go index fce7b31..21bf8b1 100644 --- a/const.go +++ b/const.go @@ -1,10 +1,19 @@ package dsnet const ( + // could be overridden in future via env + CONFIG_FILE = "/etc/dsnet-config.json" + // these end up in the config file DEFAULT_INTERFACE_NAME = "dsnet" DEFAULT_REPORT_FILE = "/var/lib/dsnet-report.json" - // could be overridden in future via env - CONFIG_FILE = "/etc/dsnet-config.json" + // keepalive always configured for everything + KEEPALIVE_SECONDS = 21; + + // when is a peer considered gone forever? (could remove) + EXPIRY_DAYS = 28; + + LISTEN_PORT = 51820; + ) diff --git a/types.go b/types.go index e108568..d30a875 100644 --- a/types.go +++ b/types.go @@ -5,11 +5,6 @@ import ( "golang.zx2c4.com/wireguard/wgctrl/wgtypes" ) -// keepalive for everything -const KeepaliveSeconds = 21; -const ExpiryDays = 28; -const DefaultListenPort = 51820; - // see https://github.com/WireGuard/wgctrl-go/blob/master/wgtypes/types.go for definitions type PeerConfig struct { // username of person running this host/router