diff --git a/const.go b/const.go index 64be80b..8f10ede 100644 --- a/const.go +++ b/const.go @@ -13,11 +13,13 @@ const ( DEFAULT_REPORT_FILE = "/var/lib/dsnetreport.json" DEFAULT_LISTEN_PORT = 51820 - // keepalive always configured for everything. Set to a value likely to - // stop most NATs from dropping the connection. - KEEPALIVE = 21 * time.Second - // allow missing a single keepalive + margin. Received data resets timeout, too. - TIMEOUT = 50 * time.Second + // 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 // when is a peer considered gone forever? (could remove) EXPIRY = 28 * time.Hour * 24