aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/app/src/main/java/com/wireguard/config/Attribute.java (follow)
Commit message (Collapse)AuthorAgeFilesLines
* global: update copyright headersJason A. Donenfeld2018-09-061-2/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Supress false-positive DefaultLocale warningsHarsh Shandilya2018-08-261-0/+3
| | | | | | We decided in 402472237e8f that it's a bad idea for our use-case Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* config: show more informative error message on wrong keyJason A. Donenfeld2018-07-271-0/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* config: Remove Locale based string formatHarsh Shandilya2018-07-241-2/+1
| | | | | | | | | | | | 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>
* global: Add nullity annotationsEric Kuck2018-07-131-2/+5
| | | | Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
* global: move to Apache 2.0Jason A. Donenfeld2018-07-061-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* AppListDialogFragment: add implementation for excluding applicationsEric Kuck2018-07-061-2/+3
| | | | Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
* config: Refactor IPCidr and use of InetAddressSamuel Holland2018-06-191-27/+0
| | | | | | | | | 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>
* config: loosen parser to match realityJason A. Donenfeld2018-05-031-2/+2
| | | | | | Mid-line comments, mixed case. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: fix up copyrightsJason A. Donenfeld2018-05-031-0/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: Add or update copyright headers in Java codeSamuel Holland2018-05-021-0/+5
| | | | Signed-off-by: Samuel Holland <samuel@sholland.org>
* global: Clean up JavaSamuel Holland2018-04-301-13/+14
| | | | | | Address Java and Android lints. Signed-off-by: Samuel Holland <samuel@sholland.org>
* global: Automatic code formattingSamuel Holland2018-04-301-19/+19
| | | | Signed-off-by: Samuel Holland <samuel@sholland.org>
* config: Minor cleanupHarsh Shandilya2018-04-281-5/+2
| | | | | | | | | - 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>
* Use validation instead of two-way bindingJason A. Donenfeld2018-04-281-0/+2
| | | | | | | | | | | | | | 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-271-0/+27
| | | | | | | 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-271-1/+1
| | | | | | | | | 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>
* More javaficationJason A. Donenfeld2018-04-181-3/+8
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Remove sloppy java with enterprise java horrorsJason A. Donenfeld2018-04-171-0/+19
| | | | | | | 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>
* Serviceless rewrite, part 1Samuel Holland2018-01-061-15/+15
| | | | Signed-off-by: Samuel Holland <samuel@sholland.org>
* Config: make parsing stricterJason A. Donenfeld2017-11-261-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Peer: Add a field for the optional pre-shared keySamuel Holland2017-08-241-0/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Major renaming and refactoring in activity and serviceSamuel Holland2017-08-131-6/+6
| | | | | | Apparently "configuration" is the proper term, not "profile". Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Profile: Parse config file to a string per attributeSamuel Holland2017-07-291-0/+57
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>