Jason A. Donenfeld
0750c29c7f
version: bump
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2021-02-11 16:40:34 +01:00
Jason A. Donenfeld
639ee6b5b2
tunnel: add developer information to pom xml
...
Otherwise sonatype gets upset.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2021-02-11 16:40:34 +01:00
Jason A. Donenfeld
f764f2aaa9
build: update AGP to 4.1.2
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2021-02-11 16:11:57 +01:00
Jason A. Donenfeld
d2a9c56d9c
gradle: remove bad checksum from properties
...
The hash was wrong, causing crashes. Android studio told me to remove it
so I did. I don't quite like that, but I don't know how Harsh came up
with the previous hash.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2021-02-11 16:10:28 +01:00
Jason A. Donenfeld
4c3289aa52
tunnel: bump all tools
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2021-02-11 16:00:28 +01:00
Jason A. Donenfeld
79376bca64
tunnel: sign using gpg-agent
...
This way we don't have to have a separate java universe.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2021-02-11 15:55:20 +01:00
Harsh Shandilya
b709d36c01
tunnel: switch publishing to MavenCentral
...
Since MavenCentral requires GPG signed artifacts, we'll need to configure
some things on the machine running the deployment. Specifically, these
three Gradle properties need to be set (preferably in ~/.gradle/gradle.properties)
```
signing.keyId= // Duh
signing.password= // I have absolutely no idea how this will work with HSMs
signing.secretKeyRingFile= // $HOME/.gnupg/... you know the deal
```
The BINTRAY_USER and BINTRAY_KEY variables are replaced by SONATYPE_USER
and SONATYPE_PASSWORD to better reflect their new contents.
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2021-02-11 01:58:41 +05:30
L.W.Reek
0301c85e2c
build: include org.jetbrains.trove4j from jcenter
...
mavenCentral does not have org.jetbrains.trove4j which causes the
build to fail.
* What went wrong:
Execution failed for task ':tunnel:extractReleaseAnnotations'.
> Could not resolve all files for configuration ':tunnel:lintClassPath'.
> Could not find org.jetbrains.trove4j:trove4j:20160824.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/org/jetbrains/trove4j/
trove4j/20160824/trove4j-20160824.pom
- https://repo.maven.apache.org/maven2/org/jetbrains/trove4j/
trove4j/20160824/trove4j-20160824.pom
Required by:
project :tunnel > com.android.tools.lint:lint-gradle:27.1.1 >
com.android.tools:sdk-common:27.1.1
project :tunnel > com.android.tools.lint:lint-gradle:27.1.1 >
com.android.tools.external.com-intellij:intellij-core:27.1.1
Fixes: 13cc4436ca ("build: switch to mavenCentral as the main repository")
Signed-off-by: L.W.Reek <syphyr@gmail.com >
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2021-02-10 18:31:36 +05:30
Harsh Shandilya
7e979817e2
build: upgrade to Gradle 6.8.2
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2021-02-05 22:25:52 +05:30
Harsh Shandilya
13cc4436ca
build: switch to mavenCentral as the main repository
...
Retain JCenter but restrict it the single dependency we require off it
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2021-02-05 22:25:38 +05:30
Harsh Shandilya
bcfbf37ed1
build: update fragment to 1.3.0-rc02
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2021-02-03 13:33:47 +05:30
Jason A. Donenfeld
74ff870cf5
tunnel: bump libwg-go and use newer logging function
...
We also plug a memory leak. C.CString was calling malloc, and these were
never freed.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2021-01-27 01:10:48 +01:00
Harsh Shandilya
b4f54e8958
strings: sync translations
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2021-01-23 14:59:00 +05:30
L.W.Reek
d179a3af15
libwg-go: update to go 1.15.6
...
Signed-off-by: L.W.Reek <syphyr@gmail.com >
2021-01-23 14:42:46 +05:30
Harsh Shandilya
2bac2feeb5
build: upgrade runtime dependencies
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2021-01-23 14:33:00 +05:30
Harsh Shandilya
261236c8ce
gradle: bump wrapper to v6.8.1
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2021-01-23 14:01:44 +05:30
Jason A. Donenfeld
4a7969ef24
ClipboardUtils: localize clipboard notification snack
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2021-01-01 16:34:03 +01:00
Jason A. Donenfeld
f670ff22c6
version: bump
...
A Christmas eve special.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-12-24 14:30:11 +01:00
Jason A. Donenfeld
cb3194f10a
tunnel: bump libwg-go
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-12-23 22:55:56 +01:00
Jason A. Donenfeld
f6b2bbf433
strings: sync with crowdin
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-12-21 17:52:24 +01:00
Harsh Shandilya
56a4862442
build: upgrade to MDC 1.3.0-beta01
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-12-17 14:22:43 +05:30
Jason A. Donenfeld
20390d65c8
version: bump
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-12-16 19:09:21 +01:00
Jason A. Donenfeld
177457e67b
tunnel: bump libwg-go
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-12-16 19:04:17 +01:00
Harsh Shandilya
8caec4d739
build: downgrade Jetpack Datastore to 1.0.0-alpha02
...
We're hitting occasional build failures with the newer versions that have not been triaged yet
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-12-16 19:03:43 +01:00
Harsh Shandilya
fb819b99a4
build: upgrade AGP, Kotlin, core-ktx and mdc-android
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-12-16 18:55:08 +01:00
Harsh Shandilya
fe82037f06
build: upgrade activity and fragment to latest betas
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-12-16 18:55:08 +01:00
Harsh Shandilya
c2aa1b21f8
build: upgrade datastore dependency
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-12-03 01:26:48 +05:30
Harsh Shandilya
d69415b55a
build: upgrade dependencies
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-11-30 22:38:17 +05:30
Harsh Shandilya
4fae2d1255
ui: show all apps with internet permission in exclusions list
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-11-16 15:45:19 +05:30
Jason A. Donenfeld
a300f269f1
ui: test for any camera, not just rear one
...
Some folks use chromebooks, which don't have rear cameras.
Reported-by: Jay Tuley <jay.tuley@ekonbenefits.com >
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-11-10 14:11:48 +01:00
Harsh Shandilya
961cba3f7c
build: upgrade runtime dependencies
...
Updates ConstraintLayout, kotlinx.coroutines, Jetpack DataStore, JUnit and Lifecycle-Runtime-KTX
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-11-09 17:01:54 +05:30
Harsh Shandilya
6bc7386bff
strings: sync translations
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-11-07 19:13:43 +05:30
Harsh Shandilya
5fa08f286e
build: add task to sync localisations with Crowdin
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-11-07 19:13:42 +05:30
Harsh Shandilya
35f868733c
build: switch to Gradle's maven-publish plugin
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-11-07 18:53:06 +05:30
Jason A. Donenfeld
e71b3d2583
ToolsInstaller: unbreak cleanup
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-10-27 13:35:07 +01:00
Jason A. Donenfeld
755148242c
tunnel: do not constantly raise toasts when process is opportunistically killed
...
Modern Android likes to kill processes to free ram and resources. When
kernel-mode WireGuard is in use, this is quite alright with us, since
the app doesn't actually need to consume any resources at all in order
for the tunnel to run. So, we want to allow and encourage this resource
frugality. However, when the quick settings tile is being used or when
the app is referenced otherwise, the app will occasionally be restarted,
to, for example, repaint the quick settings tile. This is also fine, as
the process winds up being short-lived again. But, since process
initialization means asking for a new root shell in order to check on
kernel-mode WireGuard, this means that Magisk raises a systemwide toast.
On some phones, this happens each and every time that the notification
shade is pulled down. It's not only annoying but it sometimes obscures
other notifications that users want to see, prompting their pulling down
of the notification shade in the first place. In order to get rid of
this nuisance, just disable these notifications and extraneous logs, so
that we don't clutter the system every time that the process is
opportunistically killed and restarted.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-10-26 22:44:35 +01:00
Jason A. Donenfeld
15fea6f02f
tunnel: clean up some docstring wording
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-10-20 16:35:05 +02:00
Harsh Shandilya
cb2842e8ef
build: upgrade to Gradle 6.7
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-10-15 10:01:53 +05:30
Jason A. Donenfeld
106b67d892
build: add crowdin syncer script and use it
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-10-14 17:16:36 +02:00
Harsh Shandilya
996587f792
build: update to AGP 4.1.0
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-10-13 16:18:49 +02:00
Jason A. Donenfeld
3a4bf35c77
README: mention desugaring
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-10-08 15:03:49 +02:00
Harsh Shandilya
46b37c0c26
build: update AGP and ConstraintLayout
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-10-07 14:14:38 +05:30
Jason A. Donenfeld
5b5ba88a97
tunnel: use more subtle roaming escape hatch
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-10-07 10:21:02 +02:00
Jason A. Donenfeld
ceb3095a0a
build: update to mdc 1.3.0-alpha03
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-10-05 21:46:03 +02:00
Jason A. Donenfeld
a31f0cf788
DownloadsFileSaver: initialize callback in constructor, not on the fly
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-10-02 12:11:48 +02:00
Jason A. Donenfeld
1dc74b171c
build: upgrade AndroidX biometric
...
The BiometricConstants class was removed and these were folded into
BiometricPrompt.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-10-02 11:35:53 +02:00
Harsh Shandilya
9266487fe5
build: update AndroidX activity/fragments and resolve compile failure
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-10-02 04:28:25 +05:30
Harsh Shandilya
5d7ce139bc
ui: use commit extension from fragment-ktx
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-09-30 22:42:05 +05:30
Jason A. Donenfeld
ddb6c87ebf
ui: account for binding disappearing on detail fragment
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-09-30 12:47:29 +02:00
Jason A. Donenfeld
8a6f8f73cd
version: bump
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-09-27 16:30:30 +02:00
Jason A. Donenfeld
f4fc15538d
tv: hack gridlayoutmanager to fill columns before row if we're not scrolling
...
If we're horizontally scrolling, it makes sense to fill rows before
columns. But if it all fits in one page and we don't need to scroll
horizontally, it looks ridiculous. So, in this case, rearrange the tiles
so that it appears to fill columns before rows. But we don't want things
suddenly jumping around, so actually, keep the same ordering as
rows-before-columns, but add invisible spaces after certain items, so
that the fill area makes it look as though it's columns-before-rows.
This winds up being much more visually pleasing.
We do this by figuring out this kind of transformation:
If we convert this matrix:
0 3 6
1 4 _
2 5 _
To this one:
0 2 4 6
1 3 5 _
_ _ _ _
For a given index, how many spaces are under it? This changes depending
on how many total are in a grid. Going from 3x3 to 4x3, for example, we
have:
count == 12, index =
count == 11, index = 10
count == 10, index = 7,9
count == 9, index = 4,6,8
count == 8, index = 1,3,5,7
count == 7, index = 1,3,5,6!
count == 6, index = 1,3,4!,5!
count == 5, index = 1,2!,3!,4!
count == 4, index = 0!,1!,2!,3!
count == 3, index = 0!,1!,2!
count == 2, index = 0!,1!
count == 1, index = 0!
count == 0, index =
The '!' means two blanks below, no '!' means one blank below, and no
mention means no blanks below.
This commit adds code to compute such a table on the fly.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-09-27 13:17:56 +02:00
Jason A. Donenfeld
938399d881
ui: queue up tunnel mutating on activity scope instead of fragment scope
...
Fragment scopes get cancelled when the fragment goes away, but we don't
actually want to cancel an in-flight transition in that case. Also,
before when the fragment would cancel, there'd be an exception, and the
exception handler would call Fragment::getString, which in turn called
requireContext, which caused an exception. Work around this by using the
`activity ?: Application.get()` idiom to always have a context for
strings and toasts.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-09-26 13:49:14 +02:00
Jason A. Donenfeld
53ca421a85
ui: print proper exception trace from log viewer
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-09-26 12:01:58 +02:00
Jason A. Donenfeld
32778d1c03
ui: request intent permissions from hidden activity
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-09-26 11:44:24 +02:00
Jason A. Donenfeld
a870bf6e04
version: bump
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-09-24 14:12:51 +02:00
Jason A. Donenfeld
7a8f708157
tv: handle going up directories better
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-09-24 14:12:40 +02:00
Jason A. Donenfeld
e729c5dc51
tv: show volume descriptions for file picker
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-09-24 14:12:40 +02:00
Jason A. Donenfeld
4bf34c49b7
ui: account for null data in callback
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-09-24 14:12:40 +02:00
Jason A. Donenfeld
05511d4900
ui: cleanup code after churn
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-09-23 17:56:37 +02:00
Jason A. Donenfeld
15da17b595
tv: use system picker for API 29+
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-09-23 17:56:37 +02:00
Jason A. Donenfeld
b3c43e428f
tv: use our own file picker
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-09-23 17:56:37 +02:00
Jason A. Donenfeld
7bec539722
tv: escape deletion view with back button
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-09-23 17:56:37 +02:00
Jason A. Donenfeld
a8dfebb086
tv: select first item after toggling deletion mode
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-09-22 23:59:40 +02:00
Jason A. Donenfeld
e72b4fc144
tv: hook up isFocused as observable property
...
This is kind of ridiculous, since the items own state should clearly be
queryable, but it doesn't appear to be the case here, so just shuffle it
around into kotlin and back.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-09-22 23:54:41 +02:00
Jason A. Donenfeld
03189e7b20
tv: add text when there are no tunnels
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-09-22 23:54:38 +02:00
Jason A. Donenfeld
10bb413187
tv: make cards slightly smaller
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-09-22 23:54:36 +02:00
Jason A. Donenfeld
1c814310b9
tv: select the right thing on load
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-09-22 23:54:32 +02:00
Harsh Shandilya
3fe9e3162f
tv: tweak TV layout to fit 3 rows better
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-09-22 23:54:30 +02:00
Harsh Shandilya
6da6f7886a
tv: set layout manager from XML
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-09-22 23:54:26 +02:00
Jason A. Donenfeld
8c2029870f
tv: make logo almost better
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-09-22 23:54:23 +02:00
Harsh Shandilya
a5031a44a0
tv: anchor RV bottom to top of delete button
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-09-22 23:54:20 +02:00
Jason A. Donenfeld
44b27fe472
tv: remove useless attribute
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-09-22 23:54:17 +02:00
Jason A. Donenfeld
93fb3b345b
tv: use plus instead of text for importing
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-09-22 23:54:14 +02:00
Harsh Shandilya
8b596697b7
tv: do theming
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-09-22 23:54:04 +02:00
Jason A. Donenfeld
c536bbb7e9
tv: account for broken TVs with no file picker
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-09-22 23:54:01 +02:00
Jason A. Donenfeld
a978aac129
tv: remove tiny words from tv banner
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-09-22 23:53:57 +02:00
Jason A. Donenfeld
eb8cab4110
tv: do not redisplay stats when deleting
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-09-22 23:53:54 +02:00
Jason A. Donenfeld
0a36d9a5e9
tv: add tv banner
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-09-22 23:53:51 +02:00
Jason A. Donenfeld
309571039d
tv: use proper icon for button
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-09-22 23:53:49 +02:00
Jason A. Donenfeld
d56f2fb1bb
tv: hide deletion button when nothing to delete
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-09-22 23:53:47 +02:00
Jason A. Donenfeld
9df8e5e239
tv: add ugly deletion mode
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-09-22 23:53:44 +02:00
Jason A. Donenfeld
444a86cc9f
tv: wire in stats
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-09-22 23:53:40 +02:00
Jason A. Donenfeld
382e10e103
tv: wire up tunnel start/stop
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-09-22 23:53:37 +02:00
Jason A. Donenfeld
dc002d77fa
tv: begin to wire up databindings
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-09-22 23:53:32 +02:00
Jason A. Donenfeld
aaa55c0dcc
tv: abstract out tunnel importing
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-09-22 23:53:30 +02:00
Harsh Shandilya
0ad3781ae5
tv: initial draft of Android TV support
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-09-22 23:53:27 +02:00
Jason A. Donenfeld
d738161a2e
Statistics: only do one hash lookup
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-09-21 11:16:33 +02:00
Jason A. Donenfeld
52c2e9cd24
TunnelManager: catch exception in intent receiver
...
java.lang.IllegalStateException:
at android.app.ContextImpl.startServiceCommon (ContextImpl.java:1720)
at android.app.ContextImpl.startService (ContextImpl.java:1675)
at android.content.ContextWrapper.startService (ContextWrapper.java:669)
at com.wireguard.android.backend.GoBackend.startVpnService (GoBackend.java:4)
at com.wireguard.android.backend.GoBackend.setStateInternal (GoBackend.java:4)
at com.wireguard.android.backend.GoBackend.setState (GoBackend.java:2)
at com.wireguard.android.model.TunnelManager$setTunnelState$2$1.invokeSuspend (TunnelManager.java:6)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith (BaseContinuationImpl.java:2)
at kotlinx.coroutines.DispatchedTask.run (DispatchedTask.java:2)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely (CoroutineScheduler.java)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask (CoroutineScheduler.java:7)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker (CoroutineScheduler.java:7)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run (CoroutineScheduler.java:7)
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-09-21 10:54:07 +02:00
Jason A. Donenfeld
5fd1a32ae4
TunnelEditorFragment: do not assume a context
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-09-20 18:08:58 +02:00
Jason A. Donenfeld
655a853857
TunnelListFragment: do not assume binding always exists
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-09-20 18:05:43 +02:00
Jason A. Donenfeld
847da23300
TunnelDetailFragment: use kotlin coroutine for timer and rework nullability
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-09-20 18:03:58 +02:00
Jason A. Donenfeld
d5c07374ff
BaseFragment: avoid using requireContext() in permission result callback
...
java.lang.IllegalStateException:
at androidx.fragment.app.Fragment.requireContext (Fragment.java:17)
at com.wireguard.android.fragment.BaseFragment$setTunnelStateWithPermissionsResult$1.invokeSuspend (BaseFragment.java:4)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith (BaseContinuationImpl.java:2)
at kotlinx.coroutines.UndispatchedCoroutine.afterResume (UndispatchedCoroutine.java:19)
at kotlinx.coroutines.AbstractCoroutine.resumeWith (AbstractCoroutine.java:13)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith (BaseContinuationImpl.java:2)
at kotlinx.coroutines.UndispatchedCoroutine.afterResume (UndispatchedCoroutine.java:19)
at kotlinx.coroutines.AbstractCoroutine.resumeWith (AbstractCoroutine.java:13)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith (BaseContinuationImpl.java:2)
at kotlinx.coroutines.DispatchedTask.run (DispatchedTask.java:2)
at android.os.Handler.handleCallback (Handler.java:790)
at android.os.Handler.dispatchMessage (Handler.java:99)
at android.os.Looper.loop (Looper.java:164)
at android.app.ActivityThread.main (ActivityThread.java:7025)
at java.lang.reflect.Method.invoke (Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:441)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1408)
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-09-20 15:01:35 +02:00
Jason A. Donenfeld
3785752364
version: bump
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-09-20 12:50:11 +02:00
Jason A. Donenfeld
398d8a1e41
AddTunnelsSheet: disable qrcode scanning if no camera
...
Part of the enhancements for Android TV.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-09-20 12:47:13 +02:00
Harsh Shandilya
dfd8ca6f79
ui: add tooling label for exclusions button
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-09-20 13:33:48 +05:30
Harsh Shandilya
7cff4367d7
ui: add navigation hints for D-Pad and IME
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-09-20 13:33:48 +05:30
Jason A. Donenfeld
9eaed5e745
version: bump
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-09-18 20:29:23 +02:00
Harsh Shandilya
68350bb4df
ui: add xhdpi banner resource
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-09-18 20:29:23 +02:00
Jason A. Donenfeld
12be972fcd
SettingsActivity: account for module present but no root
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-09-18 20:29:23 +02:00
Jason A. Donenfeld
d200437813
ui: move to Jetpack DataStore instead of SharedPrefs
...
Hopefully PreferencesPreferenceDataStore gets to go away sometime down
the line.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-09-18 20:29:23 +02:00
Jason A. Donenfeld
3ffe7a5e68
ui: reformat code
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-09-18 14:55:27 +02:00
Jason A. Donenfeld
08ff9f5ece
gradle: downgrade androidx.{fragment,activity} to alpha07
...
The alpha08 version introduced regressions that we can't deal with at
the moment.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-09-17 23:47:14 +02:00
Harsh Shandilya
4bee579e48
ui: retire EdgeToEdge
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-09-17 23:09:05 +05:30
Harsh Shandilya
a906c478c9
ui: replace deprecated onActivityCreated with onViewCreated
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-09-17 20:00:37 +05:30
Harsh Shandilya
306d0648c6
ui: refactor AddTunnelsSheet's selection communication
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-09-17 19:36:44 +05:30
Harsh Shandilya
e99ccf9013
ui: refactor AppListDialogFragment's selection communication
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-09-17 14:51:50 +02:00
Jason A. Donenfeld
59935a12b9
activityx: use contracts more and refine
...
This is the beginning; there are still many of the old API's callsites
to convert.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-09-17 14:50:37 +02:00
Jason A. Donenfeld
a9ec828506
DownloadsFileSaver: encapsulate permission checks
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-09-17 14:50:37 +02:00
Jason A. Donenfeld
eebeece856
LogViewerActivity: simplify scoping
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-09-16 18:01:06 +02:00
Jason A. Donenfeld
746ab00794
ZipExporterPreference: don't ask for storage permissions on newer android
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-09-16 18:01:06 +02:00
Jonathan Davies
b877593d55
libwg-go: use PeekLookAtSocketFd6(), not PeekLookAtSocketFd4()
...
Signed-off-by: Jonathan Davies <jpds@protonmail.com >
Fixes: 3d088411 ("libwg-go: use conn.Bind for socketfd peek")
Cc: David Crawshaw <crawshaw@tailscale.com >
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-09-16 18:01:06 +02:00
Harsh Shandilya
dcd596907a
ui: resolve getColor deprecation in LogViewerActivity
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-09-16 18:01:06 +02:00
Jason A. Donenfeld
44c2afbfba
LogViewerActivity: destroy process when coroutine scope is cancelled
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-09-16 18:01:06 +02:00
Harsh Shandilya
bd1679b7e0
ui: await activity creation to change selected tunnel
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-09-16 18:01:06 +02:00
Harsh Shandilya
ff7d7e0edd
tunnel: document more public API from backend package
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-09-16 18:01:06 +02:00
Harsh Shandilya
2f088938c6
ui: replace GlobalScope with a hand-rolled CoroutineScope
...
GlobalScope has numerous problems[1] that make it unfit for
use in most applications and making it behave correctly requires
an excessive amount of verbosity that's alleviated simply by using
any other scope. Since we run multiple operations in the context
of the application's lifecycle, introduce a new scope that is created
when our application is, and cancelled upon its termination.
While at it, make the scope default to Dispatchers.IO to reduce pressure
on the UI event loop. Tasks requiring access to the UI thread appropriately
switch context making the change completely safe.
1: https://medium.com/@elizarov/the-reason-to-avoid-globalscope-835337445abc
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-09-16 18:01:06 +02:00
Jason A. Donenfeld
53adb0e9a6
Ed25519: use implementation from Tink
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-09-16 18:01:06 +02:00
Harsh Shandilya
6789c11a7b
ConfigNamingDialogFragment: fix focus request for config naming dialog
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-09-16 18:01:06 +02:00
Jason A. Donenfeld
c56065fcfe
TunnelEditorFragment: move backwards using fragment manager instead of hack
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-09-16 18:01:06 +02:00
Jason A. Donenfeld
52a2ae36f6
TunnelEditorFragment: avoid extra trip through event loop
...
onSelectedTunnelChanged is already queueing us to Dispatchers.Main
(rather than Dispatchers.Main.immediate, which would crash, but why?),
so avoid the extra trip through the event loop by toggling the selected
tunnel right away.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-09-16 10:51:56 +02:00
Jason A. Donenfeld
abcb51d2a6
Extensions: use more idiomatic kotlin
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-09-16 10:44:50 +02:00
Jason A. Donenfeld
8b9a40b3d7
global: lint codebase with recent changes
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-09-16 10:37:21 +02:00
Harsh Shandilya
4b36df504c
ui: don't use low-level logger API
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-09-16 13:04:42 +05:30
Harsh Shandilya
35fe5bd5f0
ui: update manifest for API 30 changes
...
- Mark WRITE_EXTERNAL_STORAGE as unused above API 29 since we defer to Storage Access Framework on P and above
- Adds a <queries> tag to allow listing apps for exclusion/inclusion dialog
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-09-16 10:20:10 +05:30
Jason A. Donenfeld
79ae85c728
coroutines: lifecycleScope is by default on Main.immediate
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-09-16 00:00:31 +02:00
Jason A. Donenfeld
49ac61304e
coroutines: use lifecycleScope where appropriate
...
There's still a bit of GlobalScope lingering around, which might be
removable.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-09-15 23:46:11 +02:00
Jason A. Donenfeld
d79cdb0d41
MonkeyedTextInputEditText: au revoir
...
Remember to go back to using com.google.android.material when
1.3.0-alpha03 comes out.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-09-15 18:53:30 +02:00
Jason A. Donenfeld
a3726b07bf
wireguard-tools: bump to fix invalid free
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-09-15 16:21:09 +02:00
Jason A. Donenfeld
80c35a2053
TunnelListFragment: set selection on Main, not Main.immediate
...
Otherwise, we crash when saving the config.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-09-15 16:07:16 +02:00
Jason A. Donenfeld
601b58b670
libwg-go: update to go 1.15.2
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-09-15 13:40:13 +02:00
Jason A. Donenfeld
9cf049775f
MonkeyedTextInputEditText: add note about sunset plan
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-09-15 12:44:55 +02:00
Jason A. Donenfeld
92122e60c6
idea: import new import sorting rules
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-09-15 12:30:15 +02:00
Jason A. Donenfeld
f20d0f0659
gradle: desugar retrofuture and remove old deps
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-09-15 12:30:15 +02:00
Jason A. Donenfeld
9346a63753
gradle: do not use retrofuture in ui
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-09-15 12:30:15 +02:00
Jason A. Donenfeld
bab70ab51e
coroutines: convert the rest
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-09-15 12:30:15 +02:00
Jason A. Donenfeld
2fc0bb1a03
coroutines: convert low-hanging fruits
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-09-14 14:40:10 +02:00
Harsh Shandilya
dd0ff8fe60
ui: remove hacky manual check for keyguard
...
Setting the correct value for the allowedAuthenticators field lets the library correctly detect this by itself as verified on an API 21 emulator
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-09-13 18:34:17 +05:30
Harsh Shandilya
45a179580d
ui: update BiometricAuthenticator for API changes
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-09-13 18:33:17 +05:30
Harsh Shandilya
0bcee7f9cc
ui: fix memory leak from statically held Handler instance
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-09-13 17:52:14 +05:30
Harsh Shandilya
af10b117b4
build: uprev dependencies and fix script block order
...
- buildscript must always be the first block in a Gradle build
- ConstraintLayout, Kotlin and bintray plugin are updated to their latest stable revisions
- Biometrics is updated to the latest alpha release to make use of multiple memory leak fixes that plague the 1.0.x implementations
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-09-13 17:51:30 +05:30
Harsh Shandilya
7aa7825209
build: update to Gradle 6.6.1
...
While praying F-Droid gets their shit together by the time we do our next release
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-08-30 23:23:04 +05:30
Harsh Shandilya
8b7617294e
tools: bump for Android 11 ndc fix
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-08-26 18:59:57 +05:30
Harsh Shandilya
9985b9b08e
build: target SDK 30
...
We're all set to support it from the application side of things.
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-08-25 21:17:05 +05:30
Harsh Shandilya
840d65881e
build: switch fragment and preference to -ktx artifacts
...
Google recommends all dependencies with -ktx variants depend on them directly since they transitively pull in the main artifacts and offer extensions for better usage from Kotlin
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-08-23 01:07:27 +05:30
Harsh Shandilya
c18f6818e8
build: uprev core-ktx and material components
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-08-23 01:07:26 +05:30
Harsh Shandilya
dcd91cad1b
ui: fix SDK 30 deprecation warning for implicit Looper in Handler init
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-08-23 01:03:49 +05:30
Harsh Shandilya
898bb679d2
ui: also enable StrictMode thread policy in debug builds
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-08-23 01:03:48 +05:30
Harsh Shandilya
348d430cd3
build: remove explicit buildToolsVersion
...
AGP sets it automatically, let's rely on that
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-08-23 00:49:11 +05:30
Harsh Shandilya
e3d98633fb
build: update AndroidX dependencies
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-08-23 00:43:25 +05:30
Harsh Shandilya
b451920408
build: uprev to Kotlin 1.4
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-08-23 00:43:14 +05:30
Harsh Shandilya
1fa15e76e3
build: minor cleanups and reorganization
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-08-23 00:42:51 +05:30
Harsh Shandilya
8a58270e03
build: uprev to Gradle 6.6
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-08-12 13:28:00 +05:30
Jason A. Donenfeld
e08d873cc3
version: bump
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-07-24 09:50:31 +02:00
Jason A. Donenfeld
3748a1da88
AdminKnobs: allow enterprise admins to disable private key export
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-07-23 17:35:47 +02:00
Jason A. Donenfeld
9597d719ac
build: bump AGP to 4.0.1
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-07-23 16:04:22 +02:00
Harsh Shandilya
041ce2134f
build: upgrade to Gradle 6.5.1
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-07-10 15:07:54 +05:30
Harsh Shandilya
4c17fc51e7
gitignore: add gradlew.bat
...
We do not support building on Windows for now and deleting this file on every wrapper update is just lame
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-06-25 01:36:31 +05:30
Harsh Shandilya
6cf7439053
gradle: upgrade to 6.5
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-06-25 01:36:30 +05:30
Harsh Shandilya
814ab4937d
build: bump core-ktx, coroutines and fragments
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-06-25 01:30:00 +05:30
David Crawshaw
3d088411e2
libwg-go: use conn.Bind for socketfd peek
...
Signed-off-by: David Crawshaw <crawshaw@tailscale.com >
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-06-22 02:24:55 -06:00
Jason A. Donenfeld
39e0c861e2
tools: bump versions
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-06-07 01:58:02 -06:00
Harsh Shandilya
d60efcd7c7
strings: sync translations
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-06-02 17:52:01 +05:30
Harsh Shandilya
4dff537d21
ui: address new databinding requirements
...
Layouts in differing configurations must agree on their root tags, so we give
both copies of main_activity the same root ID, and adjust the check for
two-pane layout to simply test for nullability. This also changes the inset
dispatch code to use ViewCompat and WindowInsetsCompat since they will adjust
insets based on the SDK level allowing us to abstract away that concern.
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-05-29 12:25:52 +05:30
Harsh Shandilya
761c2ade4a
build: bump to AGP 4.0.0
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-05-29 12:05:24 +05:30
Harsh Shandilya
115a87af32
ui: remove unneeded actionBarPopupTheme attribute
...
This caused inconsistencies between our overflow icon and actionbar title's tint
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-05-09 15:49:43 +05:30
Harsh Shandilya
c7ecaeb145
build: upgrade to gradle 6.4 and track checksum
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-05-09 13:15:57 +05:30
Jason A. Donenfeld
8e2d63db75
tunnel: add windows-style killswitch semantics for GoBackend
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-05-04 02:30:44 -06:00
Harsh Shandilya
3208bac987
build: upgrade to mdc-android 1.2.0-alpha06
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-04-30 18:21:31 +05:30
Harsh Shandilya
fc1f2132fe
build: bump gradle wrapper version in task configuration
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-04-27 14:09:37 +05:30
Harsh Shandilya
09125e1e31
libwg-go: bump go version
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-04-26 04:33:41 +05:30
Harsh Shandilya
6b1164ad8d
ui: switch up dark theme system bars colors
...
The status bar color had a subtle transparency applied which caused
inconsistencies, and the navigation bar color was the wrong shade of
gray.
Reported-by: Danny Lin <danny@kdrag0n.dev >
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-04-26 04:30:26 +05:30
Harsh Shandilya
c68a5c776b
build: bump threetenabp to 1.2.4
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-04-24 19:32:36 +05:30
Harsh Shandilya
f3ac787f5a
ToolsInstaller: update Magisk directory
...
/data/adb/modules has been the location for modules since v18.0 and nobody
should reasonably be on any older version anymore. This has continued to
work for this long because Magisk created symlinks for backwards compat. However,
these symlinks are not created anymore on Android 11, which is where this
problem first surfaced.
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-04-23 01:40:50 +05:30
Harsh Shandilya
751be2c469
build: don't obfuscate code in minify step
...
While Play Console correctly manages to deobfuscate stacktraces using the
ProGuard mapping, it makes user recorded logs useless which is rather
undesirable.
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-04-21 21:36:59 +05:30
Harsh Shandilya
cfb7f1b016
ui: tweak fab animation duration
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-04-19 02:17:27 +05:30
Harsh Shandilya
33e07628db
build: remove unused cardview dependency
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-04-19 02:09:07 +05:30
Harsh Shandilya
b1b7d1d90c
build: upgrade AGP, Kotlin, and preference
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-04-19 02:08:41 +05:30
Harsh Shandilya
6cb9548f72
tunnel: disable LongLogTag lint
...
Should have been part of the patch that disabled this for ui/
Fixes: 8d128cf2e9 ("ui: disable LongLogTag lint")
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-04-19 01:59:51 +05:30
Harsh Shandilya
8207ae1e8d
strings: sync translations
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-04-19 01:48:50 +05:30
Harsh Shandilya
48e0e427eb
ui: animate fab scale rather than translation
...
Suggested-by: Jason A. Donenfeld <Jason@zx2c4.com >
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-04-16 23:14:35 +05:30
Jason A. Donenfeld
03e95d2dd3
ObservableTunnel: account for race in renulling stats
...
The stats might become null between these two checks, when a tunnel
flips off, resulting in a null pointer dereference:
at com.wireguard.android.model.ObservableTunnel.getStatisticsAsync (ObservableTunnel.java:103)
at com.wireguard.android.fragment.TunnelDetailFragment.updateStats (TunnelDetailFragment.java:108)
at com.wireguard.android.fragment.TunnelDetailFragment.access$updateStats (TunnelDetailFragment.java:27)
at com.wireguard.android.fragment.TunnelDetailFragment$onResume$1.run (TunnelDetailFragment.java:74)
at java.util.TimerThread.mainLoop (TimerThread.java:562)
at java.util.TimerThread.run (TimerThread.java:512)
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-04-15 01:57:55 -06:00
Harsh Shandilya
58b14cc650
ui: animate fab position in tunnel deletion flow
...
When tunnel deletion is triggered we don't bother with animation theatrics
because the resulting Snackbar needs this fab to be its anchor, which it can't
do if its outside the screen or busy animating.
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-04-08 19:43:25 +05:30
Harsh Shandilya
3fa8e09545
tunnel: disable BuildConfig generation
...
We don't (and shouldn't) use BuildConfig values, but the class was
polluting our public API regardless which is undesirable.
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-04-08 17:05:31 +05:30
Jason A. Donenfeld
9d76b354f0
version: bump
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-04-08 00:02:37 -06:00
Harsh Shandilya
1856a50c56
strings: sync translations
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-04-08 03:37:01 +05:30
Harsh Shandilya
ba0f3ece04
ui: tweak FABs to use the correct type
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-04-08 03:34:07 +05:30
Harsh Shandilya
e8ad75d924
ui: codestyle nit
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-04-07 14:19:54 +05:30
Jason A. Donenfeld
b858284b1e
KernelModuleDisablerPreference: do not make synchronous calls to getBackend
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-04-07 02:28:34 -06:00
Jason A. Donenfeld
3c6e06f8d5
ui: set proper content description for applications
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-04-06 19:25:05 -06:00
Jason A. Donenfeld
0d33a00e72
version: bump
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-04-06 19:09:25 -06:00
Jason A. Donenfeld
830d0992a7
ui: show excluded/included apps in details view
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-04-06 19:08:57 -06:00
Jason A. Donenfeld
e4192ea172
ui: align listen port and mtu in detail editor
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-04-06 18:43:41 -06:00
Jason A. Donenfeld
4bbb1a0fcd
ui: add suffix to persistent keepalive in editor
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-04-06 18:24:08 -06:00
Jason A. Donenfeld
77b5937fbb
ui: add missing fields to detail view
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-04-06 18:09:03 -06:00
Jason A. Donenfeld
3144d36056
TunnelListFragment: onCreateActionMode is called before adapter is alive
...
Long press a tunnel item. SIGKILL the app. Reenter it. Boom:
kotlin.KotlinNullPointerException:
at com.wireguard.android.fragment.TunnelListFragment$ActionModeListener.onCreateActionMode (TunnelListFragment.java:347)
at androidx.appcompat.app.AppCompatDelegateImpl$ActionModeCallbackWrapperV9.onCreateActionMode (AppCompatDelegateImpl.java:2442)
at androidx.appcompat.app.WindowDecorActionBar$ActionModeImpl.dispatchOnCreate (WindowDecorActionBar.java:1062)
at androidx.appcompat.app.WindowDecorActionBar.startActionMode (WindowDecorActionBar.java:530)
at androidx.appcompat.app.AppCompatDelegateImpl.startSupportActionMode (AppCompatDelegateImpl.java:1055)
at androidx.appcompat.app.AppCompatActivity.startSupportActionMode (AppCompatActivity.java:316)
at com.wireguard.android.fragment.TunnelListFragment$ActionModeListener.setItemChecked (TunnelListFragment.java:371)
at com.wireguard.android.fragment.TunnelListFragment.onActivityCreated (TunnelListFragment.java:174)
at androidx.fragment.app.Fragment.performActivityCreated (Fragment.java:2717)
at androidx.fragment.app.FragmentStateManager.activityCreated (FragmentStateManager.java:346)
at androidx.fragment.app.FragmentManager.moveToState (FragmentManager.java:1188)
at androidx.fragment.app.FragmentManager.moveToState (FragmentManager.java:161)
at androidx.fragment.app.FragmentManager.moveToState (FragmentManager.java:1356)
at androidx.fragment.app.FragmentManager.moveToState (FragmentManager.java:5)
at androidx.fragment.app.FragmentManager.moveFragmentToExpectedState (FragmentManager.java:1434)
at androidx.fragment.app.FragmentManager.moveFragmentToExpectedState (FragmentManager.java:5)
at androidx.fragment.app.FragmentManager.moveToState (FragmentManager.java:1497)
at androidx.fragment.app.FragmentManager.moveToState (FragmentManager.java:389)
at androidx.fragment.app.FragmentManager.dispatchStateChange (FragmentManager.java:2625)
at androidx.fragment.app.FragmentManager.dispatchStateChange (FragmentManager.java:677)
at androidx.fragment.app.FragmentManager.dispatchActivityCreated (FragmentManager.java:2577)
at androidx.fragment.app.FragmentManager.dispatchActivityCreated (FragmentManager.java:9)
at androidx.fragment.app.FragmentController.dispatchActivityCreated (FragmentController.java:247)
at androidx.fragment.app.FragmentActivity.onStart (FragmentActivity.java:541)
at androidx.appcompat.app.AppCompatActivity.onStart (AppCompatActivity.java:201)
at android.app.Instrumentation.callActivityOnStart (Instrumentation.java:1440)
at android.app.Activity.performStart (Activity.java:8109)
at android.app.ActivityThread.handleStartActivity (ActivityThread.java:3806)
at android.app.servertransaction.TransactionExecutor.performLifecycleSequence (TransactionExecutor.java:235)
at android.app.servertransaction.TransactionExecutor.cycleToPath (TransactionExecutor.java:215)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState (TransactionExecutor.java:187)
at android.app.servertransaction.TransactionExecutor.execute (TransactionExecutor.java:105)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2386)
at android.os.Handler.dispatchMessage (Handler.java:107)
at android.os.Looper.loop (Looper.java:213)
at android.app.ActivityThread.main (ActivityThread.java:8178)
at java.lang.reflect.Method.invoke (Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:513)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1101)
This commit avoids the crash. But it's not clear to me that this is
really the right solution. However, in testing it appears to work.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-04-06 15:56:07 -06:00
Jason A. Donenfeld
521bbb4b4c
AppListDialogFragment: refine singular grammar
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-04-06 19:56:53 +05:30
Jason A. Donenfeld
0a55e10b94
AppListDialogFragment: remove colons from tabs
...
Harsh's club became ill upon seeing them.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-04-06 19:56:53 +05:30
Harsh Shandilya
d6e5fd9301
ui: tweak cards to make them nicer on the eyes
...
Surprisingly-requested-by: Jason A. Donenfeld <Jason@zx2c4.com >
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-04-06 19:56:53 +05:30
Harsh Shandilya
2c625f56fd
ui: misc cleanups to AppListDialogFragment
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-04-06 19:56:46 +05:30
Jason A. Donenfeld
7db0fa915e
AppListDialogFragment: support both inclusion and exclusion
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-04-06 02:40:49 -06:00
Jason A. Donenfeld
e424765a61
tunnel: support IncludedApplications as whitelist
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-04-05 20:04:51 -06:00
Harsh Shandilya
1ca4dbf1a2
tunnel: hold peers in an ArrayList
...
A set will cause identical peers to be dropped during save
Reported-by: Jason A. Donenfeld <Jason@zx2c4.com >
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-04-06 01:22:44 +05:30
Harsh Shandilya
065893e31d
MultiselectableRelativeLayout: use JvmOverloads constructor
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-04-06 00:39:22 +05:30
Harsh Shandilya
ef70aa88e1
ui: fix scrolling in detail view
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-04-06 00:17:14 +05:30
Harsh Shandilya
6a11a199ca
strings: sync translations
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-04-04 16:19:21 +05:30
Jason A. Donenfeld
7b5ceac9f7
version: bump
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-04-03 19:07:33 -06:00
Jason A. Donenfeld
9fe0019ec1
tunnel: libwg-go: use deterministic verdef name
...
From the ld.gold source:
const char* name = parameters->options().soname();
if (name == NULL)
name = parameters->options().output_file_name();
That means by default it uses `-o {output}` as the verdef aux name,
which is random every time due to Go's build system. By passing in
`--soname={somethingexplicit}` we can instead have a deterministic
verdef.
This commit makes wireguard-android reproducible.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-04-03 19:07:33 -06:00
Jason A. Donenfeld
84654a0302
gradle: upgrade to 6.3
...
It looks like F-Droid finally updated.
This reverts commit cd43444d1f .
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-04-03 19:07:33 -06:00
Jason A. Donenfeld
cd43444d1f
gradle: downgrade to 6.2.1 to deal with f-droid organizational mismanagement
...
The fdroidserver repo hardcodes hashes of all gradle versions that are
allowed to be used. This is currently up to date, having 6.3. However,
the f-droid build server is not up to date, because it is controlled by
the founder of f-droid, who is generally unavailable and does not update
it. Meanwhile other members of the project would like to stand up their
own build server instance, but this seems potentially arduous and
there's still the question of the signing key. At least that's the story
I was able to glean from asking around.
So, in order to work around this organizational brokeness, we just
downgrade to 6.2.1.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-04-01 23:43:24 -06:00
Jason A. Donenfeld
b7028896c7
ObservableTunnel: do not cache key
...
Reported-by: Reza Island's <rezza.aji.ras@gmail.com >
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-04-01 22:05:24 -06:00
Jason A. Donenfeld
c1e86acb3c
tunnel: libwg-go: remove -x option from flock
...
It's already the default and the macOS port of flock doesn't support it.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-04-01 22:05:24 -06:00
Harsh Shandilya
7d31bd2be9
build: update fragment to 1.2.4
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-04-01 22:05:24 -06:00
Jason A. Donenfeld
2e573a66a4
build: update agp to 3.6.2
...
Harsh likes to be first in line.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-04-01 22:05:24 -06:00
Harsh Shandilya
8d128cf2e9
ui: disable LongLogTag lint
...
We know what we're doing
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-03-31 03:48:00 +05:30
Jason A. Donenfeld
d5ffa08480
TunnelEditorFragment: don't show bioauth if already visible
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-30 14:53:25 -06:00
Jason A. Donenfeld
43ce69bef4
version: bump
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-30 14:14:54 -06:00
Harsh Shandilya
44a0f53e58
strings: sync translations
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-03-30 14:08:24 -06:00
Jason A. Donenfeld
d74b988f75
global: cleanup code style
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-30 13:57:43 -06:00
Harsh Shandilya
10e910186e
ui: update proguard rules to keep crash logs readable
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-03-30 13:49:41 -06:00
Jason A. Donenfeld
017f420d42
LogViewerActivity: don't crash if pipe closes
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-30 03:25:47 -06:00
Jason A. Donenfeld
bc186fe6ad
TunnelDetail: set singleLine=true for API <=23
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-30 03:23:32 -06:00
Jason A. Donenfeld
09b40cdec7
BiometricAuthenticator: rework logic and bugs
...
Otherwise there's a frameworks bug that causes the fragment's activity
to become null.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-30 03:23:32 -06:00
Harsh Shandilya
d2721f2d7d
BiometricAuthenticator: implement biometric authentication for sensitive operations
...
When biometric hardware is available, it will be used to authenticate
the user before private keys are shown on screen or when zip exports
are executed.
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-03-30 03:23:32 -06:00
Harsh Shandilya
3095e19e13
ObservableTunnel: Don't cache configAsync
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-03-30 03:23:32 -06:00
Jason A. Donenfeld
c547d033c3
ui: replace generate icon with 'sync' instead of 'toys'
...
I dislike this change, but Harsh thinks the toys icon is utterly insane
and maybe he's right.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-30 03:23:32 -06:00
Jason A. Donenfeld
4d4764eefb
BindingAdapters: use sleeker lambda
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-30 03:23:32 -06:00
Jason A. Donenfeld
d44a83faaa
TunnelEditorFragment: add hooks for biometric auth
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-30 03:23:32 -06:00
Vincenzo Reale
2337fe37be
strings: update Italian translation
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-29 17:26:14 -06:00
Jason A. Donenfeld
c5b71cb484
README: mention translations
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-29 17:16:09 -06:00
Jason A. Donenfeld
480c95d4d6
ui: remove unused stream support
...
The tunnel/ module still uses it and exposes it as an "api", but nothing
inside of ui/ should be using it now.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-29 17:00:31 -06:00
Harsh Shandilya
8a45e965eb
strings: Sync German translations
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-03-29 14:10:39 +05:30
Jason A. Donenfeld
c9717693d0
tunnel: libwg-go: check sha256 of downloaded tarball
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-29 02:36:29 -06:00
Jason A. Donenfeld
0fa3fe3d43
tunnel: libwg-go: stick go tarball in gradle cache
...
This way we don't have to build over and over.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-29 02:28:41 -06:00
Jason A. Donenfeld
ed090f7ecb
strings: fix positional specifier in russian translation
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-29 01:52:01 -06:00
Jason A. Donenfeld
f916f96761
tunnel: libwg-go: prevent parallel downloads
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-29 01:31:39 -06:00
Jason A. Donenfeld
79e766c4e1
tunnel: fix package name being passed through to cmake
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-29 01:18:46 -06:00
Harsh Shandilya
183273dcf5
AddTunnelsSheet: Make behaviour nullable
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-03-29 11:04:59 +05:30
Harsh Shandilya
b3bb7c694b
build: Improve R8 rules and enable aggressive optimization modes
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-03-29 10:52:54 +05:30
Jason A. Donenfeld
456a74db05
global: hardcode tags so that minification doesn't ruin the log
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-28 23:21:12 -06:00
Jason A. Donenfeld
fde724a658
version: bump
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-28 23:07:50 -06:00
Jason A. Donenfeld
574ee5d0bb
LogViewerActivity: only scroll every quarter for the first 2.5 seconds of dumping
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-28 23:07:50 -06:00
Harsh Shandilya
03a838ba2d
ui: Remove unnecessary non-null assertion in TAG fields
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-03-28 23:07:50 -06:00
Harsh Shandilya
b00aacbc41
Fix tunnel editor theming
...
Also set textInputStyle in the base theme to avoid setting styles to all elements
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-03-28 22:38:04 -06:00
Jason A. Donenfeld
532c33a13b
MonkeyedTextInputEditText: make more robust
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-28 22:38:04 -06:00
Jason A. Donenfeld
6a7396bc1d
ui: use kotlin class instead of java class for tag
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-28 16:26:22 -06:00
Jason A. Donenfeld
870b2bf36d
ObservableTunnel: do not cache stats
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-28 16:26:22 -06:00
Jason A. Donenfeld
07b69be7bf
TunnelEditor: fix up allowedips margins
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-28 16:26:22 -06:00
Jason A. Donenfeld
b41640837c
TunnelEditor: get rid of weird gravity on add peer button
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-28 16:26:22 -06:00
Jason A. Donenfeld
bee6ebe3b4
TunnelEditor: move generate button to inside box
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-28 16:26:22 -06:00
Jason A. Donenfeld
5989298d3f
TunnelEditor: subdue section font
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-28 16:26:22 -06:00
Jason A. Donenfeld
0235f19543
TunnelEditor: abstract out section font
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-28 16:26:22 -06:00
Jason A. Donenfeld
cd6c2f68ca
TunnelEditor: properly align mtu and listen port
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-28 16:26:22 -06:00
Jason A. Donenfeld
75252cf9d5
TunnelEditor: move hint to label and add discouraged optional
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-28 16:26:22 -06:00
Jason A. Donenfeld
1da714852f
TunnelEditor: clean up xml
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-28 16:26:22 -06:00
Jason A. Donenfeld
fe6b788f6b
MonkeyedTextInputEditText: introduce a new horror
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-28 16:26:22 -06:00
Harsh Shandilya
fb3fec299f
TunnelEditor: replace tunnel detail view with ConstraintLayout implementation
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-03-28 15:22:11 -06:00
Harsh Shandilya
d2f435b265
ClipboardUtils: Update to handle TextInputEditText
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-03-28 15:22:06 -06:00
Harsh Shandilya
3a163acd6d
gradle: Remove useless comment
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-03-28 19:50:34 +05:30
Harsh Shandilya
df4bf9b688
Disable screen capture in tunnel editor
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-03-28 19:49:54 +05:30
Harsh Shandilya
0f67a2f194
Upgrade streamsupport dependency
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-03-28 19:21:53 +05:30
Jason A. Donenfeld
b75946af46
TunnelComparator: naturally sort tunnel list
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-28 01:42:06 -06:00
Harsh Shandilya
b9b188693c
strings: Sync from Crowdin
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-03-28 02:55:21 +05:30
Harsh Shandilya
9fe008d407
ObservableTunnel: Don't recurse in getConfig
...
The correct way to retrieve the value inside a getter/setter is to use `field` to ensure
you don't invoke the getter while inside the getter and trigger a stack overflow
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-03-28 02:35:01 +05:30
Jason A. Donenfeld
e905c355f9
README: mention docs location
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-27 14:26:08 -06:00
Alexey
12821fb70d
strings: update Russian translate
...
Signed-off-by: Alexey <zasranecc@bk.ru >
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-27 13:31:20 -06:00
Jason A. Donenfeld
2aaa316280
gradle: bump threetenabp to 1.2.3
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-27 13:20:51 -06:00
Jason A. Donenfeld
918d9b8b1f
databinding: simplify and address warnings
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-27 15:38:04 +05:30
Harsh Shandilya
536a6f3f83
ui: Replace ErrorMessages getter with indexing operator
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-03-27 15:38:04 +05:30
Harsh Shandilya
b9fd3d37f2
Convert ErrorMessages to Kotlin
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-03-27 15:38:04 +05:30
Harsh Shandilya
e0b87c3ff2
Convert AsyncWorker to Kotlin
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-03-27 03:09:24 -06:00
Jason A. Donenfeld
48a9fd46a6
databinding: rewrite in kotlin
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-27 03:08:47 -06:00
Jason A. Donenfeld
8669c01eaa
util: begin conversion to kotlin
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-27 03:08:47 -06:00
Jason A. Donenfeld
37949ba1ec
TunnelManager: convert to kotlin
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-26 23:21:54 -06:00
Harsh Shandilya
b2bbaf050c
util: Start converting to Kotlin
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-03-26 22:33:01 -06:00
Jason A. Donenfeld
4d6837ea53
ObservableTunnel: port to kotlin
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-26 22:30:10 -06:00
Jason A. Donenfeld
c8ac970d11
LogViewerActivity: merge lines that don't match regex
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-26 16:59:54 -06:00
Jason A. Donenfeld
a3a429bc41
LogViewerActivity: re-add error case to log export
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-26 15:58:02 -06:00
Alexey
0726b1b4d9
strings: update Russian translate
...
Signed-off-by: Alexey <zasranecc@bk.ru >
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-26 15:43:41 -06:00
Jason A. Donenfeld
defc4f45ff
LogViewerActivity: constify request
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-26 14:56:13 -06:00
Jason A. Donenfeld
a984127e28
LogViewerActivity: set a separate title
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-03-26 14:59:31 +05:30
Jason A. Donenfeld
85dd303c88
ui: root: rewrite in kotlin
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-26 01:55:44 -06:00
Jason A. Donenfeld
2958144fd0
ui: cleanup various pieces of kotlin
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-26 00:51:36 -06:00
Jason A. Donenfeld
ade8f18a95
xml: cleanup
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-26 00:49:01 -06:00
Jason A. Donenfeld
46e2e29ead
preferences: add key to all items to squelch warnings
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-26 00:49:01 -06:00
Harsh Shandilya
63a395125a
Introduce realtime log viewer
...
This contains a share button and a save button, the former using a
custom content provider.
Co-authored-by: Jason A. Donenfeld <Jason@zx2c4.com >
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-26 00:49:01 -06:00
Alexey
6f973afa36
strings: update Russian translate
...
Signed-off-by: Alexey <zasranecc@bk.ru >
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-25 12:43:54 -06:00
Harsh Shandilya
1ad0ef3f61
LogExporterPreference: Don't ask for storage permissions on Android 10 and above
...
We use the proper MediaStore implementation on Android 10 which makes it unnecessary.
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-03-25 21:02:02 +05:30
Eiji Tanioka
90bf46e8d3
strings: Explicit indexing for 'import_partial_success'
...
When translate it to Japanese, values are exchanged.
For example, '1 of 10' is '10 個中の 1'.
So this string should be explicit indexed.
Signed-off-by: Eiji Tanioka <tanioka404@gmail.com >
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-03-25 20:23:45 +05:30
Harsh Shandilya
c1c285db86
Upgrade to Gradle 6.3
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-03-25 02:05:12 +05:30
Jason A. Donenfeld
f1b541a1eb
ui: squelch warnings
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-24 14:17:18 -06:00
Jason A. Donenfeld
585257c995
TunnelManager: disallow remote apps for L
...
I don't trust old Android versions to have gotten this right.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-24 14:17:15 -06:00
Harsh Shandilya
93f80cdc50
Resolve manifest warnings
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-03-24 11:30:28 +05:30
Jason A. Donenfeld
a832193010
TunnelManager: save settings before restart
...
Otherwise these get lost and then the restored state is confusing.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-23 18:14:23 -06:00
Harsh Shandilya
383659fb8a
Upgrade to Kotlin 1.3.71
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-03-23 22:50:04 +05:30
Jason A. Donenfeld
4725e55090
libwg-go: update go modules
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-22 14:08:20 -06:00
Jason A. Donenfeld
07c85ee6f5
version: bump
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-22 13:09:09 -06:00
Jason A. Donenfeld
c02dd9e040
Preferences: hide advanced settings
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-22 01:50:58 -06:00
Jason A. Donenfeld
7dae94976d
SettingsActivity: remove from parent instead of fixed screen
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-22 01:23:23 -06:00
Jason A. Donenfeld
38c360cb74
libwg-go: bump go version
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-22 01:07:20 -06:00
Jason A. Donenfeld
edba640641
TunnelManager: enable Tasker support
...
Also fix up wording for the permission prompt that Tasker will show when
initially setting this up.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-22 00:51:37 -06:00
Jason A. Donenfeld
cf25ae4448
model: begin conversion
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-22 00:19:09 -06:00
Eiji Tanioka
e86182af56
strings: Update Japanese translation.
...
Signed-off-by: Eiji Tanioka <tanioka404@gmail.com >
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-03-21 19:18:36 +05:30
Jason A. Donenfeld
902a1ce46e
viewmodel: port to kotlin
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-21 03:06:56 -06:00
Harsh Shandilya
55849cad65
Replace PermissionRequestCallback with direct methods
...
These are much cleaner in Kotlin code.
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-03-20 22:22:56 -06:00
Harsh Shandilya
edb76af820
build: Load keystore file from rootProject
...
Since the signing config is also stored in the project root it makes sense to have storeFile
path be relative to it.
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-03-20 22:22:56 -06:00
Harsh Shandilya
04d0b819f6
Convert activity package to Kotlin
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-03-20 22:22:56 -06:00
Jason A. Donenfeld
85aa5fbd46
AddTunnels: rearrange and relabel
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-20 02:56:10 -06:00
Jason A. Donenfeld
1054e54c89
widget: rewrite in kotlin
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-20 02:46:01 -06:00
Jason A. Donenfeld
2fe5b92035
EdgeToEdge: move into widget
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-20 02:28:49 -06:00
Fiqri Ardyansyah
3a5a161c03
strings: Update Indonesian translation
...
Signed-off-by: Fiqri Ardyansyah <fiqri15072019@gmail.com >
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-03-19 18:56:05 -06:00
Jason A. Donenfeld
8451321a79
preferences: rewrite in kotlin
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-19 18:55:45 -06:00
Jason A. Donenfeld
90050a0008
TunnelListFragment: cleanup list type
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-19 17:52:51 -06:00
Jason A. Donenfeld
87c9efce4a
TunnelListFragment: catch all parsing exceptions
...
Otherwise we crash if weird things happen.
Reported-by: Luis Ressel <aranea@aixah.de >
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-19 13:05:53 -06:00
Jason A. Donenfeld
240e049e46
InetEndpoint: return proper parser exception
...
Wrapping this in something foreign doesn't make sense.
Reported-by: Luis Ressel <aranea@aixah.de >
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-19 13:04:31 -06:00
Harsh Shandilya
0899b49bb3
Use more Kotlin-esque code where applicable
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-03-19 14:45:07 +05:30
Harsh Shandilya
fc0660ca8d
ui: Convert fragment package to Kotlin
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-03-19 09:24:48 +05:30
Harsh Shandilya
b2ed5dbbc8
codestyle: Require atleast 10 references before using star imports
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-03-19 09:24:48 +05:30
Harsh Shandilya
94c864503e
ui: Convert configStore package to Kotlin
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-03-19 09:24:47 +05:30
Eiji Tanioka
c387c6aebf
strings: Update Japanese Translation
...
Signed-off-by: Eiji Tanioka <tanioka404@gmail.com >
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-03-19 09:16:16 +05:30
Harsh Shandilya
55c9d39c13
strings: Remove now defunct translations
...
The original strings are removed.
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-03-18 15:18:02 +05:30
Jason A. Donenfeld
6a3b143876
preference: restart application immediately
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-17 23:51:41 -06:00
Shashank Baghel
5f29abfa0d
strings: update Hindi translation
...
Signed-off-by: Shashank Baghel <theradcolor@gmail.com >
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-17 21:46:13 -06:00
Fiqri Ardyansyah
ea3364ac12
strings: add Indonesian translations
...
Signed-off-by: Fiqri Ardyansyah <fiqri15072019@gmail.com >
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-03-17 21:45:16 -06:00
Harsh Shandilya
2b31eac1af
publish.gradle: Use non-deprecated API to prevent eager configuration of tasks
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-03-14 10:44:52 +05:30
Harsh Shandilya
093139bc91
tunnel: Add an initial set of unit tests
...
Includes a control set of broken configuration files that we attempt to parse and
verify that the parser fails in a predictable and consistent manner.
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-03-14 10:32:12 +05:30
Harsh Shandilya
6c8a4a6a28
tunnel: Remove MISSING_VALUE from BadConfigException reasons
...
This is covered under SYNTAX_ERROR which feels like a reasonable choice,
so get rid of this unused field and associated resource string.
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-03-14 10:25:57 +05:30
Jason A. Donenfeld
f5d2fd6190
config: show missing section error correctly
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-13 13:20:34 -06:00
LilligantMatsuri
4d77bd8f25
strings: update Simplified Chinese translation
...
Signed-off-by: LilligantMatsuri <srb12345@vip.qq.com >
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-03-12 17:26:36 +05:30
Eiji Tanioka
1068adbee3
strings: update Japanese translation
...
Signed-off-by: Eiji Tanioka <tanioka404@gmail.com >
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-12 01:26:56 -06:00
Jason A. Donenfeld
86fc518585
tunnel: replace CompletableFuture with GhettoCompletableFuture
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-12 01:14:13 -06:00
Jason A. Donenfeld
78377a5c67
tunnel: we return Optional types so mark retrostreams as api
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-12 00:23:03 -06:00
Jason A. Donenfeld
56f2dcc073
tunnel: add javadoc support
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-11 00:29:18 -06:00
Alexey
48739b4141
strings: update Russian translate
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-11 00:29:18 -06:00
Jason A. Donenfeld
704c344213
tunnel: the external API does not expose java9
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-10 11:52:30 -06:00
Jason A. Donenfeld
ee263ba68e
README: note JCenter addition
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-10 11:49:04 -06:00
Jason A. Donenfeld
692b71af23
tunnel: tools: update to latest go
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-10 22:12:16 +05:30
Jason A. Donenfeld
7e029f1db0
ModuleDownloaderPreference: remove disable_kernel_module after downloading
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-10 22:12:16 +05:30
Jason A. Donenfeld
d4875afe31
tunnel: make use of @RestrictTo
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-10 22:12:16 +05:30
Jason A. Donenfeld
de0e431d00
build: abstract out groupName
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-10 22:12:12 +05:30
Jason A. Donenfeld
6b304391b5
global: java access control has important semantic meaning
...
It's not right to blindly follow all of AndroidStudio's suggestions,
especially for things in tunnel/ which comprise useful API.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-10 08:44:38 -06:00
Harsh Shandilya
8f85e4c88f
tunnel: Codestyle cleanups
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-03-10 13:20:16 +05:30
Harsh Shandilya
a3b9c3b884
ui: Codestyle cleanups
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-03-10 13:08:28 +05:30
Harsh Shandilya
021e16959f
Upgrade to Gradle 6.2.2
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-03-10 12:45:06 +05:30
Harsh Shandilya
37adab76e1
BaseFragment: Always anchor Snackbars to FAB
...
This makes tunnel list fragment correctly render them above the FAB.
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-03-10 12:32:23 +05:30
Jason A. Donenfeld
5d342ee1ab
tunnel: upload aar to bintray
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-10 00:29:38 -06:00
Jason A. Donenfeld
697d131397
strings: remove stale translations
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-09 22:32:56 -06:00
Jason A. Donenfeld
89d9e30025
build: apply version to both modules
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-09 21:54:27 -06:00
Jason A. Donenfeld
dfde86df76
Version bump
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-09 17:31:52 -06:00
Jason A. Donenfeld
d55fb25a40
KernelModuleDisablerPreference: turn off tunnels before switching backend
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-09 16:18:55 -06:00
Jason A. Donenfeld
492fcce053
KernelModuleDisabler: allow disabling the kernel module backend
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-09 15:21:34 -06:00
Jason A. Donenfeld
d61f17dbd3
Preferences: give dual state summary for restore on boot
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-09 14:54:20 -06:00
Jason A. Donenfeld
8996979dc2
Preferences: reorder new checkbox
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-09 14:49:31 -06:00
Jason A. Donenfeld
31ddb242a6
VersionPreference: reverse go and wgquick titles
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-09 14:48:02 -06:00
Jason A. Donenfeld
b7b5d96b3b
TunnelDetailFragment: avoid integer overflow
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-09 12:38:38 -06:00
Jason A. Donenfeld
2e55e5fd05
global: format code
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-09 12:36:47 -06:00
Jason A. Donenfeld
40ebf8006e
global: optimize imports
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-09 12:21:35 -06:00
Jason A. Donenfeld
8e8643122e
global: get rid of nonnull gradle hack
...
Hacking things up via gradle is not right, and package-info.java poses
problems with two modules, so instead we just apply it manually to every
class.
Remember to add this to new classes!
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-09 12:19:15 -06:00
Jason A. Donenfeld
c00a0b12e4
Application: simplify static block
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-09 12:16:02 -06:00
Jason A. Donenfeld
0e21520fd1
gradle: use optimized proguard rules
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-09 11:29:17 -06:00
Harsh Shandilya
0db233e5c7
Use dark system bars on API 21
...
Light system bars didn't come around until API 23.
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-03-09 22:12:14 +05:30
Jason A. Donenfeld
b9948085a4
ThemeChangeAwareActivity: recreate activity after changing theme
...
API 21 had issues without this.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-09 10:39:04 -06:00
Jason A. Donenfeld
d62526fde6
WgQuickBackend: by default use single-tunnel mode like GoBackend, but add option
...
Note that this currently doesn't play well with people activating
wg-quick tunnels from outside the app. Those tunnels won't be
deactivated. But presumably that's desired behavior anyway, considering
people are mucking around at the command line.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-09 10:02:00 -06:00
Jason A. Donenfeld
134f9c014e
ObservableTunnel: pass right argument to state transition
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-09 09:55:05 -06:00
Jason A. Donenfeld
056cf472d9
ModuleLoader: move to right project
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-09 09:07:48 -06:00
Jason A. Donenfeld
0c161cc0c2
AsyncWorker: move back to original location
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-09 08:59:37 -06:00
Harsh Shandilya
7894894610
Use AndroidX Nullable annotation everywhere
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-03-09 19:24:27 +05:30
Harsh Shandilya
7d48bef70a
Rename app module to ui
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-03-09 19:24:27 +05:30
Harsh Shandilya
6bc3e257f8
Enable nonnull generation for tunnel module
...
Also cleanup nonnull.gradle while we're at it
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-03-09 19:24:26 +05:30
Harsh Shandilya
adc613d801
Migrate tunnel related classes to tunnel/ Gradle module
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-03-09 19:24:26 +05:30
Jason A. Donenfeld
fd573f6c1c
ToolsInstaller: restrict to only main app usage
...
We don't want lots of different packages fighting over who gets to
install the tools.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-09 05:07:27 -06:00
Jason A. Donenfeld
1235e966d2
ToolsInstaller: remove versioning
...
Not ideal, but allows us to get rid of the BuildConfig requirement.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-09 05:07:02 -06:00
Jason A. Donenfeld
e6a2f049ea
RootShell: remove need for BuildConfig
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-09 04:48:58 -06:00
Jason A. Donenfeld
d9e9dd04af
Tunnel: move state change into interface
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-09 04:46:17 -06:00
Harsh Shandilya
3c2fa15dc2
Fix tablet mode crashes and UI inconsistencies
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-03-09 10:50:36 +05:30
Harsh Shandilya
e8c9c20570
MainActivity: Dispatch insets to all fragments
...
Fixes tunnel list fragment rendering behind statusbar when other fragments are showing
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-03-09 10:32:48 +05:30
Harsh Shandilya
0db2578ca0
Switch to CoordinatorLayout for activity container
...
Snackbars use it to infer the right margins
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-03-09 10:32:03 +05:30
Harsh Shandilya
e71d6157f1
Add coordinatorlayout dependency and sort
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-03-09 10:20:14 +05:30
Harsh Shandilya
7ca2a0df18
global: Use requireContext rather than getContext in fragments
...
requireContext provides helpful error messages when it's null as opposed to getContext
which simply throws a NullPointerException.
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-03-09 10:12:50 +05:30
Jason A. Donenfeld
7a4af834c2
Backend: do not use singletons
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-08 20:23:25 -06:00
Jason A. Donenfeld
314a0d124d
GoBackend: setConfigureIntent does nothing
...
It's only used from the ManageDialog in VpnDialogs, which in turn is
only instantiated in the legacy VPN path.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-08 19:52:57 -06:00
Jason A. Donenfeld
6f1e86e8a7
ToolsInstaller: do not use R
...
This is horible! But ToolsInstaller uses lots of other error strings
nakedly, as does ModuleLoader. These both need to be fixed up the proper
way (like the last two commits). This commit here is just to make the
initial porting a bit easier.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-09 01:42:38 +08:00
Jason A. Donenfeld
840c7ea560
RootShell: properly use errormessages
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-09 01:36:01 +08:00
Jason A. Donenfeld
1839730663
ModuleDownloaderPreference: properly use errormessages
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-09 01:28:41 +08:00
Jason A. Donenfeld
afd75cc4cf
ErrorMessages: do not use R from backend
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-09 00:58:32 +08:00
Jason A. Donenfeld
453a1aaa65
ErrorMessages: do not traverse down into remote exceptions
...
Otherwise we miss the actual error message.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-09 00:19:56 +08:00
Jason A. Donenfeld
4905185e61
backend: do not depend on anything except config
...
This is likely broken but should make for a good starting point.
It also should hopefully handle stopping tunnels before starting new
ones, in the case of the GoBackend. Again, untested.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-03-09 00:19:42 +08:00
Harsh Shandilya
0990430513
Upgrade AGP and Kotlin
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-03-08 14:05:45 +08:00
Shashank Baghel
7df13a044f
Add Hindi translation
...
Signed-off-by: Shashank Baghel <theradcolor@gmail.com >
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-03-08 14:05:36 +08:00
Harsh Shandilya
6135a1f60a
MainActivity: Remove unused imports
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-02-28 13:25:28 +05:30
Harsh Shandilya
5e94adc73a
ModuleLoader: Staticize isModuleLoaded
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-02-28 13:16:31 +05:30
Harsh Shandilya
44fc0228a9
Upgrade to build tools 29.0.3
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-02-28 12:28:02 +05:30
Harsh Shandilya
4d2bfe3ef3
Resolve some lint and build warnings
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-02-26 20:26:49 +05:30
LilligantMatsuri
7f37ff032f
Add Simplified Chinese translation
...
Signed-off-by: LilligantMatsuri <srb12345@vip.qq.com >
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-02-25 22:04:01 -06:00
Eiji Tanioka
30d508464f
remove <item quantity=one> tag due to no plural form in Japanese.
...
Signed-off-by: Eiji Tanioka <tanioka404@gmail.com >
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-02-25 22:00:15 -06:00
Harsh Shandilya
75b0fed00d
ThemeChangeAwareActivity: Remove drawable cache buster
...
Shouldn't be needed anymore.
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-02-25 17:14:52 +05:30
Harsh Shandilya
927cc1fcf5
Make exclusions dialog fit more items in viewport
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-02-25 14:23:28 +05:30
Harsh Shandilya
b3090e277a
MainActivity: Fix backstack bug exposed by fragment 1.2.2
...
We've been relying on implicit backstack changes to handle removing the detail fragment for a while which is now gone so let's do this properly like we should
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-02-25 14:23:28 +05:30
Harsh Shandilya
0b45151a3d
Resolve deprecation warnings
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-02-25 09:53:01 +05:30
Harsh Shandilya
eb5bfa9b5d
Cleanup inset dispatch code
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-02-25 09:53:00 +05:30
Harsh Shandilya
4267e94dcd
Replace FrameLayouts with recommended FragmentContainerView
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-02-25 08:57:29 +05:30
Harsh Shandilya
fac9e7612f
Add fragment dependency
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-02-25 08:57:28 +05:30
Harsh Shandilya
01e8e535f4
Ensure insets are dispatched to all fragments
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-02-25 08:57:28 +05:30
Harsh Shandilya
e5e2e7571f
Setup EdgeToEdge
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-02-25 08:57:27 +05:30
Harsh Shandilya
c889a8c8de
Add EdgeToEdge and coreKtx dependency
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-02-25 08:57:26 +05:30
Harsh Shandilya
cbf2ea7b48
Target JVM 1.8 from Kotlin as well
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-02-25 08:57:26 +05:30
Harsh Shandilya
8078347880
Upgrade AGP and Gradle
...
If anybody has a problem with missing or mismatched NDK, run this command to install the right version
$ANDROID_SDK_ROOT/tools/bin/sdkmanager 'ndk;20.0.5594570'
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-02-25 08:29:53 +05:30
Harsh Shandilya
dd8a802bec
Resolve format string warnings
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-02-23 18:55:09 +05:30
Harsh Shandilya
6f6602ddd1
AppListDialogFragment: Revamp toggle logic
...
Rather than always toggle all elements, elect to unselect all if any are selected. This allows
returning to a clean state in at most two clicks.
Suggested-by: Jason A. Donenfeld <Jason@zx2c4.com >
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-02-23 15:07:39 +05:30
Harsh Shandilya
33e69db436
AppListDialogFragment: Code cleanup
...
- Using the require_() methods provides helpful error messages when things are null
compared to the get_() methods which throw NPEs.
- Ensure currentlyExcludedApps is empty but never null
- Rename inner variable to silence name shadowing lint
- Make setExclusionsAndDismiss private
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-02-23 15:07:39 +05:30
Eiji Tanioka
13cbec28d6
Japanese translation: change "Deselect All" to "Toggle All"
...
Fixes: 1eb4ce7 ("AppListDialogFragment: change "Deselect All" to "Toggle All"")
Signed-off-by: Eiji Tanioka <tanioka404@gmail.com >
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-02-23 10:11:14 +01:00
Sébastien LEBEAU
826083adf6
AppListDialogFragment: change "Deselect All" to "Toggle All"
...
Change functionality in excluded apps dialog for better user experience
when user wants only one or few apps to use WireGuard.
Signed-off-by: Sébastien LEBEAU <sebcbi1@gmail.com >
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-02-23 10:11:12 +01:00
Harsh Shandilya
a62bd28e1f
SharedLibraryLoader: Fix leaked Closeable warning
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-02-16 15:07:21 +05:30
Harsh Shandilya
da1188c6ee
Record StrictMode failures to logcat
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-02-16 15:07:20 +05:30
Eiji Tanioka
e22cefbfe3
Add japanese translation.
...
Signed-off-by: Eiji Tanioka <tanioka404@gmail.com >
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-02-15 00:06:18 -06:00
Harsh Shandilya
02ea696070
Port tunnel creation UI from Viscerion
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-02-14 15:27:17 +05:30
Harsh Shandilya
d25702d99d
Implement custom theming to match Google's AOSP design
...
Closes : #4
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-02-12 15:23:53 +01:00
Jason A. Donenfeld
c554413327
Attribute: remove need for android TextUtils
...
If this is to be JRE-only, then it doesn't make sense to rely on the
android class, especially since this is so trivial to inline.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-02-10 17:04:34 +01:00
Jason A. Donenfeld
f8c5f238ea
InetAddresses: don't have global android import
...
This allows a proper fallback on normal JRE.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-02-10 16:55:34 +01:00
Alexey
66b46c8618
Update Russian translation
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-02-09 11:27:30 +01:00
Jason A. Donenfeld
04689d37b7
version: bump
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-02-06 22:01:03 +01:00
Jason A. Donenfeld
e041cacf4b
wg: bump to latest snapshot
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-02-06 22:01:03 +01:00
Alexey
f54fc92b14
Add Russian translation
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-02-06 22:01:03 +01:00
Jason A. Donenfeld
6e7b6bcc35
wg-go: bump go requirement
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-02-03 17:21:34 +01:00
Jason A. Donenfeld
e70d5be535
wg: remove mnl dependency and bump dep
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-02-03 17:09:45 +01:00
Jason A. Donenfeld
2ce51c8c2e
version: bump
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-01-24 15:36:50 +01:00
Jason A. Donenfeld
c621ec0c50
GoBackend: restrict APIs to proper version
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-01-24 15:36:27 +01:00
Harsh Shandilya
2ed2a1431d
Upgrade to Gradle 6.1
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-01-24 09:57:25 +05:30
Harsh Shandilya
3a425394ca
GoBackend: Ensure we're unmetered on API 29 as well
...
VPN apps targetting Android 10 are treated as metered by default.
Source: https://developer.android.com/reference/android/net/VpnService.Builder.html#setMetered(boolean)
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2020-01-24 09:51:48 +05:30
Jason A. Donenfeld
d98ba463ad
version: bump
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-01-23 16:12:26 +01:00
Jason A. Donenfeld
c3d97acb31
Rework timer in tunnel detail
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-01-23 16:12:26 +01:00
Jason A. Donenfeld
8dbd464fa4
Match lowercase asus phones for fab hack
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-01-23 16:10:34 +01:00
Jason A. Donenfeld
63a5bb1bbf
manifest: reorder
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-01-23 16:10:34 +01:00
Jason A. Donenfeld
8c03878808
tools: update deps
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-01-23 13:46:29 +01:00
Jason A. Donenfeld
d29e50e50b
GoBackend: set empty underlying networks
...
https://lists.zx2c4.com/pipermail/wireguard/2020-January/004859.html
https://issuetracker.google.com/issues/114309459
https://developer.android.com/about/versions/pie/android-9.0-changes-all#network-capabilities-vpn
Apparently we need to call this at least once.
Reported-by: Andrey Kupreychik <foxel@quickfox.ru >
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-01-23 13:45:08 +01:00
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
xalloc
10d0807395
Add Italian translation
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2020-01-22 20:56:06 +01:00
Jason A. Donenfeld
0a89c87190
tools: bump to new wireguard-tools repo
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2019-12-27 16:49:30 +01:00
Jason A. Donenfeld
a7df92a64c
Version bump
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2019-12-20 11:31:58 +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
8261a18472
Use RequiresApi instead of TargetApi
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2019-12-20 11:14:38 +01:00
Harsh Shandilya
a9f04c0bf4
Update AGP to 3.5.3
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2019-12-15 11:08:00 +05:30
Harsh Shandilya
84334a6bc9
Update Gradle to 6.0.1
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2019-12-15 11:07:59 +05:30
Jason A. Donenfeld
1e5596f977
QuickTileService: require phone be unlocked
...
Reported-by: Simon <simon@laro.se >
Reported-by: Harsh Shandilya <me@msfjarvis.dev >
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2019-11-27 13:12:12 +01:00
Jason A. Donenfeld
b67fa3a38c
Version bump
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2019-11-20 12:44:54 +01:00
Jason A. Donenfeld
8b0123042f
Implement statistics
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2019-11-20 12:44:54 +01:00
Jason A. Donenfeld
16890a659e
ModuleLoader: sync file before renaming
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2019-10-22 15:05:22 +02:00
Jason A. Donenfeld
d40ac7f89d
ToolsInstaller: write to temporary file, fsync, rename
...
Reported-by: Andre Christanto <christantoandre@gmail.com >
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2019-10-21 18:56:28 +02:00
Jason A. Donenfeld
2694f48b87
libwg-go: version bump
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2019-10-18 14:57:12 +02:00
Jason A. Donenfeld
0f91aeb2d3
Version bump
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2019-10-18 13:37:59 +02:00
Jason A. Donenfeld
bc0111f895
InetAddresses: cleanup and implement final fallback
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2019-10-18 13:37:07 +02:00
Jason A. Donenfeld
f8a3e9b332
libwg-go: version bump
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2019-10-18 13:10:08 +02:00
Jason A. Donenfeld
db9397fd3e
Application: put user agent in log to help debugging
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2019-10-18 13:06:54 +02:00
Jason A. Donenfeld
20717ff128
Suppress depreciation warnings
...
We know what we're doing here, and it's not nice.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2019-10-18 13:06:54 +02:00
Jason A. Donenfeld
a532a88585
Version bump
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2019-10-16 14:46:23 +02:00
Jason A. Donenfeld
0b077bd523
tools: bump wg-quick
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2019-10-16 14:46:10 +02:00
Jason A. Donenfeld
e008efcf97
Version bump
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2019-10-16 10:03:47 +02:00
Jason A. Donenfeld
7cf676f9bd
Google doesn't want to enable others to support free open source software
...
Revert "preferences: add donation link"
This reverts commit e5455f579aec48abb30ba68b0248b02d79303126.
The app was removed from the Play Store for violating their payments
policy. Upon filing an appeal, I was told that they do not allow
donations to projects like WireGuard.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2019-10-16 10:01:01 +02:00
Jason A. Donenfeld
b83538d08d
Version bump
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2019-10-14 00:24:47 +02:00
Jason A. Donenfeld
3c31c340d8
Download modules after verifying signify signature
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2019-10-14 00:03:39 +02:00
Jason A. Donenfeld
59620456ee
Revert "Fix activity leak on Android Q"
...
This reverts commit 489518000971914b2608da43e2146690dcc02cb9.
October has arrived.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2019-10-13 14:10:11 +02:00
Jason A. Donenfeld
e42bd29382
Version bump
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2019-10-13 14:10:11 +02:00
Jason A. Donenfeld
18dbc21f96
libwg-go: overwrite socket directory correctly
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2019-10-13 14:09:40 +02:00
Jason A. Donenfeld
68d871c47c
Version bump
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2019-10-13 11:53:17 +02:00
Jason A. Donenfeld
a45a219e5f
proguard: reenable obfuscation
...
Android bundles let us keep everything together.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2019-10-13 11:53:17 +02:00
Jason A. Donenfeld
49788240aa
libwg-go: version bump
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2019-10-13 11:46:41 +02: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
Jason A. Donenfeld
3c8fef2655
SharedLibraryLoader: separate out extraction
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2019-10-13 11:46:41 +02:00
Jason A. Donenfeld
21af2f2f62
libwg-go: overwrite socket directory correctly
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2019-10-13 11:46:41 +02:00
Jason A. Donenfeld
6d01296e8b
SharedLibraryLoader: prioritize ABI ordering
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2019-10-13 11:46:41 +02:00
Jason A. Donenfeld
749efcde21
SharedLibraryLoader: iterate through all apks for bundles
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2019-10-13 11:46:41 +02:00
Jason A. Donenfeld
3af2420da9
Version bump
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2019-10-12 18:55:28 +02:00
Nicolas Douma
d0d24f4554
tools: prepare for binder usage in wg-quick
...
Signed-off-by: Nicolas Douma <nicolas@serveur.io >
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2019-10-12 18:55:28 +02:00
Jason A. Donenfeld
96b44c1771
Activity: make dark/night theme follow system on Q
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2019-10-12 18:55:28 +02:00
Jason A. Donenfeld
4a1d07b364
Application: use preferences from compat libs
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2019-10-12 18:55:28 +02:00
Jason A. Donenfeld
7fbe5349a2
export: use content resolver on android Q+
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2019-10-12 18:55:28 +02:00
Jason A. Donenfeld
d8bad72fd6
preferences: add donation link
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2019-10-12 18:55:28 +02:00
Jason A. Donenfeld
927b32c99f
libwg-go: update to go 1.13
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2019-10-12 18:55:21 +02:00
Jason A. Donenfeld
27b691bef6
idea: update settings for 3.5
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2019-10-12 16:51:15 +02:00
Harsh Shandilya
d2b9de740d
Migrate to Android 10
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2019-09-30 19:45:11 +02:00
Jason A. Donenfeld
eb45b4b1bd
InetAddresses: prepare for Android 10's real method support
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2019-09-30 19:42:02 +02:00
Harsh Shandilya
c545b5e65f
FragmentUtils: Directly cast context as SettingsActivity
...
ContextThemeWrapper#getContext seems to be an instance of ContextImpl now which
is not public API and also not what we want. Directly cast context as SettingsActivity
which seems to work exactly how we need this to.
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2019-09-27 17:26:56 +05:30
Harsh Shandilya
992b6486a1
Update runtime dependencies
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2019-09-27 13:27:51 +05:30
Harsh Shandilya
421b1f889b
Add LeakCanary to debug builds
...
LeakCanary is an advanced memory leak detection library for Android designed by the fine folks
at Square.
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2019-09-27 13:18:27 +05:30
Harsh Shandilya
1ee1368e18
Fix activity leak on Android Q
...
This workaround was discussed at https://twitter.com/Piwai/status/1169274622614704129 after
Google had closed the issuetracker with a WONTFIX at https://issuetracker.google.com/issues/139738913 .
The situation has since changed with Google promising a fix on October's ASB but since we can't really
know, patch this ourselves for the timebeing.
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2019-09-27 13:18:27 +05:30
Harsh Shandilya
1a6a8789c1
Update to Golang 1.12.10
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2019-09-27 13:15:06 +05:30
Harsh Shandilya
b5c155db1b
Update AGP to 3.5.0
...
Also update the gitignore to ignore the '.cxx' directory AGP 3.5.0
uses for native build artifacts.
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2019-09-27 13:15:06 +05:30
Harsh Shandilya
6c5b46eadd
Uprev to Gradle 5.6.2
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2019-09-27 12:59:53 +05:30
Jason A. Donenfeld
5abbab2635
Version bump
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2019-07-08 15:46:39 +02:00
Jason A. Donenfeld
e5766094f4
tools: bump deps
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2019-07-08 15:46:04 +02:00
Jason A. Donenfeld
96d77988d3
Version bump
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2019-06-05 21:08:47 +02:00
Revath S Kumar
e9e4fd4e8b
TunnelList: Get focus to toggle button via remote for Fire TV
...
This removes a no-longer-needed workaround for the ListView
OnItemClickListener (it won't fire if a focusable view is inside the
item view). Since converting our ListView instances to RecyclerView
instances, we set the OnClick and OnLongClick listeners directly on the
item view, and this workaround no longer has any effect.
Unsurprisingly, the workaround breaks focusability of the Switch, which
is necessary to toggle tunnels on devices with keypad-based navigation,
such as the Fire TV.
This commit also adds explicit focusability hints for the Switch.
Related mail thread:
https://lists.zx2c4.com/pipermail/wireguard/2019-May/004112.html
Reported-by: Christophe-Marie Duquesne <chmd@chmd.fr >
Reported-by: Revath S Kumar <gmail@revathskumar.com >
[Samuel: sorted attributes; expanded commit message]
Signed-off-by: Samuel Holland <samuel@sholland.org >
2019-06-05 21:07:50 +02:00
Jason A. Donenfeld
b5d9fbf1f4
libwg-go: bump
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2019-06-05 21:07:50 +02:00
Jason A. Donenfeld
81dc89f85b
Version bump
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2019-03-19 00:56:13 -06:00
Jason A. Donenfeld
76305045db
InetEndpoint: properly match IPv6 addresses
...
The old one didn't account for trailing digits.
Reported-by: Brandon Jackson <bjackson@napshome.net >
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2019-03-19 00:53:14 -06:00
Jason A. Donenfeld
c4ba48d7a9
libwg-go: bump
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2019-03-19 00:40:45 -06:00
Jason A. Donenfeld
d5dcdf13bf
strings: %i is invalid
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2019-03-19 00:30:53 -06:00
Jason A. Donenfeld
7feb3dccbf
WgQuickBackend: pass result to error string
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2019-03-16 12:24:28 -06:00
Jason A. Donenfeld
2251d74fce
Version bump
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2019-03-08 01:41:41 +01:00
Jason A. Donenfeld
2c89d3fa7f
libwg-go: use netpoll rather than rwcancel
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2019-03-07 02:05:42 +01:00
Jason A. Donenfeld
49cc634678
libwg-go: don't use submodule
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2019-03-03 05:43:42 +01:00
Jason A. Donenfeld
c93e81c632
libwg-go: update to 1.12
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2019-02-27 05:24:25 +01:00
Jason A. Donenfeld
050e202291
project: bump dependencies
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2019-02-17 04:14:11 +01:00
Jason A. Donenfeld
efe04d6602
ToolsInstaller: fix typo on cleanup
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2019-02-17 03:32:35 +01:00
Jason A. Donenfeld
823b8324c7
Version bump
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2019-02-15 18:03:43 +01:00
Jason A. Donenfeld
ae2f88a9ee
tools: bump upstream version
...
This now includes the latest ARM64 ChaCha20 implementation, which should
improve performance.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2019-02-14 11:59:10 +01:00
Jason A. Donenfeld
32287c60c4
ToolsInstaller: Require Magisk 18
...
People installing magisk modules are people capable of updating Magisk.
No need to leave around old compat cruft.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2019-02-14 11:59:10 +01:00
Harsh Shandilya
69c6fa0a24
ToolsInstaller: Use chcon over restorecon
...
restorecon probes file_contexts to get the context
to be applied to the file. /sbin/.magisk does not
exist in file_contexts for obvious reasons so restorecon
always fails. Use chcon directly with the system_file
context to allow contexts to be applied.
Suggested-by: Chris Renshaw <osm0sis@outlook.com >
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2019-02-14 11:03:41 +01:00
Jason A. Donenfeld
c3e63df7b5
Update copyright
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2019-01-07 19:21:34 -05:00
Samuel Holland
fb4f1e30d5
PeerProxy: Only add IPv4 DNS servers when excluding private IPs
...
Reported-By: Christophe-Marie Duquesne <chmd@chmd.fr >
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2019-01-07 19:21:34 -05:00
Harsh Shandilya
6d0fde218b
Bump stream support libraries to latest stable
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2018-12-18 17:58:55 +01:00
Jason A. Donenfeld
6d02b0a26d
strings: squelch warning on multiple %s
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-12-18 17:58:12 +01:00
Harsh Shandilya
495bf9c954
Enable proguard and wire up rules
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2018-12-18 22:18:00 +05:30
Jason A. Donenfeld
cb1bc95e6b
Version bump
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-12-18 17:07:04 +01:00
Harsh Shandilya
6fdf0266cf
Migrate to AndroidX
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2018-12-18 16:54:54 +01:00
Jason A. Donenfeld
ee26198e2c
Bump the go runtime
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-12-16 01:54:22 +01:00
Jason A. Donenfeld
fe424197da
InetEndpoint: disallow huge ports
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-12-15 22:05:43 +01:00
Samuel Holland
053ca232aa
Adjust code generation to match existing style
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-12-15 14:46:23 -06:00
Samuel Holland
2e8d566bd4
Clean up error messages
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-12-15 14:46:23 -06:00
Samuel Holland
dcb0e9b3e8
Provide semantically meaningful exceptions for translation
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-12-15 14:46:23 -06:00
Jason A. Donenfeld
3497882ea6
Bump the go runtime
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-12-15 06:13:55 +01:00
Jason A. Donenfeld
dc2463a0ab
Fix locale usage
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-12-11 03:47:32 +01:00
Jason A. Donenfeld
b514717076
Version bump
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-12-11 02:38:18 +01:00
Jason A. Donenfeld
23932952d8
Squelch xml warning
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-12-11 02:38:18 +01:00
Jason A. Donenfeld
266ee7626c
Throw illegalargumentexception instead of nullpointerexception for builder errors
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-12-11 02:28:34 +01:00
Zachary Wander
c1ba1f409c
Unwrap the correct exception
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-12-11 02:21:37 +01:00
Jason A. Donenfeld
0f669e8ca3
Order strings
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-12-11 02:21:37 +01:00
Zachary Wander
9de711a4f5
Localize exception messages
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-12-11 02:21:23 +01:00
Jason A. Donenfeld
e1965f121c
Lowercase endpoint in exception message
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-12-11 01:02:55 +01:00
Jason A. Donenfeld
b2c9b3500c
Do not allow for an empty port in endpoint
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-12-10 15:54:38 +01:00
Jason A. Donenfeld
f60d26c4bf
Export actual configuration for zips
...
Reported-by: John Greenwood <ijohnyyh@gmail.com >
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-12-10 15:47:16 +01:00
Jason A. Donenfeld
b43044fee9
Add upstream go patch for lstat
...
Android O disallows lstat, and this upstream golang patch hasn't made it
into a release yet.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-12-10 04:33:45 +01:00
Jason A. Donenfeld
2bc66e4574
Bump go submodule
...
Fixes a problem with inotify_init being blocked by Android 9's seccomp
policy.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-12-10 02:56:51 +01:00
Jason A. Donenfeld
a641a093ad
Use English lower casing
...
In Turkish, I becomes ı instead of i, which is a problem when matching
things like "AllowedIPs".
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-12-09 05:54:47 +01:00
Jason A. Donenfeld
704369d431
Version bump
...
I feel a bit uneasy releasing this, because who knows how much Samuel
has tested his model rewrite, but nothing looks obviously horrible, so
let's give it a shot. We're still "alpha", after all.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-12-08 03:51:42 +01:00
Jason A. Donenfeld
5aa8191cd3
Do not close zip input stream
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-12-08 03:48:50 +01:00
Jason A. Donenfeld
bb43804d58
Downgrade support library
...
We're not ready for the newer one yet, but we will be soon if all goes
well.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-12-08 03:19:54 +01:00
Jason A. Donenfeld
7a8d14c85c
Remove ACRA
...
This was requested by developers who never wound up using it. It's not
really worth keeping around, since the play console gives us most of
what we need anyway.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-12-08 03:17:19 +01:00
Samuel Holland
d1e85633fb
Remodel the Model
...
- The configuration and crypto model is now entirely independent
of Android classes other than Nullable and TextUtils.
- Model classes are immutable and use builders that enforce the
appropriate optional/required attributes.
- The Android config proxies (for Parcelable and databinding) are
moved to the Android side of the codebase, and are designed to be
safe for two-way databinding. This allows proper observability in
TunnelDetailFragment.
- Various robustness fixes and documentation updates to helper classes.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-12-08 02:39:41 +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
Jason A. Donenfeld
4e134772d7
tools: wg-quick: bump
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-11-11 22:16:28 -05:00
Jason A. Donenfeld
3eb6c91c9e
libwg-go: do not mix C style and Go style variable names
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-11-06 15:43:09 +01:00
Jason A. Donenfeld
e7fd53b809
libwg-go: don't forget to include jni calls
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-11-03 20:17:19 +01:00
Jason A. Donenfeld
164ec1e31d
Bump version so that we have correct submodule hashes
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-11-01 03:41:56 +01:00
Jason A. Donenfeld
373a5f18d6
tools: update submodules
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-10-30 01:01:49 +01:00
Jason A. Donenfeld
36058ead7d
Never use system go
...
Telling people to patch their system go is bonkers.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-10-11 00:23:17 +02:00
Jason A. Donenfeld
33fd5b4634
Update to go modules
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-10-09 19:46:48 +02:00
Jason A. Donenfeld
91647978e6
Fix small error
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-10-01 17:54:47 +02:00
Jason A. Donenfeld
d0b64f4bd5
Version bump
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-10-01 17:47:24 +02:00
Jason A. Donenfeld
c23d58bc27
Peer: prefer v4 endpoints to v6
...
This works around DNS64 XLAT changeovers.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-10-01 17:13:14 +02:00
Jason A. Donenfeld
49a9475c4a
strings: properly mark positionals
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-10-01 16:33:37 +02:00
Jason A. Donenfeld
364032fe84
Update gradle and external deps
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-10-01 16:30:07 +02:00
Jason A. Donenfeld
5658584803
global: update copyright headers
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-09-06 21:32:46 -06:00
Jason A. Donenfeld
d580200989
Version bump
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-08-26 11:15:23 -06:00
Jason A. Donenfeld
c2cdde73d1
tools: bump submodules
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-08-26 11:09:36 -06:00
Jason A. Donenfeld
bc74d4d7f8
libwg-go: update golang version
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-08-26 11:08:45 -06:00
Harsh Shandilya
535c611f2d
QuickTileService: Don't use deprecated getDrawable method
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2018-08-26 11:04:01 -06:00
Harsh Shandilya
6efbf65405
Target SDK 28
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2018-08-26 11:04:01 -06:00
Harsh Shandilya
abb121224d
FragmentUtils: Make final and prevent instantiation
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2018-08-26 11:04:01 -06:00
Harsh Shandilya
8ad4657d6f
Sort dependencies
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2018-08-26 11:04:01 -06:00
Harsh Shandilya
6d3f1e00a5
Supress false-positive DefaultLocale warnings
...
We decided in 402472237e8f that it's a bad idea for our use-case
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2018-08-26 11:04:01 -06:00
Harsh Shandilya
c38f6c471d
Extract error messages to string resources
...
Useful for validation errors and localisation later on
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2018-08-26 11:04:01 -06:00
Jason A. Donenfeld
85462de254
MonkeyedSnackbar: remove
...
This didn't actually help with much and caused problems.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-08-26 10:51:21 -06:00
Zhao Gang
61d4f17f5d
config: fix wrong Peer endpoint string format
...
When a tunnel is running, saving the tunnel's config with an IPv6
address endpoint like [::1]:42 would result in the wrong format ::1:42.
This patch fixes it.
For endpoints with an IPv6 address(e.g. [::1]:42). Since the default
endpoint InetSocketAddress is created unresolved, getEndpointString()
returns "[::1]:42" (InetSocketAddress.getHostString() returns the
literal hostname). After the endpoint is resolved, getEndpointString()
returns "::1:42" (InetSocketAddress.getHostString() returns the IPv6
address without the square brackets). This inconsistent return values
caused the above mentioned bug.
With this patch, function getEndpointString would return the right
format string whether the endpoint is resolved or not.
Signed-off-by: Zhao Gang <gang.zhao.42@gmail.com >
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-08-16 12:08:09 -07:00
Jason A. Donenfeld
09cf73cd3c
GoBackend: make socket IPC optional
...
This fixes the multi-user case, which cannot be determined at compile
time and probably isn't reasonable to consider anyway in a global
manner.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-07-31 14:27:29 +02:00
Jason A. Donenfeld
ffa3cefa67
Style: use attrs from appcompat rather than from frameworks
...
This isn't possible for colorForeground, colorBackground,
textAppearanceMedium, but at least it's useful for some things here.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-07-30 22:41:55 +02:00
Jason A. Donenfeld
8ec2cc8582
FloatingActionsMenu: don't wrap context on asus api 21
...
Works around frameworks bug.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-07-30 17:35:08 +02:00
Jason A. Donenfeld
75dfa0643b
Show different color for multiselection
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-07-30 16:28:03 +02:00
Jason A. Donenfeld
d5cde43158
Replace hard-coded colors with theme colors
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-07-30 14:43:56 +02:00
Harsh Shandilya
6493a9a1f2
Remove placeholder color and directly use alpha
...
Why wasn't this done like this in the first place?
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2018-07-30 14:28:27 +02:00
Jason A. Donenfeld
f35e059194
MonkeyedSnackbar: fix typos
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-07-29 19:17:10 +02:00
Jason A. Donenfeld
3cb3e9d8b7
Version bump
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-07-29 18:52:54 +02:00
Jason A. Donenfeld
5dfc5659ad
ConfigNamingDialog: use name input filter
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-07-29 18:44:30 +02:00
Jason A. Donenfeld
c4102992ae
MonkeyedSnackbar: work around Harsh's broken phone
...
I think I'd probably like to revert this, since presumably there's a
good reason in the first place why the support lib disables animations
when accessibility services are turned on?
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-07-29 18:35:26 +02:00
Jason A. Donenfeld
219f4e8016
MSF: make it more obvious what needs to be done
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-07-29 17:21:30 +02:00
Jason A. Donenfeld
6558140a7c
FloatingActionButtonBehavior: animate transitions
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-07-29 17:21:30 +02:00
Jason A. Donenfeld
db7b61ab80
Roll back to API 27 for now
...
There's no source available for API 28, which is a pain. But this commit
should be reverted whenever source is released.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-07-29 16:01:44 +02:00
Jason A. Donenfeld
bce5d852e1
Target API 28
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-07-29 15:46:01 +02:00
Jason A. Donenfeld
b960b4a6cd
TunnelListFragment: show selected tunnel
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-07-29 05:57:53 +02:00
Jason A. Donenfeld
1b10e75168
TunnelListFragment: fix multiselection on rotation
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-07-29 04:50:16 +02:00
Jason A. Donenfeld
07359e392c
FloatingActionButonBehavior: set translation back to 0 when snackbar dies
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-07-29 04:23:30 +02:00
Jason A. Donenfeld
e5a5bad240
MainActivity: only show two column on tablets
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-07-29 03:46:45 +02:00
Samuel Holland
ca92ac60b7
MainActivity: Fix fragment selection logic
...
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-07-28 17:07:37 -05:00
Jason A. Donenfeld
e29c21f8df
Application: refuse to run on old android
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-07-28 18:27:45 +02:00
Jason A. Donenfeld
6ceeac93bf
QuickTileService: fix bug the wrong way
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-07-28 17:55:24 +02:00
Jason A. Donenfeld
9f861096ac
config: show more informative error message on wrong key
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-07-27 15:20:23 +02:00
Jason A. Donenfeld
520df16885
Set ACRA install source
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-07-26 13:46:18 +02:00
Jason A. Donenfeld
c905ef6083
Version bump
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-07-26 05:29:49 +02:00
Eric Kuck
9652fe99df
TunnelDetailFragment now restores state correctly after process death
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-07-26 05:17:43 +02:00
Jason A. Donenfeld
62d8beff96
Application: use proper completablefuture for backend
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-07-26 04:54:14 +02:00
Jason A. Donenfeld
7d438e9dbc
Wire up ACRA
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-07-26 01:41:29 +02:00
Harsh Shandilya
b364221c93
FloatingActionBehaviour: Adjust constructors
...
Get these in line with the parent class
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2018-07-26 01:36:53 +02:00
Jason A. Donenfeld
b8052bd8fb
ThemeChangeAwareActivity: reintroduce cache buster
...
This is still needed by certain icons, like the trash icon in the peer
editor.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-07-25 04:05:41 +02:00
Jason A. Donenfeld
e437ac389e
Version bump
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-07-25 03:11:33 +02:00
Jason A. Donenfeld
2db2a0921d
MainActivity: attempt to fix commit state exceptions
...
This is an attempt to fix:
java.lang.IllegalStateException:
at android.support.v4.app.FragmentManagerImpl.checkStateLoss (FragmentManager.java:2053)
at android.support.v4.app.FragmentManagerImpl.enqueueAction (FragmentManager.java:2079)
at android.support.v4.app.BackStackRecord.commitInternal (BackStackRecord.java:678)
at android.support.v4.app.BackStackRecord.commit (BackStackRecord.java:632)
at com.wireguard.android.activity.MainActivity.moveToState (MainActivity.java:58)
at com.wireguard.android.activity.MainActivity.onSelectedTunnelChanged (MainActivity.java:157)
at com.wireguard.android.activity.BaseActivity.setSelectedTunnel (BaseActivity.java:75)
at com.wireguard.android.fragment.BaseFragment.setSelectedTunnel (BaseFragment.java:82)
at com.wireguard.android.fragment.TunnelListFragment.lambda$null$4$TunnelListFragment (TunnelListFragment.java:307)
at com.wireguard.android.fragment.TunnelListFragment$$Lambda$4.onClick (Unknown Source:6)
at android.view.View.performClick (View.java:6274)
at android.view.View$PerformClick.run (View.java:24729)
at android.os.Handler.handleCallback (Handler.java:789)
at android.os.Handler.dispatchMessage (Handler.java:98)
at android.os.Looper.loop (Looper.java:169)
at android.app.ActivityThread.main (ActivityThread.java:6595)
at java.lang.reflect.Method.invoke (Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run (Zygote.java:240)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:767)
But this is probably the wrong way to fix it and instead moveToState
needs to be reimagined.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-07-25 03:07:16 +02:00
Jason A. Donenfeld
d7889c4e88
style: coloring the navbar looks a bit strange when rotated
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-07-25 02:59:26 +02:00
Jason A. Donenfeld
559add3f71
TunnelEditorFragment: plug memory leak on listeners
...
Apparently these don't get GC'd unless they're removed explicitly,
because there's a global singleton registry of them. So, introduce a
little registry of our own.
Reported-by: Samuel Holland <samuel@sholland.org >
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-07-25 02:59:26 +02:00
Jason A. Donenfeld
d615304e83
qrcode: minor adjustments
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-07-25 02:59:26 +02: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
Harsh Shandilya
bb20c89cd5
tools: Bump wireguard submodule
...
This force pushing is going to be the death of me
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2018-07-24 18:26:53 +02:00
Jason A. Donenfeld
996cbb5f2b
tools: support ancient NDKs
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-07-24 18:09:18 +02:00
Jason A. Donenfeld
8028d708cb
tools: let wg(8) play with userspace implementation
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-07-24 17:57:56 +02:00
Harsh Shandilya
7689905c78
config: Remove Locale based string format
...
The configurations are supposed to be in a very specific
format which is not user-facing and hence doesn't have to
be adjusted for locale avoiding both the redundancy as well
as potential breakages in the configuration file format from
different locales.
Fixes: 71c67aa24ae2 ("config: Minor cleanup")
Reported-by: Samuel Holland <samuel@sholland.org >
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2018-07-24 17:57:56 +02:00
Jason A. Donenfeld
284e42647c
tools: pass in debug package name
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-07-24 17:57:56 +02:00
Jason A. Donenfeld
3a16c08821
Make placeholder pretty
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-07-23 00:05:12 +02:00
Harsh Shandilya
76fb6a318e
Show help text when no tunnels are imported
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2018-07-22 23:21:17 +02:00
Jason A. Donenfeld
c633f96374
FloatingActionsMenuRecyclerViewScrollListener: add final modifiers
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-07-22 23:21:17 +02:00
Harsh Shandilya
3357be9557
RTL layout fixes
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2018-07-22 18:21:39 +02:00
Harsh Shandilya
6696e838da
treewide: Optimize imports
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2018-07-22 18:20:23 +02:00
Jason A. Donenfeld
d0d56f3a1b
fab: move in direct ratio to scroll
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-07-20 16:41:53 +02:00
Jason A. Donenfeld
fbf32a6c29
Version bump
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-07-20 15:54:46 +02:00
Harsh Shandilya
3e37289b68
UI: use background color for navbar in dark mode
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2018-07-20 15:53:41 +02:00
Jason A. Donenfeld
2d6a45f824
fab: make icons always white
...
With the new shade of blue, perhaps this simply looks better.
I don't like hard coding the color away from the theme, however.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-07-20 15:45:21 +02:00
Jason A. Donenfeld
ed802336e6
theme: use less disgusting color
...
Harsh's "users" were offended by the dark theme. So, we change the
accent to that used by gboard's dark theme, which should be pretty
uncontroversial.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-07-20 03:23:17 +02:00
Harsh Shandilya
b1d1e3b436
TunnelListFragment: Allocate interpolators outside scroll listener
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2018-07-20 03:17:49 +02:00
Jason A. Donenfeld
d33e322b67
TunnelEditorFragment: fix null pointer dereference
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-07-19 20:57:00 +02:00
Jason A. Donenfeld
60a6e29350
QuickTileService: fix null pointer dereference
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-07-19 20:57:00 +02:00
Jason A. Donenfeld
3b0e0c2f16
tools: bump version
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-07-18 21:54:14 +02:00
Jason A. Donenfeld
ffb8bccbc5
Version bump
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-07-18 18:40:16 +02:00
Jason A. Donenfeld
08170f7e55
TunnelListFragment: setOnScrollListener is old, but we support API 21, so we have to use it
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-07-18 18:32:42 +02:00
Jason A. Donenfeld
28d47b3470
AppListDialogFragment: getArguments is null before onCreate
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-07-18 18:08:08 +02:00
Jason A. Donenfeld
8e3586328c
fab: use auto calculated fling threshold
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-07-18 02:32:05 +02:00
Jason A. Donenfeld
f315654d40
fab: add fab sized padding at bottom of recycler view
...
This way we can keep scrolling when there are exactly the right number
of items, so that the toggle switch becomes visible.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-07-18 02:15:14 +02:00
Harsh Shandilya
fdfab18d45
fab: make fab respond to recyclerview scroll events
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2018-07-18 02:15:06 +02:00
Harsh Shandilya
d43e77867c
fab: slide fab up when a snackbar shows
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2018-07-18 02:15:06 +02:00
Harsh Shandilya
df03bdd7f9
android: QuickTileService: Do not use slashed icon on Android P
...
Android P features circle masked QS tiles which make use of colors
to denote STATE_ACTIVE/STATE_INACTIVE rather than a slash across
the drawable as seen on Android Oreo.
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2018-07-16 17:31:14 +02:00
Jason A. Donenfeld
ae5bf6fbb2
Version bump
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-07-16 15:05:18 +02:00
Jason A. Donenfeld
04ff63f1b5
InetAddresses: unwrap reflection exceptions
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-07-16 15:05:18 +02:00
Harsh Shandilya
71cf39660f
android: TunnelListFragment: Annotate parameter to match super method
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2018-07-16 03:26:02 +02:00
Jason A. Donenfeld
7364f2540e
BaseFragment: do not allow tunnel to be null
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-07-13 04:13:35 +02:00
Jason A. Donenfeld
5d66f6b2e5
config: dns servers can be null
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-07-13 04:09:09 +02:00
Jason A. Donenfeld
fec5fa8caf
config: make loadData private
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-07-13 04:06:55 +02:00
Jason A. Donenfeld
6f48e138a4
TunnelEditorFragment: binding might be null
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-07-13 04:04:11 +02:00
Jason A. Donenfeld
21c15fe4ea
QuickTileService: show intermediate state when changing
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-07-13 03:57:02 +02:00
Eric Kuck
67ea8b2936
global: Add nullity annotations
...
Signed-off-by: Eric Kuck <eric@bluelinelabs.com >
2018-07-13 03:46:23 +02:00
Jason A. Donenfeld
fbaa4d9ab1
Version bump
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-07-12 02:14:25 +02:00
Harsh Shandilya
19b57c41b7
Address lint issues in TunnelListFragment
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2018-07-12 02:07:19 +02:00
Jason A. Donenfeld
26d762bc5c
TunnelEditorFragment: add DNSes to allowedIPs when excluding rfc1918
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-07-12 02:04:52 +02:00
Jason A. Donenfeld
eab0248aaa
Clean up warnings
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-07-11 21:03:22 +02:00
Jason A. Donenfeld
a5bbe171cb
fab: remove asus hack
...
Let's hope Eric's changes make this no longer required.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-07-11 21:03:22 +02:00
Eric Kuck
5463086e75
fab: use support library's rendering
...
Signed-off-by: Eric Kuck <eric@bluelinelabs.com >
2018-07-11 21:03:22 +02:00
Jason A. Donenfeld
1f7bdd4f5f
Version bump
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-07-10 22:00:10 +02:00
Jason A. Donenfeld
3cf6aad083
QuickTileService: automatically slash the tile
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-07-09 18:55:55 +02:00
Jason A. Donenfeld
b997a2581b
BaseFragment: in the event no view is available, use toast
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-07-09 17:29:35 +02:00
Eric Kuck
d7ea078cdf
Request VPN permissions on activation
...
Signed-off-by: Eric Kuck <eric@bluelinelabs.com >
2018-07-09 17:08:41 +02:00
Jason A. Donenfeld
d50e0f5fb9
Use instanceOf instead of getClass
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-07-08 23:59:25 +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
707c8c19a8
gradle: bump build tools version
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-07-08 03:18:15 +02:00
Eric Kuck
b37b48b8dc
Switch from ListView to RecyclerView
...
Signed-off-by: Eric Kuck <eric@bluelinelabs.com >
2018-07-08 02:50:49 +02:00
Jason A. Donenfeld
2c7203ab8d
Another bump for misbuild
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-07-06 21:13:36 +02:00
Jason A. Donenfeld
d1a812042c
Version bump
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-07-06 18:17:58 +02:00
Jason A. Donenfeld
78d976162d
PeerEditor: put exclusion checkbox next to label
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-07-06 18:17:58 +02:00
Jason A. Donenfeld
7078162c69
AppListDialogFragment: add deselect all button
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-07-06 18:17:58 +02:00
Jason A. Donenfeld
2742b09b5a
tools: update wg-quick for ExcludedApplications support
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-07-06 18:17:58 +02:00
Jason A. Donenfeld
7b28d51cdd
global: move to Apache 2.0
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-07-06 16:28:46 +02:00
Jason A. Donenfeld
d132087b3c
PeerEditor: add exclude private IPs functionality
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-07-06 16:28:46 +02:00
Jason A. Donenfeld
124f186983
TunnelEditor: fix nits
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-07-06 16:28:46 +02:00
Eric Kuck
500a705531
AppListDialogFragment: add implementation for excluding applications
...
Signed-off-by: Eric Kuck <eric@bluelinelabs.com >
2018-07-06 04:14:19 +02:00
Jason A. Donenfeld
5729947d6c
TunnelEditor: better looking buttons
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-07-06 02:40:11 +02:00
Harsh Shandilya
363d0b9126
android: model: Make some methods static
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2018-06-30 21:19:59 +02:00
Harsh Shandilya
e985452f3b
android: FloatingActionsMenu: Don't create labels on ASUS' Android 5 devices
...
They have completely wrecked the framework there and all efforts to
work around their absolutely broken software have been in vain, hence
let's atleast let users be able to use the app, labels or otherwise.
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2018-06-30 21:10:52 +02:00
Harsh Shandilya
5c9643a23b
android: VersionPreference: Handle no-browser-installed case
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2018-06-30 21:10:22 +02:00
Harsh Shandilya
0e3e3ae37b
android: Add select all button to action mode
...
Thanks to Jason for suggesting the not-clinically-insane
method to go about this.
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2018-06-30 21:07:24 +02:00
Harsh Shandilya
b41d473f64
wireguard: Bump snapshot
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2018-06-30 21:06:40 +02:00
Jason A. Donenfeld
3de549d2c7
Version bump
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-06-25 16:18:57 +02:00
Jason A. Donenfeld
408e9004b0
libwg-quick: add iptables output allowance
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-06-25 16:16:27 +02:00
Jason A. Donenfeld
e1a66d5766
global: Small cleanups
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-06-25 16:10:02 +02:00
Harsh Shandilya
99cf2152c4
android: Consolidate getPrefActivity into FragmentUtils
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
[Samuel: Changed static to non-static import]
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-06-23 01:00:07 -05:00
Harsh Shandilya
53e8d425e9
QuickTileService: Remove useless override
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2018-06-23 00:57:31 -05:00
Harsh Shandilya
9e5f45da15
gradle: Style
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2018-06-23 00:57:31 -05:00
Harsh Shandilya
4c0caa10e9
treewide: Optimize imports
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2018-06-23 00:57:31 -05:00
Samuel Holland
b9991e4229
config: Refactor IPCidr and use of InetAddress
...
Use a canonically-named utility class to tack on methods to the existing
InetAddress class. Rename IPCidr to InetNetwork so it better matches
InetAddress and is more pronouceable :) While here, simplify the
constructor and toString() functions, and properly implement hashCode().
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-06-19 21:59:44 -05:00
Samuel Holland
4acee49d4b
util: Extract non-Android utility interfaces
...
As part of a refactoring that will likely introduce more custom
collection classes, move the non-Android-specific parts outside the
com.wireguard.android package.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-06-19 21:59:44 -05:00
Samuel Holland
d3a8291a7a
crypto: Slightly Java-ify the Curve25519 implementation
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-06-19 21:59:42 -05:00
Samuel Holland
bcae77b989
app: Regularly scheduled gradle updates
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-06-19 21:35:54 -05:00
Samuel Holland
de75ff4bea
idea: Disable an unwanted inspection
...
Android Studio isn't smart enough to realize that the public/private
keys and the keypair are effectively the same thing. Just turn off the
inspection because it's usually tripped by intentional things.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-06-19 21:33:36 -05:00
Jason A. Donenfeld
b10a6171a5
Application: make lock final
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-06-17 22:34:22 +02:00
Jason A. Donenfeld
6534f45a3a
application: style fix
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-06-17 14:53:31 +02:00
Jason A. Donenfeld
373145d30e
Version bump for clat fix
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-06-17 05:25:42 +02:00
Jason A. Donenfeld
5feea74f28
Version bump
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-06-14 05:07:15 +02:00
Jason A. Donenfeld
e8891d775b
global: supply backend asynchronously
...
We can't block for IO, so move everything to async workers or to
callbacks.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-06-14 05:06:18 +02:00
Jason A. Donenfeld
0f128f99a1
Version bump
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-06-12 05:46:02 +02:00
Jason A. Donenfeld
61e3441bfb
Application: require rootshell to use wgquick backend
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-06-12 05:42:24 +02:00
Jason A. Donenfeld
15e10d8fde
ToolsInstaller: safer state machine
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-06-10 05:17:09 +02:00
Jason A. Donenfeld
ea72e8b656
Version bump
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-06-07 04:59:47 +02:00
Jason A. Donenfeld
2ca27c2783
BaseActivity: style
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-06-07 04:49:15 +02:00
Jason A. Donenfeld
f190db0754
BootShutdownReceiver: style
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-06-07 04:37:28 +02:00
Jason A. Donenfeld
8d27570eea
Backend: abstract version information
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-06-07 04:35:07 +02:00
Jason A. Donenfeld
24605c9c01
Give Samuel heart attack by removing Dagger
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-06-07 04:12:42 +02:00
Jason A. Donenfeld
7b59353910
VersionPreference: account for checking state and move away from tools installer
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-06-07 03:27:06 +02:00
Jason A. Donenfeld
ca7f4e5be9
FloatingActionMenu: 5.1 requires explicit text color
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-06-06 03:12:29 +02:00
Harsh Shandilya
ab95ac83c9
MainActivity: Fix style
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2018-06-06 02:07:26 +02:00
Jason A. Donenfeld
51fb57433b
ToolsInstallerPreference: do not check for magisk on main thread
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-06-06 00:29:44 +02:00
Harsh Shandilya
0496b94aa8
build: Allow building release artifacts in-tree
...
This change avoids all need for changing any file under
VCS to insert signing keys and configs for release builds.
Example contents of keystore.properties
```
// Location of keystore, relative to module build.gradle,
// in this case, of the app module
storeFile=../wireguard.jks
storePassword=b3ty0uc4nth4xxth1s
keyAlias=wireguard
keyPassword=4ndr01dsux
```
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2018-06-05 19:58:34 +05:30
Harsh Shandilya
d8d6e99df1
MainActivity: Silence useless warning
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2018-06-05 19:52:08 +05:30
Jason A. Donenfeld
377ba1c9d1
Version bump
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-06-05 16:07:56 +02:00
Jason A. Donenfeld
8ebeeb6d90
FloatingActionMenu: use appcompat theme
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-06-05 16:01:38 +02:00
Harsh Shandilya
3c3de065c6
MainActivity: collapse action menu on toolbar touch
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2018-06-05 15:22:40 +02:00
Jason A. Donenfeld
a17ec6b1f7
ToolsInstaller: allow installing as Magisk module
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-06-05 06:17:00 +02:00
Jason A. Donenfeld
cbf8ac6538
libwg-go: better error when using unpatched Go
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-06-05 03:28:16 +02:00
Jason A. Donenfeld
d4b1295e94
ActionBar: show single menu item as toolicon
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-06-05 03:09:51 +02:00
Jason A. Donenfeld
db53e17e58
TunnelListFragment: hide menu when going to settings
...
Really the menu should be hidden when clicking on the action bar, too.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-06-05 03:05:58 +02:00
Jason A. Donenfeld
f0a3e63743
MainActivity: style
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-06-05 02:47:59 +02:00
Jason A. Donenfeld
d636e13717
fab: properly get theme color
...
Harsh changed this before, but my original way is what the support
library does internally.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-06-05 02:44:32 +02:00
Jason A. Donenfeld
dea60e13c0
libwg-go: more efficient and safer string passing
...
It was unclear when the Go string was actually freed.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-06-05 02:18:12 +02:00
Harsh Shandilya
40a30d997d
fab: Remove useless override
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2018-06-05 02:05:35 +02:00
Harsh Shandilya
dba8d0305e
fab: Use themed context to set style
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2018-06-05 02:05:23 +02:00
Jason A. Donenfeld
27072972ab
DarkMode: move to shared preferences listener
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-06-05 02:02:09 +02:00
Jason A. Donenfeld
d56e95c576
MainActivity: style
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-06-04 19:55:27 +02:00
Jason A. Donenfeld
d0ef2c43d9
FloatingActionsMenu: remove unused imports
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-06-04 19:12:12 +02:00
Jason A. Donenfeld
0c0c1acc3b
BaseActivity: support android 5 and 6 when clearing drawable cache
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-06-04 18:35:18 +02:00
Jason A. Donenfeld
48f796c463
LogExporterPreference: get all past processes
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-06-04 17:57:02 +02:00
Jason A. Donenfeld
8aab35a70d
BaseActivity: invalidate icon cache on Android P
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-06-04 17:57:02 +02:00
Jason A. Donenfeld
e5f6c24174
Bump version
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-06-04 07:16:10 +02:00
Jason A. Donenfeld
4cad06b7ce
app: disable proguard
...
It's mostly a hindrance to debugging.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-06-04 07:16:10 +02:00
Jason A. Donenfeld
c4e32328fc
TunnelManager: disable dangerous intents for now
...
We need to think about how to allow this securely. It's not okay for all
apps to be allowed to twiddle with VPN settings.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-06-04 07:06:28 +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
10ca2c8681
Preferences: don't use round icon
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-06-03 16:15:30 +02:00
Harsh Shandilya
fd63e496e5
Preferences: Move version pref to top and add icon
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2018-06-02 19:35:11 +02:00
Jason A. Donenfeld
567503abc7
Backends: print versions somewhere in log
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-06-02 19:26:33 +02:00
Harsh Shandilya
4671f59c67
android: Cleanup classes
...
- Use final modifer wherever possible
- Use try-with-resources for input/output streams
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2018-06-02 19:14:56 +02:00
Harsh Shandilya
4986d92f3d
crypto: KeyEncoding: Fix style
...
- Replace python style variable names with camel case
- Don't declare multiple variables in the same line
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2018-06-02 19:12:30 +02:00
Jason A. Donenfeld
0b1c7cc35f
Topic: John does things differently
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-06-02 18:44:35 +02:00
Jason A. Donenfeld
9e278c88e6
ExporterPreferences: disable control immediately
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-06-02 18:38:56 +02:00
Jason A. Donenfeld
c3246060f5
Preferences: add log exporter
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-06-02 18:35:09 +02:00
Jason A. Donenfeld
b7e025e381
libwg-go: fix style
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-06-01 18:27:30 +02:00
Jason A. Donenfeld
858ec4c0ab
Version bump
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-06-01 18:01:25 +02:00
Jason A. Donenfeld
65292aaa79
Topic: make reentrant
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-06-01 17:34:59 +02:00
Jason A. Donenfeld
3d57eb633e
BaseActivity: flush themed icon cache on theme change
...
The most terrible hack you have ever seen.
The drawable cache isn't properly flushed when changing the theme -- a
frameworks bug, evidently -- so we work around it by digging deep into
the mud.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-06-01 16:48:08 +02:00
Jason A. Donenfeld
1e45898d70
Settings: add version
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-06-01 16:06:56 +02:00
Jason A. Donenfeld
61431fb579
colors: final touches
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-06-01 15:18:23 +02:00
Harsh Shandilya
00d48e867b
ui: Use better list colors in night mode
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2018-06-01 18:42:20 +05:30
Harsh Shandilya
d5df0c10ab
TunnelListFragment: Dejank action mode title
...
When unselecting items, the toolbar briefly says
'0 items selected' before it reverts back to the
non-action mode toolbar which feels janky at best.
To mitigate this, just set a blank title to the action
mode toolbar when item count is 0, to facilitate the
smoothness of the transition to non-action mode toolbar.
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2018-06-01 18:42:20 +05:30
Harsh Shandilya
af814951f3
fab: Make label responsive to night mode
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2018-06-01 18:42:20 +05:30
Harsh Shandilya
a54a03aa2f
FloatingActionButton: Cleanup declaration of TranslucentLayerDrawable class
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2018-06-01 18:42:20 +05:30
Harsh Shandilya
4edfdd8f3b
FloatingActionButton: Make attribute grabbing not be terrible
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2018-06-01 18:42:19 +05:30
Jason A. Donenfeld
32d669a661
theme: add dark theme with toggle
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-06-01 14:57:25 +02:00
Jason A. Donenfeld
918076a670
global: fix theme situation and clean up cruft while adding more cruft
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-06-01 14:57:25 +02:00
Harsh Shandilya
752e61d1c7
fab: default to app theme colors
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2018-06-01 03:19:26 +02:00
Harsh Shandilya
125f725a03
fab: use AppCompatTextView for label
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2018-06-01 03:17:29 +02:00
Harsh Shandilya
3c84b48f08
fab: cleanup
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2018-06-01 03:16:32 +02:00
Jason A. Donenfeld
8c32c32c2b
wg-quick: don't break push notifications
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-05-31 16:40:50 +02:00
Jason A. Donenfeld
e664a05d4b
KeyEncoding: more constant time
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-05-30 23:31:20 +02:00
Jason A. Donenfeld
ba4672b422
Version bump
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-05-29 19:08:55 +02:00
Jason A. Donenfeld
09833a1ba5
FloatingActionButton: import cleaned up getbase code
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-05-29 19:03:47 +02:00
Jason A. Donenfeld
ded0191aae
SharedLibraryLoader: introduce to work around Samsung PackageManager bugs
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-05-29 05:09:37 +02:00
Jason A. Donenfeld
9245e9536a
Version bump
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-05-27 19:00:38 +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
Jason A. Donenfeld
f988306c17
libwg-go: Saner way to deal with sockets
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-05-27 18:17:55 +02:00
Jason A. Donenfeld
64ce6cd5a2
EditorFragment: show toast on creation too
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-05-27 04:08:23 +02:00
Jason A. Donenfeld
5476fc2228
Version bump
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-05-26 13:56:35 +02:00
Jason A. Donenfeld
7120ef9ffd
libwg-go: try no stickiness and no roaming
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-05-26 03:03:15 +02:00
Jason A. Donenfeld
75f4478fb5
Version bump
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-05-24 19:26:48 +02:00
Jason A. Donenfeld
23c4174fcd
libwg-go: reenable sticky sockets, just slightly less sticky
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-05-24 18:39:29 +02:00
Jason A. Donenfeld
5754df6b71
Version bump
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-05-23 17:12:18 +02:00
Jason A. Donenfeld
62dbeca732
libwg-go: use gopath
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-05-23 17:01:40 +02:00
Jason A. Donenfeld
a533be82e8
libwg-go: No sticky sockets with VPNService.java
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-05-22 23:28:54 +02:00
Jason A. Donenfeld
52d90724bc
Fix hang and version bump
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-05-21 14:17:34 +02:00
Jason A. Donenfeld
4863bd647a
Add stacktrace via SIGUSR2
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-05-21 14:13:55 +02:00
Jason A. Donenfeld
cb62dc8fa2
Version bump
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-05-21 04:23:31 +02:00
Jason A. Donenfeld
e3442cde56
libwg-go: better up/down sync
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-05-16 22:24:20 +02:00
Jason A. Donenfeld
694577b9b4
ExceptionLoggers: never have a null message
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-05-16 17:36:25 +02:00
Harsh Shandilya
9c3091456d
android: Directly use views for snackbars
...
There should be no need to deference an extra variable.
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2018-05-16 17:31:31 +02:00
Jason A. Donenfeld
515be5e453
libwg-go: more fixes
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-05-15 21:57:17 +02:00
Jason A. Donenfeld
b89b9e89c2
build: version bump
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-05-15 13:44:59 +02:00
Jason A. Donenfeld
9d20c378ba
libwg-go: bump
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-05-15 13:44:22 +02:00
Jason A. Donenfeld
f661c67c89
tools: move wg-quick to main wireguard repo
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-05-14 18:25:42 +02:00
Jason A. Donenfeld
e1ac4247ff
libwg-go: make changes for recent go code
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-05-14 17:10:59 +02:00
Jason A. Donenfeld
34422e57a9
build: another bump for mistake
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-05-10 17:14:48 +02:00
Jason A. Donenfeld
088ff2dbda
build: version bump and fix disaster
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-05-10 16:18:34 +02:00
Jason A. Donenfeld
2853515e8f
build: version bump
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-05-09 18:49:03 +02:00
Jason A. Donenfeld
95dbb14cb5
theme: revert to old color scheme
...
Noble effort, but ultimately ugly.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-05-09 18:38:13 +02:00
Harsh Shandilya
0b9bcf0f9e
global: Cleanup line lengths and misc lint warnings
...
I know we decided to ditch the idea of shutting up "Exception
thrown with empty param" warnings but this pesters me too
much and we can instead just treat this as a weird future proofing
thing if and when we end up needing the exception messages.
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2018-05-09 18:16:14 +02:00
Harsh Shandilya
e2ab2210cd
MainActivity: Nip out as early as possible when moving to same fragment
...
Save the useless logging and fragment manager object creation.
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2018-05-09 18:16:09 +02:00
Jason A. Donenfeld
332c35747e
libwg-go: new timer system upstream
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-05-09 17:38:27 +02:00
Jason A. Donenfeld
ebe3297c83
libwg-go: ensure local Go instance is patched
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-05-09 17:33:36 +02:00
Samuel Holland
7f6c861fd6
mipmap: Fix formatting of launcher icon XML
...
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-05-05 10:11:35 -05:00
Harsh Shandilya
58b9a88bcb
styles: Fixup CAB background color
...
Long pressing any list item entry would cause the action bar to
use the dark color from the parent theme -- fix that.
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2018-05-05 10:11:20 -05:00
Harsh Shandilya
e4eac7a3cf
drawables: Introduce material iconography
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2018-05-05 10:11:14 -05:00
Harsh Shandilya
55ec3046d1
styles: Propagate WireGuard blue in UI
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2018-05-05 10:08:49 -05:00
Harsh Shandilya
6bd4f7495d
styles: Propagate WireGuard red in UI
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2018-05-05 10:08:24 -05:00
Harsh Shandilya
fd571c53ce
TunnelEditor: Add toast messages to success events
...
Letting the user know that the operation went successfully
via visual cues is a nice UX touch.
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2018-05-05 10:08:14 -05:00
Jason A. Donenfeld
5ed36d7346
wireguard-go: bump submodule
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-05-05 06:09:45 +02:00
Harsh Shandilya
37413f2fb4
TunnelEditor: Remove unused parameter
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2018-05-03 23:49:14 -05:00
Harsh Shandilya
59aa3035a8
ui: Use a proper CardView based layout
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2018-05-03 23:45:03 -05:00
Jason A. Donenfeld
46b374cf25
tools: include libmnl paths after system paths for ndk 17
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-05-03 19:15:09 -05:00
Jason A. Donenfeld
b276833b33
config: loosen parser to match reality
...
Mid-line comments, mixed case.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-05-03 19:15:09 -05:00
Jason A. Donenfeld
f77eac6796
global: fix up copyrights
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-05-03 19:15:09 -05:00
Samuel Holland
e8d8d5dc29
Keypair: Minimize the scope of warning suppression
...
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-05-02 10:31:25 -05:00
Samuel Holland
3e8d457501
KeyEncoding: Address lints/warnings and match line length
...
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-05-02 10:31:25 -05:00
Samuel Holland
aa92c4a9d5
global: Add or update copyright headers in Java code
...
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-05-02 10:31:25 -05:00
Harsh Shandilya
24572aa861
global: Some more lint cleanup
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2018-05-02 17:14:35 +02:00
Jason A. Donenfeld
cb6681b15a
drawable: add adaptive icon
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-05-02 07:19:05 +02:00
Jason A. Donenfeld
a46b2eb9e5
libwg-go: avoid phony target and update go
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-05-02 06:02:15 +02:00
Harsh Shandilya
a77ff1627d
wg-build: Update gradle build files
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2018-05-02 03:40:02 +02:00
Harsh Shandilya
96ebf4cd51
libwg-go: Ignore go{path,root}
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2018-05-02 03:40:02 +02:00
Samuel Holland
691d8a34a0
project: Import select Android Studio configuration files
...
Having a consistent set of code style and inspection rules makes it
easier for contributors to match the existing code.
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-05-01 16:31:21 -05:00
Jason A. Donenfeld
92fc1dbac8
libwg-go: do not deadlock on Close
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-05-01 17:48:59 +02:00
Jason A. Donenfeld
997138cd22
Version bump
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-04-30 23:11:32 +02:00
Jason A. Donenfeld
ba1b6c7095
ZipExporterPreference: account for directory already existing
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-04-30 19:55:06 +02:00
Samuel Holland
843003f436
global: Clean up Java
...
Address Java and Android lints.
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-04-30 11:50:21 -05: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
Samuel Holland
e2636320b7
app: Sort dependencies
...
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-04-30 11:38:15 -05:00
Samuel Holland
a481aa244c
project: Update gradle files
...
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-04-30 11:38:15 -05:00
Jason A. Donenfeld
6ce739f01f
libwg-go: use system Go when possible
...
We're still maybe curlzipping and using a binary distribution of Go, but
at least this is only the case on machines that don't have go.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-04-30 18:19:37 +02:00
Jason A. Donenfeld
05b4e395a9
Tunnel importer: stricter file filters
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-04-30 17:37:34 +02:00
Jason A. Donenfeld
65ca5979d2
proguard: enable
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-04-30 16:57:57 +02:00
Jason A. Donenfeld
3c84db7788
Preferences: use v14 material style
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-04-30 15:35:21 +02:00
Jason A. Donenfeld
a47ddf57d1
ZipExporterPreference: requireNonNull is redundant
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-04-30 15:12:49 +02:00
Harsh Shandilya
f9d68185e2
wg: Collapse fab when pressing back before exiting
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2018-04-30 17:33:24 +05:30
Harsh Shandilya
f1fa46829d
SettingsActivity: Migrate permissions check to AppCompat
...
Pretty straightforward, I was clearly overthinking this.
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2018-04-30 17:30:25 +05:30
Harsh Shandilya
a6e530049c
ZipExporterPreference: Correctly get preference activity
...
In AppCompat based preferences, this#getContext returns an
object of android.view.ContextThemeWrapper class from where
we can safely extract a reference to our parent activity.
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2018-04-30 17:30:25 +05:30
Harsh Shandilya
77c0d4dfa6
TunnelListFragment: Use Collections methods in place of Arrays
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2018-04-30 17:30:25 +05:30
Harsh Shandilya
7e415a62c7
wg: Break out crossport dependency
...
Replace all crossport uses with upstream design
support library components.
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2018-04-30 17:30:25 +05:30
Harsh Shandilya
431b75be15
wg-build: Upgrade databinding library to 3.1.2
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2018-04-30 17:30:24 +05:30
Harsh Shandilya
fe4cc22ca0
SettingsActivity: Gracefully exit when options menu home is pressed
...
This is an activity, so it does not join the fragment backstack, but
instead piles on top
SettingsActivity
| -> MainActivity
| -> EditorFragment
| -> DetailFragment
| -> ListFragment
Without overriding the back button in the toolbar, it simply
kills the entire state on MainActivity and causes it to reload.
By calling finish() on the activity when home is pressed from the
item menu we can silently make it die without affecting any underlying
states held by MainActivity and instead return to the exact fragment
we launched settings from.
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2018-04-30 17:30:24 +05:30
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
e7e571a301
wg: Migrate menu visibility to 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
Harsh Shandilya
4ec0b3a908
Prefer AppCompat classes
...
AppCompat is the preferred way to go for any app targetting
a wider range of SDKs.
Replace all activities and fragments with their AppCompat
variants and fixup method calls to use support variants.
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2018-04-30 17:30:24 +05:30
Harsh Shandilya
af57824c14
wireguard: Extract dependency versions to ext struct
...
Maintain common versions in a single place
Also upgraded the support library to 27.1.1 and
databinding library to 3.1.1.
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2018-04-30 17:30:24 +05:30
Jason A. Donenfeld
596904977a
TunnelDetailFragment: rewrite and simplify
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-04-30 05:29:54 +02:00
Jason A. Donenfeld
73b0c4ea81
TunnelEditorFragment: rewrite and simplify
...
This should remove some null pointer dereferences and overall make the
thing more robust.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-04-30 05:29:54 +02:00
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
f4e462fabd
Allow importing from zip file
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-04-28 21:55:42 +02:00
Harsh Shandilya
217ab5e17f
config: Minor cleanup
...
- Stop implicitly assuming locales in String.format
- Cleanup method visibilities
- Improve uses of Integer methods
- Remove unused getToken method
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2018-04-28 06:07:48 +02:00
Harsh Shandilya
ba862b166b
Quick cleanup across the board
...
- Clean up imports
- Adjust method visibility
- Drop in NonNull annotations where needed
- Prevent potential NPEs from nulled getActivity calls
- Remove unused methods
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev >
2018-04-28 06:07:48 +02:00
Jason A. Donenfeld
592c5cbbd6
Version bump
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-04-28 04:56:12 +02:00
Jason A. Donenfeld
63071f57b7
Use validation instead of two-way binding
...
This is insane, but it appears to be working. We essentially store
things in a separate class for editing, and then commit it back at a
given time.
This business with onViewStateRestored in both TunnelEditorFragment and
in TunnelDetailFragment is buggy and likely wrong.
In general TunnelEditorFragment should probably be rewritten. The
relationship with the changed name is not clear.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-04-28 04:51:43 +02:00
Jason A. Donenfeld
693228985d
Do not do DNS lookups for IPs
...
This involves reflection, which is a bummer, but it's better than doing
unnecessary DNS lookups.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-04-27 18:34:52 +02:00
Jason A. Donenfeld
9c6f9135e9
Add build instructions
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-04-27 16:45:16 +02:00
Jason A. Donenfeld
9ee976823d
Throw IllegalArgumentExceptions when arguments are bad
...
This will make the two way data binding crash more, but it will improve
the robustness of the config file parser, which deals with exceptions
gracefully, and when we move to one way data binding, it will help with
that too.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-04-27 05:43:07 +02:00
Jason A. Donenfeld
254cc4cc87
Latest go changes
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-04-27 05:43:07 +02:00
Jason A. Donenfeld
31101f2418
WgQuickBackend: always create configuration file
...
It might be removed on an update.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-04-26 19:42:55 +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
532edf774a
GoBackend: bring down tunnels when revoked or disconnected
...
This synchronizes the OS's connection state with ours, such as when the
user disconnects using the system UI.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-04-25 18:27:18 +02:00
Jason A. Donenfeld
86ffb24748
Use variable map instead of shell switch
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-04-25 14:43:46 +02:00
Jason A. Donenfeld
2c9e11f4f2
Curve25519: fix up spacing
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-04-25 14:36:51 +02:00
Jason A. Donenfeld
e6838f9cb0
Use binary distro of Golang
...
This is a bummer, but Gradle already specifies tons of specific versions
of various binary components, so this is not materially different than
the rest of how this whole thing works.
It also allows us to specify the Go version that will actually build a
working binary of wireguard-go, since all of the Go bugs mean not every
version works equally. We do *not* want to use whatever version a distro
happens to be shipping.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-04-24 15:34:13 +02:00
Jason A. Donenfeld
83b30bed7b
Version bump
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-04-23 17:04:17 +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
Jason A. Donenfeld
a1c6f4b3b7
Version bump
...
Due to https://github.com/golang/go/issues/24950
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-04-19 18:55:25 +02:00
Jason A. Donenfeld
32fcb3fccf
Work around go fd closing limitation and version bump
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-04-19 17:11:02 +02:00
Jason A. Donenfeld
e7c6e487ea
Version bump for go race condition
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-04-18 21:33:18 +02:00
Jason A. Donenfeld
80f22e6c3d
Determine MTU automatically
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-04-18 16:44:05 +02:00
Jason A. Donenfeld
ed42e30069
Version bump
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-04-18 09:56:06 +02:00
Jason A. Donenfeld
dc1b808f8e
Update dependencies
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-04-18 09:51:55 +02:00
Jason A. Donenfeld
53d29b312f
More javafication
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-04-18 05:28:31 +02:00
Jason A. Donenfeld
69f1a35a3f
Version bump
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-04-17 06:02:03 +02:00
Jason A. Donenfeld
140fb395dc
GoBackend: default MTU is 1280
...
This sucks, but it works with mobile networks. Later we can do something
sophisticated like we do with wg-quick.c, but not now.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-04-17 05:59:23 +02:00
Jason A. Donenfeld
b5360871e8
Remove sloppy java with enterprise java horrors
...
Since the amount of mind numbing boiler plate has been increased, this
must be the proper way to do things.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-04-17 05:27:05 +02:00
Jason A. Donenfeld
e40c579b0e
global: update various upstreams
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-04-17 02:25:35 +02:00
Aurélien Chabot
4c9143c835
GoBackend: Handle vpn service expiration
...
After a timeout the android system is destroying the vpn service when it
is not used. By using a completable future we can wait for the service
to be relaunch on demand.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-04-17 02:15:24 +02:00
Aurélien Chabot
74eae55c87
Config: Handle multiple address or dns in config file
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-04-17 02:15:24 +02:00
Aurélien Chabot
44698bb000
GoBackend: Add support for multiple address and dns as a comma separated list
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-04-17 02:15:24 +02:00
Aurélien Chabot
175f7e16dd
GoBackend: parse allowed ips
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-04-17 02:15:24 +02:00
Aurélien Chabot
c6d311923a
GoBackend: Parse the dns address
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-04-17 02:15:24 +02:00
Aurélien Chabot
6878aba911
GoBackend: IPv6 handling
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-04-17 02:15:24 +02:00
Aurélien Chabot
d97312b96a
GoBackend: Resolve endpoint before passing it to the go lib
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-04-17 02:15:24 +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
Jason A. Donenfeld
19aec7c5c6
GoBackend: support NO_PI mode
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-02-28 19:59:50 +01:00
Jason A. Donenfeld
f2113f80db
Update submodules
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-02-20 17:01:54 +01:00
Jason A. Donenfeld
0ea6f73332
GoBackend: integrate into app
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-02-17 21:14:09 +01:00
Jason A. Donenfeld
b923f7bc57
wg: bump commit
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-02-17 21:14:09 +01:00
Jason A. Donenfeld
d1c863b16e
KeyEncoding: add constant time hex implementation
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-02-13 19:47:31 +01: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
a66348c315
Version bump
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-01-18 23:17:29 +01:00
Samuel Holland
c683d23125
FileConfigStore: Warn for deletion failure in exception path
...
There's nothing we can do about it at this point; we're already rolling
back changes.
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-01-18 04:12:54 -06:00
Samuel Holland
23535c0577
WgQuickBackend: Always pass the full path to wg-quick
...
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-01-18 04:10:58 -06:00
Samuel Holland
8dde6c3c0f
fragments: Be extra paranoid about the binding getting destroyed
...
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-01-18 04:10:58 -06:00
Samuel Holland
54f201174d
TunnelManager: Use constants directly where appropriate
...
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-01-17 14:35:39 -06:00
Samuel Holland
fb3138bdda
Peer: Add missing @Override
...
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-01-17 14:35:39 -06:00
Samuel Holland
f63aeea6b8
WgQuickBackend: Clean up unused fields and imports
...
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-01-17 14:35:39 -06:00
Samuel Holland
09c207b8a3
ToolsInstaller: Remove double-checked locking
...
It can't work and may be crashing the runtime.
Use a lock object to avoid exposing the synchronization in the class's
interface.
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-01-17 14:35:39 -06:00
Samuel Holland
d56eda2fd6
RootShell: Use a lock object instead of sync methods
...
This avoids exposing the synchronization implementation details
in the class's interface.
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-01-17 14:35:14 -06:00
Jason A. Donenfeld
75aeec035c
Build bump
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-01-10 23:52:02 +01: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
Jason A. Donenfeld
7e06768f75
ToolsInstaller: symlink tools always
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-01-10 23:47:13 +01:00
Jason A. Donenfeld
7a618c1463
FileConfigStore: cleanup on rename problem
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-01-10 23:26:12 +01:00
Samuel Holland
f8ee7dcce9
QuickTileService: Fix crash opening activity
...
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-01-10 11:13:16 -06:00
Samuel Holland
30901a6152
TunnelController: Use helper function to unwrap the Throwable
...
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-01-10 00:03:45 -06:00
Samuel Holland
7b9c1a536c
model: Use ConfigStore.rename() to avoid recreating tunnels
...
Rename all of the functions to be in line with setConfig/setState
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-01-10 00:03:03 -06:00
Samuel Holland
951afaa9b2
ConfigStore: Add a rename method and implement it
...
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-01-10 00:01:52 -06:00
Samuel Holland
5ce7eba2bf
FileConfigStore: Simplify error handling
...
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-01-09 23:57:15 -06:00
Jason A. Donenfeld
dfa4a2eb9d
WgQuickBackend: properly report exception so alert shows
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-01-10 03:16:42 +01:00
Jason A. Donenfeld
df3062c7ad
Tunnel: ifname has max len 15
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-01-10 02:49:06 +01:00
Jason A. Donenfeld
b3e928c1bf
tools: error if setconf fails
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-01-10 02:48:05 +01:00
Jason A. Donenfeld
01faa9b358
tools: ifname has max len 15
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-01-10 02:38:29 +01:00
Jason A. Donenfeld
a42892bc28
TunnelEditorFragment: do not pass null localConfig
...
Otherwise we might dereference it, per this play store gathered trace:
Xiaomi Redmi 3S (land), 2048MB RAM, Android 7.1
java.lang.NullPointerException:
at com.wireguard.android.model.Tunnel.setConfig (Tunnel.java:118)
at com.wireguard.android.fragment.TunnelEditorFragment.onOptionsItemSelected (TunnelEditorFragment.java:160)
at android.app.Fragment.performOptionsItemSelected (Fragment.java:2478)
at android.app.FragmentManagerImpl.dispatchOptionsItemSelected (FragmentManager.java:2182)
at android.app.FragmentController.dispatchOptionsItemSelected (FragmentController.java:336)
at android.app.Activity.onMenuItemSelected (Activity.java:3211)
at com.android.internal.policy.PhoneWindow.onMenuItemSelected (PhoneWindow.java:1219)
at com.android.internal.view.menu.MenuBuilder.dispatchMenuItemSelected (MenuBuilder.java:761)
at com.android.internal.view.menu.MenuItemImpl.invoke (MenuItemImpl.java:152)
at com.android.internal.view.menu.MenuBuilder.performItemAction (MenuBuilder.java:904)
at com.android.internal.view.menu.MenuBuilder.performItemAction (MenuBuilder.java:894)
at android.widget.ActionMenuView.invokeItem (ActionMenuView.java:616)
at com.android.internal.view.menu.ActionMenuItemView.onClick (ActionMenuItemView.java:152)
at android.view.View.performClick (View.java:5637)
at android.view.View$PerformClick.run (View.java:22433)
at android.os.Handler.handleCallback (Handler.java:751)
at android.os.Handler.dispatchMessage (Handler.java:95)
at android.os.Looper.loop (Looper.java:153)
at android.app.ActivityThread.main (ActivityThread.java:6244)
at java.lang.reflect.Method.invoke (Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:891)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:781)
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-01-10 00:54:59 +01:00
Jason A. Donenfeld
138ba5c416
QuickTileService: sometimes tile is null
...
According to play store reports, such as:
wt88047, 0MB RAM, Android 8.1
java.lang.NullPointerException:
at com.wireguard.android.QuickTileService.updateTile (QuickTileService.java:97)
at com.wireguard.android.QuickTileService.onStartListening (QuickTileService.java:56)
at android.service.quicksettings.TileService$H.handleMessage (TileService.java:407)
at android.os.Handler.dispatchMessage (Handler.java:106)
at android.os.Looper.loop (Looper.java:164)
at android.app.ActivityThread.main (ActivityThread.java:6520)
at java.lang.reflect.Method.invoke (Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:442)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:807)
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-01-10 00:41:28 +01:00
Samuel Holland
c6bdeb1d45
Prepare version 0.3.0
...
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-01-09 10:31:08 -06:00
Samuel Holland
17f8c65b2e
WgQuickBackend: Finish the implementation
...
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-01-09 10:31:08 -06:00
Samuel Holland
933a685585
model: Chain completions to avoid race conditions
...
Otherwise getConfigAsync().thenCompose(x -> setState()) would be unsafe.
This reverts commit a6595a273afd50524cc66765c6bfbdcc34cb12e4.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-01-09 10:03:29 -06:00
Samuel Holland
daacc06a0d
global: Clean up error logging
...
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-01-09 09:37:49 -06:00
Samuel Holland
a1d955ef62
WgQuickBackend: Log when tunnels can't be enumerated
...
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-01-09 09:18:03 -06:00
Samuel Holland
ca077dd090
RootShell: Improve shell start error handling
...
No need to catch and re-throw exceptions before starting the process. If
running `su` itself fails, there's no (functional) root, so report that.
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-01-09 09:17:08 -06:00
Samuel Holland
3d6737e32f
RootShell: Be stricter about command delimiters
...
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-01-09 09:16:53 -06:00
Jason A. Donenfeld
643b698f30
RootShell: stop if we can't start
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-01-09 08:39:07 -06:00
Jason A. Donenfeld
23c09eb655
RootShell: hoist out synchronization
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-01-09 15:19:50 +01:00
Jason A. Donenfeld
14638b10ae
tools: try not to overflow
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-01-09 15:15:15 +01:00
Samuel Holland
426fa7d50b
ToolsInstaller: Propagate NoRootException properly
...
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-01-09 08:13:32 -06:00
Samuel Holland
52e8eef9ce
RootShell: Simplify, synchronize, clean up
...
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-01-09 08:13:11 -06:00
Samuel Holland
662bc3894b
TunnelListFragment: Remove useless keyword
...
final doesn't do anything in try-with-resources (it's always final).
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-01-09 06:25:53 -06:00
Jason A. Donenfeld
1451c4baf5
ToolsInstaller: terminators are better than seperators
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-01-09 13:12:49 +01:00
Jason A. Donenfeld
2785def37a
RootShell: synchronize accesses to single shell
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-01-09 13:12:49 +01:00
Samuel Holland
204755d689
RootShell: Simplify constructor
...
ToolsInstaller now takes care of installing the tools.
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-01-08 23:49:14 -06:00
Samuel Holland
c806e655fa
WgQuickBackend: Ensure tools are available before use
...
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-01-08 23:39:32 -06:00
Samuel Holland
5201c7f849
ToolsInstaller: Add a method to ensure tool availability
...
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-01-08 23:39:32 -06:00
Samuel Holland
ba30d46e08
WgQuickBackend: Inline resolveState()
...
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-01-08 23:39:32 -06:00
Samuel Holland
1cfb938dd1
ToolsInstaller: Add methods to check/make symlinks
...
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-01-08 23:39:32 -06:00
Samuel Holland
011d683c23
ToolsInstallerPreference: Examine current state on load
...
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-01-08 23:39:32 -06:00
Samuel Holland
b87568482d
ToolsInstaller: Add method to check installation status
...
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-01-08 23:39:32 -06:00
Samuel Holland
2776455d4f
TunnelEditorFragment: Fix dismissing creator activity
...
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-01-08 23:39:32 -06:00
Samuel Holland
4f02817ef0
global: Fix or suppress most lints/warnings
...
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-01-08 23:39:26 -06:00
Samuel Holland
dd69a2e778
project: Remove currently-unused library
...
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-01-08 23:39:15 -06:00
Samuel Holland
710ffc7bb3
Fragment/Tile: Make success/error messages translatable
...
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-01-08 20:30:03 -06:00
Jason A. Donenfeld
6361628e16
layout: never use suggestions
...
IP addresses and key material could be potentially sensitive. We also
don't want any interactions with the suggestive text APIs. So, we mark
it as both a visible password and we turn off suggestions. This will fix
the length limit, too, in Android 8.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-01-09 00:23:33 +01:00
Jason A. Donenfeld
da30a6d449
TunnelListFragment: fix plural grammar
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-01-09 00:23:22 +01:00
Jason A. Donenfeld
1ae10b8f45
RootShell: fix off by one
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-01-08 20:42:12 +01:00
Jason A. Donenfeld
5944efc13c
QuickTileService: show toast for longer and use right messages
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-01-08 20:30:25 +01:00
Jason A. Donenfeld
7645ea15c4
global: Prefix tags with WireGuard/
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-01-08 20:29:51 +01:00
Jason A. Donenfeld
31ba7e6593
RootShell: multiplex commands
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2018-01-08 19:46:51 +01:00
Samuel Holland
ae2068dc16
Port over remaining error handling
...
This doesn't really belong here, but there's no sense in throwing it
away--even here, it's a minor optimization.
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-01-08 04:34:28 -06:00
Samuel Holland
c4e91f8040
Handle tunnel state change errors appropriately
...
This class should probably be renamed and moved, but I don't know to
what or where.
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-01-08 04:33:54 -06:00
Samuel Holland
c40555c1bd
TunnelListFragment: Fix crash on deleting multiple tunnels
...
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-01-08 04:31:30 -06:00
Samuel Holland
b6ed17884f
ToggleSwitch: Improve reliability
...
It's not great, but it's better than it was.
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-01-08 04:31:04 -06:00
Samuel Holland
668d90f063
WgQuickBackend: Improve error handling
...
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-01-08 04:25:15 -06:00
Samuel Holland
ec81014c4e
Tunnel: Add a State factory method
...
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-01-08 04:25:15 -06: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
88e30431cb
Application: Remove unneeded exported component
...
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-01-08 00:35:35 -06:00
Samuel Holland
08cca56388
ToolsInstaller: Extract to its own classes
...
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-01-08 00:34:55 -06:00
Samuel Holland
1f30e133d6
TunnelManager: Simplify save/resume methods
...
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-01-07 21:52:14 -06:00
Samuel Holland
4a3d68bb7d
BaseActivity: Make variable names consistent
...
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-01-07 21:51:55 -06:00
Samuel Holland
1fd9547f6a
TunnelManager/QuickTileService: Remember last used tunnel
...
This is actually a bit simpler than having a manually-selected "primary"
tunnel, and is hopefully easier for the user.
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-01-07 21:50:43 -06:00
Samuel Holland
38b2aafce8
Remove primary configuration preference
...
It is no longer used.
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-01-07 21:46:41 -06:00
Samuel Holland
16c0b5b15a
FileConfigStore: Move function returns outside try blocks
...
This makes more clear what things can throw exceptions, and the
functions' control flow.
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-01-07 20:33:39 -06:00
Samuel Holland
0ab3e29432
Tunnel: Remove UNKNOWN state
...
It's never used.
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-01-07 20:33:07 -06:00
Samuel Holland
11f851abf8
Move bundle keys where they are used
...
This both clarifies and simplifies the code.
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-01-07 20:32:01 -06:00
Samuel Holland
cef97b990e
WgQuickBackend: Prefer ArrayList over LinkedList
...
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-01-07 01:45:27 -06:00
Samuel Holland
e01813487f
app: Upgrade to build tools version 27.0.3
...
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-01-07 01:33:11 -06:00
Samuel Holland
137325d3cc
ConfigEditorFragment: Support renaming tunnels
...
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-01-07 01:23:08 -06:00
Samuel Holland
30396b8718
model: Allow renaming tunnels
...
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-01-07 01:22:31 -06:00
Samuel Holland
e70b242c01
model: Remove confusing uses of completion chaining
...
This looks like the builder pattern, but isn't.
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-01-07 00:41:47 -06:00
Samuel Holland
77fdd7c883
TunnelListFragment: Name a CompletionStage what it is
...
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-01-07 00:26:08 -06:00
Samuel Holland
1862ff0bbe
Tunnel: The name passed to isNameValid is never null
...
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-01-07 00:25:49 -06:00
Samuel Holland
2f5494d47c
ConfigEditorFragment: Ensure localName is never null
...
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-01-07 00:25:33 -06:00
Samuel Holland
be8b6017d5
Make TunnelManager the point of asynchronicity
...
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-01-07 00:24:56 -06:00
Samuel Holland
5a2f692d73
TunnelManager: Sort tunnels case-insensitively
...
The second comparator is required to allow multiple tunnels that differ
only in case.
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-01-06 23:45:49 -06:00
Samuel Holland
536c6958fc
SortedKeyedList...: Support arbitrary comparators
...
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-01-06 23:44:34 -06:00
Samuel Holland
4f2b6bef84
Keyed...: Rename all the things
...
Hooray for diamond interface inheritance.
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-01-06 23:07:17 -06:00
Samuel Holland
4d38993832
project: Minor cleanups
...
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-01-06 22:14:10 -06:00
Samuel Holland
22bdffcecd
model: Proxy all async work through the TunnelManager
...
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-01-06 06:30:41 -06:00
Samuel Holland
2315a699fb
TunnelManager: Enumerate running tunnels only once
...
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-01-06 05:20:11 -06:00
Samuel Holland
df7d18fb5d
Tunnel: Require passing a state to the constructor
...
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-01-06 05:18:34 -06:00
Samuel Holland
1c2239ae91
Backend: Add a function to enumerate running tunnels
...
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-01-06 05:18:34 -06:00
Samuel Holland
2543f28274
MainActivity: Fix ActionBar after rotation
...
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-01-06 05:18:34 -06:00
Samuel Holland
2206dfc432
TunnelDetailFragment: Allow copying peer public keys
...
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-01-06 05:18:34 -06:00
Samuel Holland
193de10972
TunnelDetailFragment: Remove state text and last change
...
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-01-06 05:18:34 -06:00
Samuel Holland
dbed7155d6
activity: Remove useless indirection
...
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-01-06 05:18:34 -06:00
Samuel Holland
63efaa2dcc
databinding: Collection classes use generic E
...
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-01-06 04:09:30 -06:00
Samuel Holland
5f09afbc16
databinding: Simplify method signature
...
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-01-06 04:09:30 -06:00
Samuel Holland
6eef4093d8
databinding: Remove unused classes and methods
...
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-01-06 04:09:30 -06:00
Samuel Holland
ff0bb081a0
Convert the list of tunnels to a KeyedObservableList
...
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-01-06 04:09:30 -06:00
Samuel Holland
c73287f64b
databinding: Add an adapter for the KeyedObservableList
...
This adapter actually finally implements stable IDs correctly.
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-01-06 04:09:30 -06:00
Samuel Holland
e24654ce7c
util: Add a keyed list class and a sorted variant
...
This is inspired by C#'s KeyedCollection. The sorted variant removes the
need for an observable SortedMap.
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-01-06 04:09:30 -06:00
Samuel Holland
58eedfd6d9
TunnelManager: Clear primary tunnel when it's removed
...
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-01-06 04:09:30 -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
Samuel Holland
4c0869393e
Rename package widgets -> widget
...
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-01-06 04:08:01 -06:00
Samuel Holland
b7196e328a
Rename package bindings -> databinding
...
Signed-off-by: Samuel Holland <samuel@sholland.org >
2018-01-06 04:08:01 -06:00
Samuel Holland
7120df7a45
app: Enable Java 8 features
...
Signed-off-by: Samuel Holland <samuel@sholland.org >
2017-12-26 14:06:32 -06:00
Samuel Holland
42a4579451
project: Ignore native build artifacts
...
Signed-off-by: Samuel Holland <samuel@sholland.org >
2017-12-26 14:06:10 -06:00
Samuel Holland
e3a22e27c4
app: Upgrade to build tools 27.0.2
...
Signed-off-by: Samuel Holland <samuel@sholland.org >
2017-12-26 14:00:19 -06:00
Samuel Holland
cd105312ca
tools: Remove stale entry from .gitmodules
...
Signed-off-by: Samuel Holland <samuel@sholland.org >
2017-12-26 13:58:05 -06:00
Jason A. Donenfeld
2caa06d9fb
wg-quick: set mtu after addresses
...
This has all sorts of terrible implications and fixes a problem in a
pretty terrible way. If the interface MTU is less than 1280, IPv6
addresses will fail to be added. Rather than explictly trying to catch
this and do something particular about it -- such as nicely warning the
user that there could be a v6 isolation issue, for example -- we just
set the MTU _after_ we set the addresses, so that in setting the MTU, we
wind up removing the addresses that were just added. This is pretty bad,
but it makes things a bit smoother.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-12-26 20:04:40 +01:00
Jason A. Donenfeld
53752eb21e
tools: use cmp and right arguments for mount
...
Some systems don't have cmp.
Some systems have buggy mount tools.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-12-20 17:54:28 +01:00
Jason A. Donenfeld
8937cf82fb
tools: add wg-quick directly
...
We also use all search paths for tool, since many want this to be CLI
too.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-12-20 05:02:51 +01:00
Jason A. Donenfeld
40198132e0
tools: force ld.gold
...
This is to work around a linker bug affecting the NDK.
Reference: https://github.com/android-ndk/ndk/issues/602
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-12-19 02:53:02 +01:00
Jason A. Donenfeld
9b92f4d3c5
SettingsActivity: allow for installing command line tools
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-12-19 02:42:00 +01:00
Jason A. Donenfeld
ecc2a1c759
tools: better cmake
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-12-18 04:57:40 +01:00
Jason A. Donenfeld
b7a6b44ec1
RootShell: rewrite
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-12-16 07:07:05 +01: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
Jason A. Donenfeld
9e028ae8d6
VpnService: require root access
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-11-30 21:46:56 +01:00
Jason A. Donenfeld
417e973c8f
NotSupportedActivity: fix font size
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-11-29 13:24:40 +01:00
Samuel Holland
97e05ff965
ConfigListFragment: Use correct icon for FAB
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-11-28 20:42:25 -06:00
Samuel Holland
2b88150fd8
VpnService: Avoid duplicating file check
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-11-28 20:42:25 -06:00
Jason A. Donenfeld
eb5fdf200a
Config: use consistant verb
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-11-29 03:30:23 +01:00
Jason A. Donenfeld
af33378522
VpnService: search for binaries in most likely places first
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-11-29 03:29:36 +01:00
Samuel Holland
ee9b374d49
ConfigList: Always dismiss FAB menu on ListView touch
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-11-28 20:18:11 -06:00
Samuel Holland
49df1ebc40
NotSupported: Fix links
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-11-28 20:15:50 -06:00
Samuel Holland
8ba902ae99
build.gradle: Consistent quoting style
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-11-28 20:15:40 -06:00
Samuel Holland
4a672fc05d
ConfigListFragment: Use a floating action menu
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-11-28 20:14:47 -06: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
Samuel Holland
312816d4fd
res/drawable: Fix icon sizes
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-11-28 17:30:56 -06:00
Samuel Holland
74a6526695
ConfigActivity: Listen for name changes
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-11-28 17:25:49 -06:00
Jason A. Donenfeld
2f310f0fad
EditFragment: do not autocomplete or capitalize ifnames
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-11-28 22:14:00 +01:00
Jason A. Donenfeld
e418c5d3b4
README: update with links
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-11-28 16:31:13 +01:00
Jason A. Donenfeld
f00622a2a9
Open: better icon
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-11-28 13:09:00 +01:00
Jason A. Donenfeld
bbe058418b
NotSupported: Better sorry text
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-11-27 21:29:40 +01:00
Jason A. Donenfeld
982387b4e4
Build: update gradle
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-11-27 18:40:51 +01:00
Jason A. Donenfeld
641e45e727
SettingsActivity: directly pass through bundle
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-11-27 05:22:54 +01:00
Jason A. Donenfeld
2cc7f6c2ea
ConfigDetailFragment: wire up toggle switch
...
Finally no gross colors.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-11-27 04:35:04 +01: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
ad16d2cc7b
Settings: show quick tile config if no primary is defined
...
This seems like a horrific set of hacks.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-11-27 03:13:34 +01:00
Jason A. Donenfeld
b0bb46382c
ConfigImporter: give updates when something goes wrong
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-11-27 01:28:43 +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
Jason A. Donenfeld
e421b997cd
Config: make parsing stricter
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-11-26 23:45:41 +01:00
Samuel Holland
14a7ada6e1
ConfigImporter: Get filename from content resolver
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-11-25 23:39:08 -06:00
Samuel Holland
283340f5dc
ConfigList: A better toggle switch
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-11-25 23:05:39 -06:00
Samuel Holland
666dc25cb0
widgets: Import ToggleSwitch from the AOSP Settings app
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-11-25 22:17:17 -06:00
Samuel Holland
2ec43f38a3
project: License under GPL-2.0+
...
This allows using Apache 2.0-licensed libraries, because the Apache 2.0
license is only compatible with version 3 of the GPL.
Signed-off-by: Samuel Holland <samuel@sholland.org >
2017-11-25 22:12:10 -06:00
Samuel Holland
f1febcf9b6
ConfigList: Poor man's switch
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-11-24 23:44:18 -06:00
Samuel Holland
3233855630
BindingAdapters: Sort existing adapters
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-11-24 21:27:18 -06: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
Jason A. Donenfeld
69d4fe9a81
cli: move to android_kernel_wireguard
...
These tools are now part of the ROM builder's toolkit at:
https://git.zx2c4.com/android_kernel_wireguard/about/
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-11-25 02:11:55 +01:00
Jason A. Donenfeld
bdfb319854
Verison bump tools
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-11-16 22:15:05 +01:00
Samuel Holland
4a98d07806
ConfigActivity: Add import menu item
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-11-08 00:50:24 -06:00
Samuel Holland
cd6a124c84
VpnService: Add helper for importing configs
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-11-08 00:49:44 -06:00
Samuel Holland
70156381a7
Bindings: Merge bugfixes and updates
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-11-08 00:07:29 -06:00
Samuel Holland
6231bb18ac
Bindings: Move to a separate package
...
These are really app-independent reusable classes. Moving them to a
separate package helps avoid polluting the main app package, and makes
them easier to upgrade.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-11-07 23:34:22 -06:00
Samuel Holland
6945aa1107
project: Update gradle files
...
These are automatic changes made by Android Studio 3.0.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-11-07 22:52:50 -06:00
Jason A. Donenfeld
157f754510
cli: add wg(8) build script
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-11-01 18:23:38 +01:00
Samuel Holland
58c0b98c3f
Prepare version 0.1.0
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-24 23:24:17 -05:00
Samuel Holland
b7992d234c
ConfigListFragment: Prevent config names from wrapping
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-24 23:24:09 -05:00
Samuel Holland
292b16b1a1
ConfigActivity: Only use split layout on tablet-sized screens
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-24 23:22:22 -05:00
Samuel Holland
a828e83399
Centralize/unify validation of configurations
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-24 22:13:46 -05:00
Samuel Holland
23fdb72eda
ConfigActivity: Invert isSplitLayout→isSingleLayout for clarity
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-24 17:25:49 -05:00
Samuel Holland
b1d0091bc0
ObservableSortedMap: Document interface
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-24 02:18:13 -05:00
Samuel Holland
3daddad573
Remove state debugging messages
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-24 02:18:05 -05:00
Samuel Holland
dcc7ddcd3b
ConfigEditFragment: Copy public key on click
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-24 02:11:55 -05:00
Samuel Holland
4fdb3458ec
ConfigEditFragment: Mark the persistent keepalive as optional
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-24 02:01:51 -05:00
Samuel Holland
cd868bc997
ConfigEditFragment: Add a field for the optional pre-shared key
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-24 02:01:19 -05:00
Samuel Holland
3d6109e6d9
Peer: Add a field for the optional pre-shared key
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-24 02:00:53 -05:00
Samuel Holland
881ad4fd47
ConfigActivity: Fix condition for inserting back stack entries
...
Fixes saved editor state on rotation (removing and recreating the editor
discarded changes).
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-24 01:47:12 -05:00
Samuel Holland
c0a76f87da
ConfigActivity: Save editor state across fragment instances
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-24 01:31:19 -05:00
Samuel Holland
e446870ac1
AddActivity: Update for ConfigEditFragment changes
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-24 01:31:19 -05:00
Samuel Holland
e2df9931ac
ConfigEditFragment: Save and restore editor state properly
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-24 01:31:16 -05:00
Samuel Holland
f83c84ce4e
ConfigActivity: Avoid unnecessary executePendingTransactions
...
Nothing later tries to find the list using findFragmentById().
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-24 01:22:49 -05:00
Samuel Holland
290c98a9e3
ConfigListFragment: Avoid unnecessary findViewById
...
The generated ViewDataBinding has fields for each view with an id.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-24 01:22:20 -05:00
Samuel Holland
632f3f73a2
ConfigActivity: Log state transitions
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-23 23:51:08 -05:00
Samuel Holland
b2357e58e3
Config/Interface/Peer: Make Parcelable
...
This allows saving the editor state across restarts.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-23 23:47:44 -05:00
Samuel Holland
95384851cd
Config/Interface/Peer: Fix some missed change notifications
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-23 23:43:58 -05:00
Samuel Holland
d1a5c1a72e
VpnService: Fix some edge cases in ConfigUpdater
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-23 18:04:45 -05:00
Samuel Holland
0e46f95668
Config/Interface: Allow copyFrom() to work on null
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-23 18:02:37 -05:00
Samuel Holland
d3e6b311ca
BaseConfigActivity: Remember editing state
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-23 18:02:16 -05: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
3a264f7020
QuickTileService: Update the tile once on service init
...
This makes the tile show the correct info when it is first added.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-22 23:10:41 -05:00
Samuel Holland
353028420b
Add an adapter for binding an ObservableList to a LinearLayout
...
EditTexts do not work in ListViews.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-22 23:10:35 -05:00
Samuel Holland
fb919a7226
Use data binding to provide EditText input filters
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-22 21:48:42 -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
90cd59c866
ConfigActivity: Fix fragment state when leaving/entering app
...
Do this by making the fragment transition functions idempotent.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-21 21:25:31 -05:00
Samuel Holland
9026317b0e
Peer: Associate with a Config
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-19 18:50:35 -05:00
Samuel Holland
fbd923a060
Minor cleanups
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-19 18:48:07 -05:00
Samuel Holland
a49fe9adf5
ObservableAdapters: notify on map/list being set
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-18 23:25:40 -05:00
Samuel Holland
5b4e957122
MapAdapter: Stable IDs are based on value, not key
...
This fixes list selection to survive renaming configurations.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-17 08:22:19 -05:00
Samuel Holland
85fc5e7ebf
ConfigListFragment: Restore the non-FAB add menu
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-17 06:06:35 -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
d5d3566e6c
BaseConfigActivity: Make use of inner class's this
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-17 05:39:58 -05:00
Samuel Holland
27241d074e
VpnService: Use a string to remember the primary config
...
This allows simplifies the code a bit. Also, a few other minor changes.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-17 04:50:41 -05:00
Samuel Holland
c2189a78b9
ConfigEditFragment: Add extremely basic validation
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-17 03:32:01 -05:00
Samuel Holland
cb48a7be3a
Interface: Rework private key handling
...
This works much better with a data-bound UI -- no confusing erasing of
the text box, and no crashes, either!
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-17 03:30:06 -05:00
Samuel Holland
8bf12f3f55
VpnService: Remove extraneous call to super()
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-17 02:47:53 -05:00
Samuel Holland
44561a9cb6
ObservableArrayMapAdapter: Remove
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-17 02:44:18 -05:00
Samuel Holland
25412e0537
Convert to using the ObservableTreeMap and its adapter
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-17 02:43:15 -05:00
Samuel Holland
97149fff3f
ObservableMapAdapter: Based on an observable TreeMap
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-17 02:40:05 -05:00
Samuel Holland
5023c937ad
preferences: Control restoring enabled configs
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-16 04:37:11 -05:00
Samuel Holland
b753ae09ca
VpnService: Remember and optionally restore enabled configs
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-16 04:36:12 -05:00
Samuel Holland
08992185ec
SettingsActivity: Implement primary config setting
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-16 04:34:14 -05:00
Samuel Holland
e95b41e48b
ConfigListPreference: ListPreference for configs
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-16 04:29:55 -05:00
Samuel Holland
4ac1a2fafc
ConfigList: Denote the primary config with bold text
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-16 04:29:04 -05:00
Samuel Holland
a5e2c1c1b3
BindingAdapters: Create an adapter for textStyle
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-16 04:30:42 -05:00
Samuel Holland
eb43e49a95
VpnService: Remember and maintain the primary config
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-16 04:28:41 -05:00
Samuel Holland
8f0dcd0a32
Config: add an isPrimary property
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-16 04:26:45 -05:00
Samuel Holland
452641a0eb
Detail/Edit/ListFragment: Update the layouts
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-16 01:47:18 -05:00
Samuel Holland
645e263424
ConfigActivity: Inline PlaceholderFragment into the layout
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-16 01:43:15 -05:00
Samuel Holland
9e36e0d9c6
ConfigActivity: Make the two-pane layout more readable
...
Highlight the selected configuration, and add a border between the two
panes.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-16 01:38:46 -05:00
Samuel Holland
76eb65d7d5
Config: Make it Comparable
...
This will be used for future sorting.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-16 01:06:05 -05:00
Samuel Holland
6d2960b853
ConfigActivity: Adjust when the back arrow is shown
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-16 01:05:13 -05:00
Samuel Holland
73217a098a
ConfigListFragment: Implement config selection and removal
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-16 00:55:44 -05:00
Samuel Holland
f1d97a585a
Config: Rename function to make databinding happy
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-16 00:57:27 -05:00
Samuel Holland
b60536222d
VpnService: Tweaks for ConfigUpdater to fix adding
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-16 00:56:53 -05:00
Samuel Holland
c3203ce90a
ConfigDetailFragment: Move function to be in alphabetical order
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-16 00:47:58 -05:00
Samuel Holland
ebb0091ad4
ConfigActivity: Fix restoring layout on resume
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-16 00:46:43 -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
e9de916d69
BaseConfigActivity: Set initial config when service available
...
This was accidentally missed earlier when adding the optimization to
omit binding the service when unnecessary.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-15 17:37:06 -05:00
Samuel Holland
7f864badb2
KeyInputFilter: Extract to its own class
...
It will be reused for entering public keys of peers.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-15 17:33:00 -05:00
Samuel Holland
2103a28f8f
ConfigActivity: Show the current config in the title
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-15 17:07:17 -05:00
Samuel Holland
cfcda8bd13
BaseConfigActivity: Move menu handling to ConfigActivity
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-15 16:08:38 -05:00
Samuel Holland
d91770a1b6
ConfigActivity: Show back arrow in single layout action bar
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-14 19:33:19 -05:00
Samuel Holland
6604be94eb
ListFragment: Don't assume the ListView is the root
...
It may share the layout with a FAB, and that requires a parent
ViewGroup.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-14 18:40:46 -05:00
Samuel Holland
e6a6605ff8
ConfigActivity: Fragments are hard; this un-breaks animations
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-14 18:32:14 -05:00
Samuel Holland
ab271e7153
ConfigActivity: Enable animations on fragment transitions
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-14 15:20:57 -05:00
Samuel Holland
83da2aa199
EditFragment: Input filters for config name and private key
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-14 13:53:58 -05:00
Samuel Holland
d5ede015cf
ConfigActivity: Avoid crash when started while locked
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-14 10:44:29 -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
c72d30a1af
Profile: Add function to copy config from another profile
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-13 07:23:16 -05:00
Samuel Holland
f84d178e46
ProfileActivity: Remove unnecessary parameterization
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-13 06:22:31 -05:00
Samuel Holland
43500090b2
ProfileService: Rework handling of updates, again
...
Prefer updating an object instead of replacing it. This preserves the
selection in the UI list. Also make renaming atomic as it should be. Now
the only possibility for data loss is if the old file can be opened but
not written to.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-13 06:16:05 -05:00
Samuel Holland
dacd7457d2
ServiceClientFragment: Connect early if possible
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-10 01:11:00 -05:00
Samuel Holland
5fad89527d
ProfileList: Fix state tracking
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-10 01:10:15 -05:00
Samuel Holland
de53a1b50a
ProfileEdit: Finish writing code-behind
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-10 01:05:20 -05:00
Samuel Holland
87d3200b29
ProfileActivity: Do menus correctly
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-10 01:04:46 -05:00
Samuel Holland
d6d6f34088
ProfileFragment: Make good use of the cached profile
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-10 00:57:44 -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
af8e013e33
Hook up editing to the layout and menus
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-09 07:31:12 -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
671aae7489
ProfileActivity: Do not use onClick for menus
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-09 07:28:04 -05:00
Samuel Holland
7d2d9f0cb3
ProfileActivity: Also remember editing state
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-09 07:25:11 -05:00
Samuel Holland
2c4f605b66
ProfileFragment: Helper class to remember a fragment's profile
...
Caching the actual profile object is important when the fragment is on
an activity's back stack: when it is shown again, onCreateView will be
called with profile already set and the service already connected. In
this case, there is no later notification from which to bind the
profile, so the existing object needs to be bound there.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-09 07:18:31 -05:00
Samuel Holland
39ed03f758
ProfileList: Add the list fragment in code so it knows the layout
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-09 06:19:37 -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
529e320e3f
Interface: Correctly handle setting a null or empty key
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-09 02:51:54 -05:00
Samuel Holland
f0f9192aed
KeyEncoding: Clean up and reorganize to match style
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-09 02:51:08 -05:00
Samuel Holland
c3afe5be2c
Keypair: Convert to java-style array declarations
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-09 02:44:46 -05:00
Jason A. Donenfeld
f6b864d4e7
Constant time base64
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-08 18:22:41 +02:00
Samuel Holland
f8d8e5e23e
res: Add icons for quick settings tile
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-08 05:55:27 -05:00
Samuel Holland
99973a4b08
Profile: Add helper to check name validity
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-08 05:54:35 -05:00
Samuel Holland
c59b3e1230
Profile: Make name modifiable
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-08 05:54:12 -05:00
Samuel Holland
0685d4a159
ProfileActivity: Refactor into clean layers of functionality
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-08 05:51:38 -05:00
Samuel Holland
3076fd8c41
ProfileServiceInterface: Update for map-based collection
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-07 20:19:29 -05:00
Samuel Holland
01524c0dbf
ProfileService: Use a map to store profile data
...
This has no visible changes at the moment, but will allow most functions
to pass around strings instead of Profile objects, obviating the need to
implement serialization for them. It also trades some naive linear
searches for the binary search in SimpleArrayMap.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-07 19:55:11 -05:00
Samuel Holland
7d3e796842
ObservableArrayMapAdapter: Copy ObservableListAdapter
...
Since the conversion to a sequential list (to implement ListAdapter)
depends on the implementation detail that ObservableArrayMap is backed
by an array, we can't use the ObservableMap interface here.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-07 19:46:19 -05:00
Samuel Holland
2df899eae5
ProfileActivity: Add two-pane master-detail layout
...
This is designed for tablets, but for testing purposes, it is currently
enabled for all devices in landscape orientation.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-07 18:51:47 -05:00
Samuel Holland
2154306fcb
PlaceholderFragment: Simple fragment that shows a message
...
This is used for the detail pane when no profile is selected.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-07 18:48:46 -05:00
Samuel Holland
4c96e55b49
ProfileActivity: Make local variables final
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-07 18:43:52 -05:00
Samuel Holland
00a755f46f
ProfileActivityFragment: Fix service connection tracking
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-07 18:42:38 -05:00
Samuel Holland
372477d0e0
ProfileList: Load fragment programmatically
...
This is necessary to replace it with the profile detail fragment later.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-07 16:55:02 -05:00
Samuel Holland
93e304ba2d
ProfileList: Extract service management into a base class
...
It will be shared with other fragments.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-04 12:39:56 -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
d0bf3b6b32
ProfileList: remove generated config from UI
...
It was only there for developing the parser.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-04 00:40:43 -05:00
Samuel Holland
4b401a368f
RootShell: Make shell command configurable
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-04 00:37:58 -05:00
Samuel Holland
f0ac53e29b
icon: Remove transparency inside non-round dragon
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-04 00:35:02 -05:00
Samuel Holland
6c71b88abd
ProfileList: Remove "Add" menu action, to be replaced by a FAB
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-01 02:06:17 -05:00
Samuel Holland
5d5cdf54fa
ProfileService: Rework profile updating
...
This should help discourage editing a Profile without making a copy
first, since the caller has to keep track of the old Profile as well.
ProfileAdder has been updated to prevent adding duplicate profiles. It
checks once in the constructor, so the caller can catch the exception
and pass the error back to the UI. It checks again in the worker thread
to prevent any race from happening if a profile is added twice quickly.
Either the file exists, or it doesn't.
Additionally, this change solves the race condition when the old
profile is removed before it is updated; previously this would lead
to the profile being re-added. Now, ProfileRemover will fail and the
profile will stay removed.
Finally, updating a profile's name should now work correctly. There were
previously multiple bugs with that (the old profile wasn't removed, the
new one could duplicate a name, the new one could overwrite some random
other one, etc.).
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-01 01:38:39 -05:00
Samuel Holland
874db0b95e
Interface: Convert to using Keypair class
...
This allows retrieving the public key and generating keypairs, both of
which will be exposed in the UI.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-01 01:12:59 -05:00
Samuel Holland
19e8087642
Keypair: Create class for generating/storing keys
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-01 01:08:56 -05:00
Samuel Holland
4208d524b1
Curve25519: Import class from noise-java
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-01 01:06:34 -05:00
Samuel Holland
1e0a437c3b
RootShell: rename SETUP to SETUP_TEMPLATE
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-08-04 00:37:29 -05:00
Samuel Holland
e718a7c03c
RootShell: Use the application cache dir as TMPDIR
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-07-31 23:21:59 -05:00
Samuel Holland
544812b2a7
ProfileService: Use wg to enumerate interfaces
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-07-31 23:11:18 -05:00
Samuel Holland
b324e7b7f1
BootCompletedReceiver: Enforce receiving the correct broadcast
...
This satisfies an Android security lint.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-07-31 22:15:50 -05:00
Samuel Holland
84e19d6c72
ProfileList: Add a simple menu
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-07-29 06:39:37 -05:00
Samuel Holland
411b0716f2
ProfileList: Toggle connection state on click
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-07-31 21:30:51 -05:00
Samuel Holland
b6653fd7f0
ProfileService: Implement the rest of its interface
...
As per the FIXMEs, the list of profiles should eventually become a map.
Since it can only be modified on the main thread anyway, the current
code is still safe, and it works, it's just not optimal.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-07-31 21:22:02 -05:00
Samuel Holland
0ea5ae605c
ProfileService: Use deep copy to clone profiles
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-07-31 21:20:04 -05:00
Samuel Holland
ca708ba382
Profile: Implement deep copying
...
This is a simple, naive implementation that {,de}serializes the
profile's state, but it does not depend on the internal representation
of Profile or its contained classes.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-07-31 21:14:42 -05:00
Samuel Holland
c3b42b85cc
Copyable: New utility interface for deep-copyable classes
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-07-31 21:11:33 -05:00
Samuel Holland
465a969a70
ProfileList: Add indicator of profile connection state
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-07-31 21:29:29 -05:00
Samuel Holland
0451370caf
ProfileService: Check for existing interfaces when loading profiles
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-07-31 21:18:14 -05:00
Samuel Holland
a1e334efa6
Profile: Track connection state
...
Observability is only enabled for isConnected because it is the only
mutable property.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-07-31 21:13:01 -05:00
Samuel Holland
8623437185
ProfileService: Expand and document service interface
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-07-31 19:06:47 -05:00
Samuel Holland
2b56dd5d8f
RootShell: Add helper class for running commands as root
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-07-31 19:00:05 -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
d8a5ec3f19
ProfileService: Only load from files ending with .conf
...
This condition was previously enforced in the AsyncTask, but was lost in
the move from ProfileListActivity to ProfileService.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-07-30 02:18:17 -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
5af6703157
binding: Weakly reference adapter in list change callback
...
This allows the ObservableListAdapter to be garbage collected along with
its activity. On the next list change, the OnListChangedCallback will
detect that the adapter is gone and clean itself up. This avoids needing
to manually remove the list from the adapter, as would otherwise be
required to break the reference cycle adapter→list→listener→adapter.
This will be relevant once the list of profiles outlives the activity.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-07-30 18:44: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
85f1d4f1d3
Profile: Add a blank line before each peer section
...
This is purely a cosmetic change in the generated config files.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-07-29 17:40:36 -05:00
Samuel Holland
748d780a47
Profile: Parse config file to a string per attribute
...
This parser should be able to handle any valid WireGuard or wg-quick
configuration file. It separates the file into a single interface object
and a peer object for each peer. All "[Interface]" sections in the file
are combined into the one object.
For now, later lines in a block with the same key overwrite earlier
lines. This is only relevant for attributes that are lists, such as
Address and AllowedIPs, where additional lines may be expected to append
to the list.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-07-29 17:30:33 -05:00
Samuel Holland
0494dd1404
Profile: Add minimal implementation
...
This represents a wg-quick profile as two strings: the file name and
the file contents.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-07-29 06:08:54 -05:00
Samuel Holland
f8b7030e22
project: Add gradle wrapper
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-07-28 23:11:24 -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
Jason A. Donenfeld
b8cb52ed4b
project: Skeleton with license and readme
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-07-31 03:00:41 +02:00
Jason A. Donenfeld
506d871013
cli: only call DNS if there is DNS
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-07-31 22:26:00 +02:00
Jason A. Donenfeld
b2f4a755a0
cli: add multi-DNS to wg-quick
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-07-31 05:15:05 +02:00
Jason A. Donenfeld
df4fc98493
cli: import from contrib/examples/android
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-07-31 03:02:26 +02:00
Samuel Holland
e85142dbfc
git: Initialize repository
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
2017-07-28 22:59:47 -05:00