Commit Graph

558 Commits (de01d49351e037957cf090494843ff152b3ed51f)
 

Author SHA1 Message Date
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>
10 months ago
James Tucker 8e748afc47 android: update Android Gradle Plugin as recommended by Android Studio
Updates #cleanup
10 months ago
James Tucker a5edb67c9d .gitignore: ignore Android Studio local state files
Updates #cleanup
10 months ago
James Tucker 6a6e80db47
go.mod,cmd/tailscale: bump OSS and update logtail transport setup (#119)
Updates #cleanup
10 months ago
James Tucker 926613ddae
Makefile,Dockerfile,README.md: improve build dependency setup and documentation (#114)
- Teach Makefile to install an Android SDK and the components we need
- Make Dockerfile delegate to Makefile for Android SDK setup
- Detect Android Studio and other known SDK paths, and use them if found.
- Update documentation to more consistently point to Android Studio & make.
- Add a task that checks for the SDK components and produces a useful error.
- Build an APK by default.
- Allow TOOLCHAINDIR to be passed in, and strip the first go/ component
  so that it is the path a user would expect.

Updates #cleanup
10 months ago
James Tucker 5ca195b109
version: fix result from tailscale-version.sh when not using a git source (#117)
If the developer has used `go mod vendor` or `go work use ../tailscale`
then the version script was returning "tailscale.com" instead of hitting
the error case.

This now makes the outcome with the Makefile slightly worse, which needs
to be fixed up next.

Updates #cleanup
10 months ago
Denton Gentry 31f2aa8097 cmd/tailscale/main.go: use ipn.NewPrefs(), not &ipn.Prefs{}
ipn.NewPrefs() sets accepting DNS and routes to true,
among other things. &ipn.Prefs{} initializes all fields
to false.

Fixes https://github.com/tailscale/corp/issues/13377

Signed-off-by: Denton Gentry <dgentry@tailscale.com>
11 months ago
kari-ts 264aae3232
android: update gradle (#112)
-Update Gradle version
-Replace jcenter() with mavenCentral() because of jcenter deprecation
-Use testImplementation instead of the obsolete testCompile

Tested with docker
Fixes #12997

Signed-off-by: kari-ts <kari@tailscale.com>
11 months ago
Andrea Gottardo bb47fa593c
android: increment versionCode to 170 (#113) 11 months ago
kari-ts 04b79a2206
cmd/tailscale: if first notification, set hostname even if prefs is nil (#111)
Currently, if the notification (ipn.Notify) has a nil Prefs, the hostname defaults to localhost

Fixes #7875

Signed-off-by: kari-ts <kari@tailscale.com>
12 months ago
Brad Fitzpatrick f44692addd
cmd/tailscale: don't render ShareeNode peers (#98)
Fixes tailscale/corp#11006

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
12 months ago
Will Norris dc9c96278d Dockerfile: update build tools in dockerfile
Use a slightly more current version of Java (jdk-11), as well as more
recent versions of Android build tools and Go.

Fixes tailscale/tailscale#8404

Signed-off-by: Will Norris <will@tailscale.com>
12 months ago
Charlotte Brandhorst-Satzkorn 39717f946b
Revert "Add DNS/routing prefs like on desktop (#86)" (#108)
This reverts commit d316acaa3d.
12 months ago
dependabot[bot] 4789733d46
build(deps): bump github.com/gin-gonic/gin from 1.9.0 to 1.9.1 (#105)
Bumps [github.com/gin-gonic/gin](https://github.com/gin-gonic/gin) from 1.9.0 to 1.9.1.
- [Release notes](https://github.com/gin-gonic/gin/releases)
- [Changelog](https://github.com/gin-gonic/gin/blob/master/CHANGELOG.md)
- [Commits](https://github.com/gin-gonic/gin/compare/v1.9.0...v1.9.1)

---
updated-dependencies:
- dependency-name: github.com/gin-gonic/gin
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
12 months ago
Denton Gentry 1e07536824 android: bump version code
Signed-off-by: Denton Gentry <dgentry@tailscale.com>
12 months ago
Denton Gentry 0ccb93e115 go.mod: update for 1.43.x development.
Signed-off-by: Denton Gentry <dgentry@tailscale.com>
12 months ago
Will Norris 566a890843 gitignore: ignore build artifact and signing key
Signed-off-by: Will Norris <will@tailscale.com>
1 year ago
Will Norris b68b3f2aeb Makefile: fix versionCode replacement and cleanup
I'm not sure why [[:digit:]] worked before but not now (BSD vs GNU sed
maybe?), but since we already have the old VERSIONCODE, just replace it
directly. Also cleanup the android/build.gradle.bak file.

Signed-off-by: Will Norris <will@tailscale.com>
1 year ago
Denton Gentry 8d6922285d android: bump version code
Signed-off-by: Denton Gentry <dgentry@tailscale.com>
1 year ago
Denton Gentry 38061656a5 go.mod: update from OSS.
Signed-off-by: Denton Gentry <dgentry@tailscale.com>
1 year ago
dependabot[bot] f4489f4e0c
build(deps): bump github.com/gin-gonic/gin from 1.8.1 to 1.9.0 (#99)
Bumps [github.com/gin-gonic/gin](https://github.com/gin-gonic/gin) from 1.8.1 to 1.9.0.
- [Release notes](https://github.com/gin-gonic/gin/releases)
- [Changelog](https://github.com/gin-gonic/gin/blob/master/CHANGELOG.md)
- [Commits](https://github.com/gin-gonic/gin/compare/v1.8.1...v1.9.0)

---
updated-dependencies:
- dependency-name: github.com/gin-gonic/gin
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 year ago
Brad Fitzpatrick 6b9a11c755 cmd/tailscale: fix regression from earlier commit
In 00a42702cb I bumped go.mod and adjusted the API, but only tested
that it compiled & tests (hah) passed.

I forgot this line. I still haven't tested this, but can't be worse! :)

Fixes 00a42702cb (commitcomment-112642284)

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
1 year ago
M. J. Fromberger 049ee22764
.github: mark bots for exemption by issuebot (#101) 1 year ago
Brad Fitzpatrick 00a42702cb go.mod: bump tailscale.com dep, update for tsd.System API change
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
1 year ago
Brad Fitzpatrick a7b3ae04b0 cmd/tailscale: use Google as DNS of last resort
Sometimes we try a dozen different ways to read the phone's DNS
settings and it still comes back empty. In that case, if we're already
on a Google-ified Android phone, just use Google's Public DNS servers
as the ultimate fallback, as we already do on ChromeOS to work around
ChromeOS Android VpnBuilder bugs.

Updates tailscale/tailscale#8006 etc etc

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
1 year ago
RoboMagus 13ecd3e34d
Exit node in notification (#96)
* Show exitnode in persistent notification when connected.
* updateNotification when exitnode changes

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

Signed-off-by: RoboMagus <68224306+RoboMagus@users.noreply.github.com>
1 year ago
Denton Gentry 0931e9b3ee android: bump version code
Signed-off-by: Denton Gentry <dgentry@tailscale.com>
1 year ago
Denton Gentry aa32919ac3 go.mod: update from OSS
Signed-off-by: Denton Gentry <dgentry@tailscale.com>
1 year ago
Denton Gentry 2118ca5b38 android: bump version code
Signed-off-by: Denton Gentry <dgentry@tailscale.com>
1 year ago
Denton Gentry 1a4a088466 go.mod: update from OSS
Signed-off-by: Denton Gentry <dgentry@tailscale.com>
1 year 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
Mihai Parparita 24ba39121f README.md: update macOS instructions
The JRE path has changed in more recent versions of Android Studio.
Also make it more explicit how to get the `adb` tool in the search path.
1 year ago
Denton Gentry c077c1b38a android: bump version code
Signed-off-by: Denton Gentry <dgentry@tailscale.com>
1 year ago
Denton Gentry a5346dcc26 go.mod: update from OSS.
Signed-off-by: Denton Gentry <dgentry@tailscale.com>
1 year ago
Mihai Parparita e7efa7d1c2 Makefile: add tailscale_go to the set of build tags
We build with the tailscale Go toolchain, so we should pass in the
build tag that indicates that it's safe to use functionality contained
within it.

Updates tailscale/corp#9230
1 year ago
Mihai Parparita 8e4a740d8e cmd/tailscale: enabled logtail flushing for the Android client
The c2n endpoint was not working since we did not configure the flush
function (same issue that was previously fixed in the iOS client in
tailscale/corp#9939).

Updates tailscale/corp#8564
1 year ago
Mihai Parparita 68ecc44a49 cmd/tailscale: upload client metrics
More generally, make the logtail.Config similar to the one used by
clients for other platforms.

Updates tailscale/corp#9230
1 year ago
Jordan Whited 44d083aaf1
go.mod: Update from OSS and bump wireguard-go (#90)
Signed-off-by: Jordan Whited <jordan@tailscale.com>
1 year ago
Gero Gerke d316acaa3d
Add DNS/routing prefs like on desktop (#86)
ui: Add DNS/routing prefs like on desktop

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

Signed-off-by: Denton Gentry <dgentry@tailscale.com>
1 year ago
Jordan Whited 2470284b31
go.mod: Update from OSS and bump wireguard-go. (#88)
Signed-off-by: Jordan Whited <jordan@tailscale.com>
1 year ago
Denton Gentry 71f203a493 android: bump version code
Signed-off-by: Denton Gentry <dgentry@tailscale.com>
1 year ago
Denton Gentry df47a60927 go.mod: Update from OSS.
Signed-off-by: Denton Gentry <dgentry@tailscale.com>
1 year ago
Denton Gentry 8f512dd7a9 go.mod: beginning of 1.39 development.
Signed-off-by: Denton Gentry <dgentry@tailscale.com>
1 year ago
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
Denton Gentry 6499fb845e android: bump version code
Signed-off-by: Denton Gentry <dgentry@tailscale.com>
1 year ago
Denton Gentry 814cd3c43a go.mod: update from OSS.
Signed-off-by: Denton Gentry <dgentry@tailscale.com>
1 year ago
Denton Gentry 6bbc9032bf android: bump version code
Signed-off-by: Denton Gentry <dgentry@tailscale.com>
1 year ago
Denton Gentry d53da4ac65 go.mod: update OSS
Skip over the build number used for 1.36.2.

Signed-off-by: Denton Gentry <dgentry@tailscale.com>
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
dependabot[bot] 7245e72dcf build(deps): bump golang.org/x/image
Bumps [golang.org/x/image](https://github.com/golang/image) from 0.0.0-20220722155232-062f8c9fd539 to 0.5.0.
- [Release notes](https://github.com/golang/image/releases)
- [Commits](https://github.com/golang/image/commits/v0.5.0)

---
updated-dependencies:
- dependency-name: golang.org/x/image
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
1 year ago