Commit Graph

14 Commits (d0c45c1de12a38b5866bae73a09c63356beef405)

Author SHA1 Message Date
Denton Gentry d0c45c1de1 Revert "IPNReceiver: Add intents to connect and disconnect VPN (#84)"
Reverting according to discussion in
https://github.com/tailscale/tailscale/issues/3547#issuecomment-1465035410

This reverts commit 51a53e5472.
1 year ago
Brett Jenkins 51a53e5472
IPNReceiver: Add intents to connect and disconnect VPN (#84)
* IPNReceiver: Add intents to connect and disconnect VPN

Added a new class IPNReceiver to listen to intents silently and connect and disconnect the VPN
Also removed unneeded comment

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

Signed-off-by: Brett Jenkins <brett@brettjenkins.co.uk>
1 year ago
Elias Naur 84b484a954 android,cmd/tailscale: implement taildrop receive for Android < 10
Fixes tailscale/tailscale#2720
Fixes tailscale/tailscale#2296

Signed-off-by: Elias Naur <mail@eliasnaur.com>
3 years ago
Elias Naur 10ded1bad2 cmd/tailscale,java: implement file sharing
Fixes tailscale/tailscale#1809

Signed-off-by: Elias Naur <mail@eliasnaur.com>
3 years ago
Elias Naur b151de039b cmd/tailscale: simplify non-blocking coalescing channels
Three variables are used everywhere a single non-blocking producer sends
values where only the latest is relevant:

    var (
	    mu sync.Mutex
	    latest T
	    notify = make(chan struct{}, 1)
    )

By draining the notification channel before sending through it, we
can simplify to just one channel:

    latest = make(chan T, 1)

Thanks to Chris Waldon for showing me this neat trick.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
3 years ago
Elias Naur ba38a9bb59 jni,cmd/tailscale: replace jni.EnvFor with explicit conversion
The EnvFor converted an uintptr to a pointer value, which is not
guaranteed to work in general. This change removes EnvFor and pushes the
potentially unsafe conversion to users of the jni package.

Fixes tailscale/tailscale#1195

Signed-off-by: Elias Naur <mail@eliasnaur.com>
3 years ago
Elias Naur 9db851a113 cmd/tailscale: notify user when VPN access is denied
When tailscale starts, any other active VPN service is automatically closed by the system.
However, if the other VPN service is configured to be always-on, we will be denied access
to set up a VPN. The user may not realize this case, so this change adds a notification
when we're denied access.

The failure mode is identical to the user denying access tthrough the system dialog
shown first time Tailscale starts, so the notification also mentions that case.

Fixes tailscale/tailscale#1017

Signed-off-by: Elias Naur <mail@eliasnaur.com>
3 years ago
Elias Naur 129abdb13f cmd/tailscale: close Tailscale when user cancels system VPN dialog
Fixes tailscale/tailscale#904

Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago
Elias Naur 6d9acbb479 cmd/tailscale,java: refactor Google Sign-In into separate class
In preparation for the F-Droid release, refactor the non-free Google dependency
into a separate Java class and make the Go client tolerate missing support.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago
Elias Naur 1b402aebb0 cmd/tailscale,java/com/tailscale/ipn: always register the Peer Fragment
Before this change, the Peer would be registered across Activity restarts
but not after Activity destruction (for example, when the user pressed the
back button).

Use the newer Gio ViewEvent API for tracking the Activity lifecycle and
the most recent Activity reference.

Move Java calls that need an Activity from Peer to App, leaving Peer solely
as a method for receiving onActivityResult.

Fixes tailscale/tailscale#670

Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago
Elias Naur bae9b8394a android: add quick setting tile support
Fixes tailscale/tailscale#516

Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago
Elias Naur ec9bb108c6 cmd/tailscale: add Google sign-in button
Hidden behind a flag pending support from the Tailscale client.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago
Elias Naur 28c8a2e1e5 go.mod: change the module name to github.com/tailscale/tailscale-android
Makes it go-gettable.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago
Elias Naur 5109987e18 all: initial commit
Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago