move const to const file

This commit is contained in:
Callan Bryant 2020-02-27 23:09:18 +00:00
parent 32c5b1c037
commit 736c490ab5
No known key found for this signature in database
GPG Key ID: C31FA9DF3ACBFFAA
2 changed files with 11 additions and 7 deletions

View File

@ -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;
)

View File

@ -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