aboutsummaryrefslogtreecommitdiffstats
path: root/WireGuard/Shared (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Logger: Convert do-catch to try?Roopesh Chander2019-01-281-3/+2
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Config file parsing: Fix bug when there are comments at the endRoopesh Chander2019-01-241-28/+28
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Tunnel: support getting runtime configurationJason A. Donenfeld2019-01-242-0/+5
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Better os() directivesRoopesh Chander2019-01-221-1/+3
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Parsing: Always error on unrecognized keysRoopesh Chander2019-01-141-12/+10
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Parsing: Error on duplicate entriesRoopesh Chander2019-01-141-2/+7
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* macOS: Refactor config file parsingRoopesh Chander2019-01-141-26/+71
| | | | | | | - To report more fine grained errors - To make the parse errors conform to WireGuardAppError Signed-off-by: Roopesh Chander <roop@roopc.net>
* Make app groups work on both iOS and macOSRoopesh Chander2019-01-141-1/+6
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Update copyrightJason A. Donenfeld2019-01-0714-14/+14
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Don't set username on NETunnelProviderProtocolRoopesh Chander2018-12-221-3/+0
| | | | | | | | The username corresponds to the Account field in iOS system VPN UI, but if we don't set it, the field is not shown, so setting it isn't really required. Signed-off-by: Roopesh Chander <roop@roopc.net>
* All models now EquatableEric Kuck2018-12-216-0/+75
| | | | Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
* Localize remaining strings in network extensionJason A. Donenfeld2018-12-221-0/+8
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Move model helpers to model directoryJason A. Donenfeld2018-12-224-2/+0
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Move name from interface to tunnelJason A. Donenfeld2018-12-225-16/+17
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Nuke trailing spacesJason A. Donenfeld2018-12-2110-60/+60
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* providerConfiguration is now a WgQuickConfigEric Kuck2018-12-2110-195/+248
| | | | Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
* All migration stuff moved to one gross fileEric Kuck2018-12-218-255/+196
| | | | Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
* Simplify versioning of stored dataJason A. Donenfeld2018-12-211-26/+10
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Get rid of superflous isActivateOnDemandEnabled keyJason A. Donenfeld2018-12-211-11/+3
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Updated NETunnelProvider save formatEric Kuck2018-12-2114-186/+564
| | | | Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
* Enabled more swiftlint rulesEric Kuck2018-12-201-0/+1
| | | | Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
* Remove non-helpful commentsRoopesh Chander2018-12-193-6/+0
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* TunnelsManager: If only Activate On Demand has changed, don't restart tunnelRoopesh Chander2018-12-191-0/+6
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* NE: Handle bad domain names and Activate On DemandRoopesh Chander2018-12-191-2/+7
| | | | | | | | | | | This combination causes iOS to keep trying to bring up the tunnel, leading to a lot of displayMessage() alerts. In this fix, if we get a DNS resolution error in an Activate On Demand enabled tunnel, we silently retry 9 times (with a 4-second delay before each retry) and then show the displayMessage() alert. Signed-off-by: Roopesh Chander <roop@roopc.net>
* Most similar views now shared between ViewControllersEric Kuck2018-12-141-1/+1
| | | | Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
* Prettier log time formatJason A. Donenfeld2018-12-151-9/+19
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Simplify logging tagsJason A. Donenfeld2018-12-143-19/+28
| | | | | | | This was roop's initial idea, and it turns out to be the better one, now that we can pass cstrings more easily. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Simplify filemanager extensionJason A. Donenfeld2018-12-131-18/+13
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Can't -> cannotJason A. Donenfeld2018-12-131-5/+5
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* NE: Communicate last error to app through a shared fileRoopesh Chander2018-12-141-0/+12
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Simplify C stringsJason A. Donenfeld2018-12-131-13/+6
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Rewrite LoggerJason A. Donenfeld2018-12-133-77/+78
| | | | | | | This reverts all of Roop's changes to the C code, and then rewrites the logger logic to be cleaner. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Logging: Write versions from both app and extensionRoopesh Chander2018-12-131-0/+10
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Logging: file_log doesn't need the message typeRoopesh Chander2018-12-131-3/+3
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Logging: Tag the entries in the merged logRoopesh Chander2018-12-133-6/+13
| | | | | | | So we know which entry is from the app and which is from the network extension. Signed-off-by: Roopesh Chander <roop@roopc.net>
* Logging: Use ringlogger for logging from the appRoopesh Chander2018-12-131-1/+1
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Logging: ringlogger.c: Trim trailing newlinesRoopesh Chander2018-12-131-0/+7
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Logging: Use ringlogger for logging from the extensionRoopesh Chander2018-12-134-19/+80
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Commit untested ringlogger codeJason A. Donenfeld2018-12-132-0/+139
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* More formatting nits and cyclomatic complexity fixesEric Kuck2018-12-122-6/+4
| | | | Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
* More linter warnings fixed, enabled more swiftlint rules, project cleanupEric Kuck2018-12-121-1/+1
| | | | Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
* Tons more swiftlint warnings fixed. Still a few remaining.Eric Kuck2018-12-121-7/+7
| | | | Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
* Added swiftlint and fixed all errors (and a bunch, but not all, warnings)Eric Kuck2018-12-125-18/+26
| | | | Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
* Model: Declare keyLength constant and use that wherever applicableRoopesh Chander2018-12-091-3/+6
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Make strings consistentJason A. Donenfeld2018-12-071-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Refactoring: Consolidate file deletion into a separate functionRoopesh Chander2018-12-071-0/+10
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* NE: Write log to fileRoopesh Chander2018-11-301-0/+19
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Model, Tunnels manager: Rewrite the model for VPN-on-demandRoopesh Chander2018-11-123-88/+2
| | | | | | | | | The VPN-on-demand settings should not be part of the tunnel configuration. Rather, the onDemandRules stored in the tunnel provider configuration serve as the one place where the VPN-on-demand settings are stored. Signed-off-by: Roopesh Chander <roop@roopc.net>
* Model: Add activationType to tunnel configurationRoopesh Chander2018-11-113-19/+25
| | | | | | | | | We make sure existing tunnel serializations can be deserialized correctly. We also bump up the tunnelConfigurationVersion, because the tunnel configuration contents have changed. Signed-off-by: Roopesh Chander <roop@roopc.net>
* Model: ActivityType enum to represent VPN-on-demand optionsRoopesh Chander2018-11-101-0/+66
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>