Commit Graph

22 Commits (0c00fa337483b7fc543b058736e839c5b75fcafb)

Author SHA1 Message Date
Denton Gentry 02a6ae0e0d cmd/tailscale: implement getInterfaces + SDK 30
SDK 30 prohibits syscall.NetlinkRIB(syscall.RTM_GETADDR, ...)
which Go's net.Interfaces uses. Implement an Android
specific version of net.Interfaces to use instead.

Passing primitive types across JNI is relatively straightforward,
passing a single object of a complex class is annoying but still
possible, but passing lists and other more complex data structures is
way harder. As such, this commit added a Java routine to render the
interface information to a string and pass that across JNI as a
primitive type for Go code to parse.

Fixes https://github.com/tailscale/tailscale/issues/2293
3 years 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 633d81287a cmd/tailscale,com/tailscale/ipn: delete unused constant, reformat
Signed-off-by: Elias Naur <mail@eliasnaur.com>
3 years ago
Elias Naur 07b2373e6b com/tailscale/ipn,cmd/tailscale: handle quick tile clicks while signed out
Specifically, start the main activity to prompt the user to sign in or
be notified of a pending machine auth.

Fixes tailscale/tailscale#1225

Signed-off-by: Elias Naur <mail@eliasnaur.com>
3 years ago
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 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 d221e0db42 java/com/tailscale/ipn: run attachPeer on main thread
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 39cb01da42 java/com/tailscale/ipn: upgrade Android security to support Android 5.1
As luck would have it, there's a new version of the androidx.security
library available that support Android 5+. Use that, and adjust to the
incompatible API changes.

Fixes tailscale/tailscale#577

Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago
Elias Naur 3ced33d812 java/com/tailscale/ipn: make App Android 5.1 compatible
Fragment.commitNow doesn't exist on Android 5.1. Calling commit and then all
flushing pending transactions is just as good, because we're not using any
other fragments.

Updates tailscale/tailscale#577

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 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 6265d84c36 cmd/tailscale: don't use TileService if not supported
Bump version code for release.

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
nirev b85b1b2f84 java/com/tailscale/ipn: set hostname to nickname if available
Fixes tailscale/tailscale#482

Signed-off-by: nirev <guilherme@nirev.org>
4 years ago
Elias Naur e77dcd9933 com/tailscale/ipn: strip manufacturer from model name
Some devices prefix Build.MODEL with Build.Manufacturer, some don't.
Strip the duplicates.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago
Elias Naur 4c1017a548 cmd/tailscale,android: bump gio version
Updates tailscale/tailscale#431 (fixes a resize crash)

Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago
Elias Naur ab06e659eb java/com/tailscale/ipn: add Build.MANUFACTURER to hostname
Updates tailscale/tailscale#420

Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago
Elias Naur 3db59c3a9b cmd/tailscale,java/com/tailscale/ipn: set hostname to Build.MODEL
Fixes tailscale/tailscale#409

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