aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/app/src/main/java/com/wireguard (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Keypair: Minimize the scope of warning suppressionSamuel Holland2018-05-021-1/+1
| | | | Signed-off-by: Samuel Holland <samuel@sholland.org>
* KeyEncoding: Address lints/warnings and match line lengthSamuel Holland2018-05-021-9/+12
| | | | Signed-off-by: Samuel Holland <samuel@sholland.org>
* global: Add or update copyright headers in Java codeSamuel Holland2018-05-0245-1/+224
| | | | Signed-off-by: Samuel Holland <samuel@sholland.org>
* global: Some more lint cleanupHarsh Shandilya2018-05-022-31/+28
| | | | Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* ZipExporterPreference: account for directory already existingJason A. Donenfeld2018-04-301-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: Clean up JavaSamuel Holland2018-04-3013-215/+237
| | | | | | Address Java and Android lints. Signed-off-by: Samuel Holland <samuel@sholland.org>
* global: Clean up XMLSamuel Holland2018-04-301-2/+5
| | | | Signed-off-by: Samuel Holland <samuel@sholland.org>
* global: Automatic code formattingSamuel Holland2018-04-3014-905/+876
| | | | Signed-off-by: Samuel Holland <samuel@sholland.org>
* Tunnel importer: stricter file filtersJason A. Donenfeld2018-04-301-2/+8
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ZipExporterPreference: requireNonNull is redundantJason A. Donenfeld2018-04-301-2/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* wg: Collapse fab when pressing back before exitingHarsh Shandilya2018-04-302-2/+19
| | | | Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* SettingsActivity: Migrate permissions check to AppCompatHarsh Shandilya2018-04-301-20/+11
| | | | | | Pretty straightforward, I was clearly overthinking this. Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* ZipExporterPreference: Correctly get preference activityHarsh Shandilya2018-04-301-2/+14
| | | | | | | | 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>
* TunnelListFragment: Use Collections methods in place of ArraysHarsh Shandilya2018-04-301-2/+3
| | | | Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* wg: Break out crossport dependencyHarsh Shandilya2018-04-305-8/+7
| | | | | | | Replace all crossport uses with upstream design support library components. Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* SettingsActivity: Gracefully exit when options menu home is pressedHarsh Shandilya2018-04-301-0/+12
| | | | | | | | | | | | | | | | | | | | 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>
* Prefer AppCompat classesHarsh Shandilya2018-04-307-44/+42
| | | | | | | | | | 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>
* TunnelDetailFragment: rewrite and simplifyJason A. Donenfeld2018-04-301-22/+10
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* TunnelEditorFragment: rewrite and simplifyJason A. Donenfeld2018-04-306-279/+199
| | | | | | | This should remove some null pointer dereferences and overall make the thing more robust. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Allow exporting to zip fileJason A. Donenfeld2018-04-292-0/+173
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Allow importing from zip fileJason A. Donenfeld2018-04-282-45/+116
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* config: Minor cleanupHarsh Shandilya2018-04-284-18/+23
| | | | | | | | | - 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>
* Quick cleanup across the boardHarsh Shandilya2018-04-288-19/+16
| | | | | | | | | | - 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>
* Use validation instead of two-way bindingJason A. Donenfeld2018-04-287-119/+340
| | | | | | | | | | | | | | 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>
* Do not do DNS lookups for IPsJason A. Donenfeld2018-04-274-14/+29
| | | | | | | 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>
* Throw IllegalArgumentExceptions when arguments are badJason A. Donenfeld2018-04-274-37/+35
| | | | | | | | | 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>
* WgQuickBackend: always create configuration fileJason A. Donenfeld2018-04-261-10/+5
| | | | | | It might be removed on an update. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* GoBackend: bring down tunnels when revoked or disconnectedJason A. Donenfeld2018-04-251-0/+6
| | | | | | | 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>
* Curve25519: fix up spacingJason A. Donenfeld2018-04-251-491/+491
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Update application state based on wg-quickJason A. Donenfeld2018-04-233-1/+21
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Determine MTU automaticallyJason A. Donenfeld2018-04-181-2/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* More javaficationJason A. Donenfeld2018-04-185-190/+335
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* GoBackend: default MTU is 1280Jason A. Donenfeld2018-04-171-2/+11
| | | | | | | 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>
* Remove sloppy java with enterprise java horrorsJason A. Donenfeld2018-04-174-95/+147
| | | | | | | 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>
* GoBackend: Handle vpn service expirationAurélien Chabot2018-04-171-8/+22
| | | | | | | | 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>
* Config: Handle multiple address or dns in config fileAurélien Chabot2018-04-171-2/+16
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* GoBackend: Add support for multiple address and dns as a comma separated listAurélien Chabot2018-04-171-4/+11
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* GoBackend: parse allowed ipsAurélien Chabot2018-04-171-5/+33
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* GoBackend: Parse the dns addressAurélien Chabot2018-04-171-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* GoBackend: IPv6 handlingAurélien Chabot2018-04-171-6/+25
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* GoBackend: Resolve endpoint before passing it to the go libAurélien Chabot2018-04-171-2/+15
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* GoBackend: Use the android VpnService to encapsulate the go backendAurélien Chabot2018-04-172-6/+90
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* GoBackend: integrate into appJason A. Donenfeld2018-02-175-38/+152
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* KeyEncoding: add constant time hex implementationJason A. Donenfeld2018-02-131-2/+44
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* FileConfigStore: Warn for deletion failure in exception pathSamuel Holland2018-01-181-1/+2
| | | | | | | 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>
* WgQuickBackend: Always pass the full path to wg-quickSamuel Holland2018-01-181-20/+21
| | | | Signed-off-by: Samuel Holland <samuel@sholland.org>
* fragments: Be extra paranoid about the binding getting destroyedSamuel Holland2018-01-181-4/+8
| | | | Signed-off-by: Samuel Holland <samuel@sholland.org>
* TunnelManager: Use constants directly where appropriateSamuel Holland2018-01-171-2/+2
| | | | Signed-off-by: Samuel Holland <samuel@sholland.org>
* Peer: Add missing @OverrideSamuel Holland2018-01-171-0/+1
| | | | Signed-off-by: Samuel Holland <samuel@sholland.org>
* WgQuickBackend: Clean up unused fields and importsSamuel Holland2018-01-171-4/+0
| | | | Signed-off-by: Samuel Holland <samuel@sholland.org>