Commit Graph

66 Commits (e87e87367acd33758ad5b05b9c1b05734090eaf3)

Author SHA1 Message Date
Elias Naur 2c9fddab4f cmd/tailscale: warn when debug signed and Google Sign-In fails
Fixes tailscale/tailscale#1036

Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 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>
4 years ago
Elias Naur 33a953fb21 cmd/tailscale: only refresh VPN tunnel if configuration changed
This used to work, but a later ChromeOS workaround closed and cleared the last
configuration before comparing it with the new.

Fixes tailscale/tailscale#966

Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 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 f2c035a8bf cmd/tailscale: note in Hostinfo.OSVersion if Google Play is unavailable
Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago
Elias Naur cedc696c87 go.*,cmd/tailscale: upgrade to latest gio version
Includes the GOARM=7 fix to avoid softfloat on 32-bit android/arm.

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 25168130a7 cmd/tailscale,go.*: update to tailscale 1.2
Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago
Elias Naur 233515e86a cmd/tailscale: move the App.appDir field to the only method that uses it
Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago
Elias Naur 7de19cd9b8 cmd/tailscale: remove unused field stateStore.dataDir
Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago
Elias Naur 679f97afb3 cmd/tailscale: don't show toggle when not authenticated
Also, change the login screen tile to say "Tailscale", not the
redundant "Needs authentication".

Updates tailscale/tailscale#608

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 3089ad8347 cmd/tailsca,java/comt/tailscale/ipn: don't require an Activity for Google sign-out
The GoogleSignIn.getClient has a version that only needs a Context, not an Activity.

Updates tailscale/tailscale#670

Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago
Elias Naur f25b5bbcba cmd/tailscale: make intro screen scrollable
Include the version code bump as well. Oops.

Updates tailscale/tailscale#488

Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago
Elias Naur 1003774193 cmd/tailscale,go.*: fix network hangs on Huawei devices
Bump the tailscale.com module version to get the Android fallback
for determining the default network device,

25b021388b

Updates tailscale/tailscale#471

Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago
Elias Naur 758e5691da cmd/tailscale: mask route addresses to please VpnService.Builder.addRoute
Update inet.af/netaddr for IPPrefix.Masked.

Fixes tailscale/tailscale#645

Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago
Elias Naur 454c59a4e5 cmd/tailscale: add detail to VpnService.Builder cosntruction errors
Updates tailscale/tailscale#645

Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago
Elias Naur 943bded910 cmd/tailscale: don't duplicate log output
logtail.Log by default writes log output to stderr, but stderr is taken over by
filch's ReplaceStderr, resulting in duplicate logs sent to Tailscale.
ReplaceStderr is useful for capturing stack dumps from panics.

Configure logtail to route logs to the Android logger, which stops the
duplicate logging and replaces an existing MultiWriter setup for the same
purpose.

Reduce the scope of the logtail logger while here.

Fixes tailscale/tailscale#646

Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago
Elias Naur 334dff897c cmd/tailscale: pause app on sign-in screen when internet is gone
Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago
Elias Naur 05fc3ef433 cmd/tailscale: close overflow menu when the Android back button is pressed
Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago
Elias Naur a7dfea267c cmd/tailscale: fallback back to Google DNS on ChromeOS
Contrary to the VpnService.Builder documentation, ChromeOS doesn't
automatically fall back to the underlying network nameservers when
none are provided.

Updates tailscale/tailscale#431

Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago
Elias Naur 7211e6db1b cmd/tailscale: tee log output to both Tailscale and the Android log
Updates tailscale/tailscale#471

Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago
Elias Naur 9e45538997 cmd/tailscale,java/com/tailscale/ipn: provide OSVersion and DeviceModel for the backend
Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago
Elias Naur 93afdf1e5d cmd/tailscale: bump tailscale version
Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago
Elias Naur 91d4d47fd8 cmd/tailscale: stop loader indicator when Google Sign-in is cancelled
Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago
Elias Naur 15632cb15b cmd/tailscale: sign-out any Google users when logging out from Tailscale
Fixes tailscale/tailscale#585

Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago
Elias Naur 053820acda cmd/tailscale: ensure the web sign-in button always chooses the browser
It was set to reauthenticate with the last used sign-in method by mistake.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago
Elias Naur 5a018c7209 cmd/tailscale: reset loader indicator after Google Sign-in
Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago
Elias Naur 19ed532519 cmd/tailscale: don't set up VPN for invalid configurations
Fixes tailscale/tailscale#507

Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago
Elias Naur 2119f8aa9d cmd/tailscale: avoid backend deadlocks from SetPrefs and LinkChange
Updates tailscale/tailscale#471 (perhaps fixes it)

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 df1d8b338b cmd/tailscale: implement Google ID sign-in
Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago
Elias Naur ad92c8d81f cmd/tailscale: remove redundant locking
There are no more concurrent accesses to the prefs variable.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago
Elias Naur 3f469f3f8a cmd/tailscale: replace manual border widget with gioui.org/widget.Border
Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago
Elias Naur 878e6e75df cmd/tailscale: disable sign-in buttons during sign-in
Fixes tailscale/tailscale#481

Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago
Elias Naur 22851bfa05 cmd/tailscale: add progress indicator to sign in buttons
For tailscale/tailscale#481

Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago
Elias Naur e3befb01d8 cmd/tailscale: make sign-in buttons visually lighter
Having two (or more) login buttons demands a less overwhelming look.

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 33849b0daa cmd/tailscale,go.*: track go-bindata tool version in go.mod
Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago
Elias Naur cd9c808dd2 java/com/tailscale,cmd/tailscale: remove webview signin
Adjust the Custom Tabs browser color to match the app header while
here.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago
Elias Naur 8f621e531a cmd/tailscale: don't notify for never-expiring sessions
Fixes tailscale/tailscale#469

Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago
Elias Naur a39b174ed8 cmd/tailscale: don't set up logging twice
Updates tailscale/tailscale#500

Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago
Elias Naur f88e8f6f8c cmd/tailscale: bump tailscale.com version
Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago
Elias Naur 4d5f89f767 cmd/tailscale: bump gio version
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 31b3c725c8 cmd/tailscale: reset cached config when failing to set up VPN tunnel
Add a bit of logging while here.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago
Elias Naur b297135f2a cmd/tailscale: wait for previous tunnel(s) to close before establishing new
Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago
Elias Naur 0d0a049057 cmd/tailscale: avoid deadlocking between backend calls and callbacks
The runBackend goroutine issues backend requests (StartLoginInteractive,
Logout, SetPrefs) from the same select that receives callbacks the
backend.

Avoid the potential for same-goroutine deadlock by issuing backend requests on
separate goroutines.

Fixes tailscale/tailscale#470

Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago
Elias Naur 18adee11a5 cmd/tailscale: assume internet connectivity at startup
Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago
Elias Naur bfd730f3d7 cmd/tailscale: handle IPN callbacks from the backend goroutine
Before this change, the notification and configuration callbacks
raced with the backend goroutine.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago