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
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
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
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
5658584803
global: update copyright headers
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-09-06 21:32:46 -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
Eric Kuck
8e0835e570
Added QR code scanner as tunnel import method
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-07-25 02:05:11 +02:00
Eric Kuck
67ea8b2936
global: Add nullity annotations
...
Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
2018-07-13 03:46:23 +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
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
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
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
7eedf08d4b
global: Automatic code formatting
...
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-04-30 11:39:12 -05: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
f4e462fabd
Allow importing from zip file
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-04-28 21:55:42 +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
Samuel Holland
609194fae2
Serviceless rewrite, part 1
...
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-06 04:09:29 -06:00
Jason A. Donenfeld
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
e421b997cd
Config: make parsing stricter
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-11-26 23:45:41 +01: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
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
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
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
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
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
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
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
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
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