Intra
Intra copied to clipboard
Disable Keep-Alive to save battery
Intra should disable Keep-Alive to avoid waking up the network device when not needed.
The dialer is created at https://github.com/Jigsaw-Code/Intra/blob/ede31e60c562489d7a517028458c15d901ee88e9/Android/app/src/go/intra/protect/protect.go#L95
In https://github.com/Jigsaw-Code/Intra/blob/ede31e60c562489d7a517028458c15d901ee88e9/Android/app/src/go/intra/protect/protect.go#L108
we should check if the connection is a TCPConn, and disable the Keep Alive with https://pkg.go.dev/net#TCPConn.SetKeepAlive.
For context, see https://github.com/Jigsaw-Code/outline-ss-server/issues/108.
Without disabling the Keep-Alive, it pings the peer every 15 seconds!