Commit Graph

3 Commits (87a8003d397174b54c2bc25b0dc8f32222a01420)

Author SHA1 Message Date
James Tucker 87a8003d39 *: add a CI check for license headers and fix all files
Updates tailscale/tailscale#10992

Signed-off-by: James Tucker <james@tailscale.com>
3 months ago
Brett Jenkins 6348bb254a
Prevent connecting loops when using connect intent more than once (#95)
* startvpnworker.java: prevent connecting loops

If start intent called more than once.

Turns out there were still some cases where the bug would occur, also it turns out checking the status of a VPN connection isn't foolproof in android, so this is a safer way to fix it, we just ensure that the autoConnect var is set to false when disconnecting.

Fixes: https://github.com/tailscale/tailscale/issues/8013

Signed-off-by: Brett Jenkins <brett@brettjenkins.co.uk>
11 months ago
Brett Jenkins eb9599540c
Add intents (#87)
IPNReceiver: Add intents to connect and disconnect VPN

Added a new class IPNReceiver to listen to intents silently and connect and disconnect the VPN. This uses workers to avoid doing too much in the IPNReceiver which is to be avoided according to documentation.

Also includes a fix for vpn occasionally not starting. Think this was due to a race condition, but now only sets autoConnect to false when we know a connection is connecting or connected.

Fixes https://github.com/tailscale/tailscale/issues/3547
Updates https://github.com/tailscale/tailscale/issues/2481

Signed-off-by: Brett Jenkins <brett@brettjenkins.co.uk>
1 year ago