increase timeout for handshake interval

This commit is contained in:
Callan Bryant 2020-03-07 14:32:01 +00:00
parent 5f623dcd9d
commit 75549f2ab7
No known key found for this signature in database
GPG Key ID: C31FA9DF3ACBFFAA

View File

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