dsnet/const.go

34 lines
811 B
Go
Raw Normal View History

2020-02-26 21:40:12 +01:00
package dsnet
2020-03-05 23:05:47 +01:00
import (
"time"
)
2020-02-26 21:40:12 +01:00
const (
2020-02-28 00:09:18 +01:00
// could be overridden in future via env
2020-03-04 00:32:07 +01:00
CONFIG_FILE = "/etc/dsnetconfig.json"
2020-02-28 00:09:18 +01:00
2020-02-27 23:31:44 +01:00
// these end up in the config file
DEFAULT_INTERFACE_NAME = "dsnet"
2020-03-04 00:32:07 +01:00
DEFAULT_REPORT_FILE = "/var/lib/dsnetreport.json"
2020-03-02 00:08:10 +01:00
DEFAULT_LISTEN_PORT = 51820
2020-02-27 23:31:44 +01:00
// keepalive always configured for clients. Set to a value likely to
// stop most NATs from dropping the connection. Wireguard docs recommend 25
// for most NATs
KEEPALIVE = 25 * time.Second
// if last handshake (different from keepalive, see https://www.wireguard.com/protocol/)
TIMEOUT = 3 * time.Minute
2020-02-28 00:09:18 +01:00
// when is a peer considered gone forever? (could remove)
2020-03-06 23:57:05 +01:00
EXPIRY = 28 * time.Hour * 24
2020-02-26 21:40:12 +01:00
)
var (
// populated with LDFLAGS, see do-release.sh
VERSION = "unknown"
GIT_COMMIT = "unknown"
BUILD_DATE = "unknown"
)