make some consts default

This commit is contained in:
Callan Bryant 2020-02-27 22:31:44 +00:00
parent e1b084b801
commit 109b1d35b3
No known key found for this signature in database
GPG Key ID: C31FA9DF3ACBFFAA
2 changed files with 6 additions and 6 deletions

View File

@ -1,11 +1,10 @@
package dsnet package dsnet
// TODO allow env override (vars) as soon as someone needs it. Probably won't
// for ages, default interface name + locations are generally fine unless
// multiple VPNs are needed
const ( const (
INTERFACE_NAME = "dsnet" // 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" CONFIG_FILE = "/etc/dsnet-config.json"
REPORT_FILE = "/var/lib/dsnet-report.json"
) )

View File

@ -54,6 +54,7 @@ type DsnetConfig struct {
// IP network from which to allocate automatic sequential addresses // IP network from which to allocate automatic sequential addresses
//Network net.IPNet //Network net.IPNet
// TODO: use ParseCIDR to parse config // TODO: use ParseCIDR to parse config
// Network is chosen randomly when not specified
Network string `validate:"required,cidr"` Network string `validate:"required,cidr"`
// domain to append to hostnames. Relies on separate DNS server for // domain to append to hostnames. Relies on separate DNS server for
// resolution. Informational only. // resolution. Informational only.