Commit Graph

653 Commits

Author SHA1 Message Date
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