move const to const file
This commit is contained in:
parent
32c5b1c037
commit
736c490ab5
13
const.go
13
const.go
@ -1,10 +1,19 @@
|
|||||||
package dsnet
|
package dsnet
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
// could be overridden in future via env
|
||||||
|
CONFIG_FILE = "/etc/dsnet-config.json"
|
||||||
|
|
||||||
// these end up in the config file
|
// these end up in the config file
|
||||||
DEFAULT_INTERFACE_NAME = "dsnet"
|
DEFAULT_INTERFACE_NAME = "dsnet"
|
||||||
DEFAULT_REPORT_FILE = "/var/lib/dsnet-report.json"
|
DEFAULT_REPORT_FILE = "/var/lib/dsnet-report.json"
|
||||||
|
|
||||||
// could be overridden in future via env
|
// keepalive always configured for everything
|
||||||
CONFIG_FILE = "/etc/dsnet-config.json"
|
KEEPALIVE_SECONDS = 21;
|
||||||
|
|
||||||
|
// when is a peer considered gone forever? (could remove)
|
||||||
|
EXPIRY_DAYS = 28;
|
||||||
|
|
||||||
|
LISTEN_PORT = 51820;
|
||||||
|
|
||||||
)
|
)
|
||||||
|
5
types.go
5
types.go
@ -5,11 +5,6 @@ import (
|
|||||||
"golang.zx2c4.com/wireguard/wgctrl/wgtypes"
|
"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
|
// see https://github.com/WireGuard/wgctrl-go/blob/master/wgtypes/types.go for definitions
|
||||||
type PeerConfig struct {
|
type PeerConfig struct {
|
||||||
// username of person running this host/router
|
// username of person running this host/router
|
||||||
|
Loading…
Reference in New Issue
Block a user