Commit Graph

42 Commits

Author SHA1 Message Date
Revath S Kumar
687bf8b208 Manifest: make wireguard compatible with android TV
As of now wireguard is not listed in Android TV play store
due to the lack of CATEGORY_LEANBACK_LAUNCHER [1].
Even the app is not listed when we sideload into TV device[2].

[1]: https://developer.android.com/reference/android/content/Intent.html#CATEGORY_LEANBACK_LAUNCHER
[2]: https://developer.android.com/training/tv/start/start.html#tv-activity

Signed-off-by: Revath S Kumar <rsk@revathskumar.com>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-01-22 20:56:49 +01:00
Harsh Shandilya
4d3043c041 Introduce TunnelToggleActivity
On Android 10, apps cannot start services when they're in the
background. This means that starting VpnService from within
QuickTileService when the app is not active ends badly. To mitigate this
situation, we introduce a proxy activity of sorts that will handle
starting VpnService for us. The activity is completely transparent and
invisible, and does only four things:

- Toggle the tunnel state
- Request the Tile bound by QuickTileService to refresh its state
- Handle any error that might have been thrown during toggle
- Call finishAffinity() and go away

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2019-12-20 11:26:33 +01:00
Jason A. Donenfeld
52166500fd ToolsInstaller: extract from apk instead of relying on native extraction
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-10-13 11:46:41 +02:00
Harsh Shandilya
6fdf0266cf Migrate to AndroidX
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2018-12-18 16:54:54 +01:00
Samuel Holland
a264f7ab36 Auto-format the source directories
Blame Jason for writing Java in vim.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-11-11 21:50:23 -06:00
Eric Kuck
8e0835e570 Added QR code scanner as tunnel import method
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-07-25 02:05:11 +02:00
Eric Kuck
c696e9f275 Build with different name and ID in debug mode
Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
2018-07-08 03:26:42 +02:00
Jason A. Donenfeld
a2ccbf003c TunnelManager: new intents
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-06-04 07:06:28 +02:00
Jason A. Donenfeld
292df12175 Support always-on-vpn
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-05-27 18:57:52 +02:00
Samuel Holland
8e4fb91a28 global: Clean up XML
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-04-30 11:39:23 -05:00
Samuel Holland
7eedf08d4b global: Automatic code formatting
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-04-30 11:39:12 -05:00
Harsh Shandilya
4fc1e61a83 SettingsActivity: Define preferenceTheme for AppCompat
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2018-04-30 17:30:24 +05:30
Harsh Shandilya
425d194e4f wg: Add and use dummy AppTheme
Preparation for when the app will start carrying
colors reflecting the WireGuard brand.

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2018-04-30 17:30:24 +05:30
Jason A. Donenfeld
622f41f11f Allow exporting to zip file
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-04-29 07:53:56 +02:00
Jason A. Donenfeld
8d2510ae9e Manifest: disable always-on VPN
We don't actually comprehend how this works yet, so disable it. But
we'll need to add support for this at some point.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-04-26 02:25:55 +02:00
Jason A. Donenfeld
88cf839c90 Update application state based on wg-quick
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-04-23 17:04:17 +02:00
Aurélien Chabot
9dfab4d60f GoBackend: Use the android VpnService to encapsulate the go backend
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-04-17 02:15:24 +02:00
Samuel Holland
b22e2b259b manifest: Add permission to read external storage
This fixes support for file managers that don't proxy the file access
from the file selection dialog through a content provider, and just
return a raw file:// URL. In this case, resolver.openInputStream() tries
to open the file directly, and fails with "Permission denied".

Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-02-03 12:47:14 -06:00
Jason A. Donenfeld
c1cc2774be Manifest: show back arrow on sub activities
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-01-10 23:52:02 +01:00
Samuel Holland
d645d69847 project: Global cleanup
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-08 02:19:13 -06:00
Samuel Holland
609194fae2 Serviceless rewrite, part 1
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-06 04:09:29 -06:00
Jason A. Donenfeld
6d1117a94c tools: build required tools with apk
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-12-15 06:00:45 +01:00
Samuel Holland
19f0089559 Show ConfigActivity when holding QS tile
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-11-28 17:33:32 -06:00
Jason A. Donenfeld
6bc6aea2d0 NotSupported: check if the module exists
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-11-27 04:28:48 +01:00
Jason A. Donenfeld
d43c87a869 QuickTileService: show app if no profiles exist
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-11-27 00:43:34 +01:00
Samuel Holland
50a7a12de2 VpnService: Move it to a backends package
It should be split into two pieces: configuration file management
(loading/saving/renaming/deleting) and calling into wg-quick via
RootShell. The configuration file management part should then go
back into the main package. This is in preparation for adding
additional backends based on wg(8) and wireguard-go.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-11-24 21:16:37 -06:00
Samuel Holland
b1c1889c50 manifest: ConfigActivity is parent to AddActivity
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-08-23 17:57:43 -05:00
Samuel Holland
c1cdea42b6 Finish first pass of config editor fields
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-08-22 23:10:41 -05:00
Samuel Holland
5d04714eea ConfigAddActivity: Rename to AddActivity
Not everything needs to start with Config

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-08-22 01:27:29 -05:00
Samuel Holland
416d3adda7 QuickTileService: Implement and update from VpnService
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-08-17 05:45:40 -05:00
Samuel Holland
61d6b89bbe ConfigAddActivity: Add an standalone config-creating activity
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-08-15 17:36:11 -05:00
Samuel Holland
5e55d196be Major renaming and refactoring in activity and service
Apparently "configuration" is the proper term, not "profile".

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-08-13 07:24:03 -05:00
Samuel Holland
d00480a3a5 Settings: Add empty activity
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-08-09 07:34:28 -05:00
Samuel Holland
c199827b58 ProfileEdit: Add empty activity/fragment
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-08-09 07:30:25 -05:00
Samuel Holland
52cdf3e7e5 ProfileActivity: Replace fragments instead of hiding
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-08-09 05:12:00 -05:00
Samuel Holland
2e3daa8913 ProfileActivity: Extract base class for fixing fragments
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-08-09 03:23:25 -05:00
Samuel Holland
81ab643d2b ProfileList: Convert to a fragment
This is required for a future two-fragment tablet layout, and simplifies
the code a bit since the profile detail (view/edit) will be implemented
as fragments anyway.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-08-04 12:24:18 -05:00
Samuel Holland
773190f57d ProfileService: Add a listener to start it on boot
This will allow automatically starting profiles on boot.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-07-30 02:01:38 -05:00
Samuel Holland
c65ac9fafe ProfileService: Create it and move profile loading
The long-running service is needed for keeping track of which profiles
are enabled, for showing notifications, and for the tile service to use.
Since it has to know which profiles exist anyway, moving the main
ObservableList there avoids some code duplication. It ensures the list
is only loaded once, so it cannot get out of sync. It also makes the
ProfileList activity load faster, because it doesn't have to wait for
file I/O; and it provides a canonical place for storing the Profile
objects so they are accessible everywhere, instead of having to look
them up by name.

This does present some challenges with leaking activities, because all
listeners must be removed from the profiles list (and its contents) when
an activity is stopped.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-07-30 01:48:57 -05:00
Samuel Holland
7ceafaf2bb ProfileList: Add minimal activity
For now, it simply reads the files in the app's data directory with
file names ending in ".conf" and displays them in a list.

This includes the generic list data binding setup for future use.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-07-29 06:09:55 -05:00
Samuel Holland
5a82ecf18a icon: Use the uncropped logo for the non-round icon
The round icon remains the same.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-07-30 22:47:24 -05:00
Samuel Holland
56cf8816d3 project: Create empty project with WireGuard icon
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-07-28 23:10:37 -05:00