aboutsummaryrefslogtreecommitdiffstats
path: root/WireGuard/Shared (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* 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>
* Model: TunnelConfiguration: Add explicit conformance to DecodableRoopesh Chander2018-11-101-1/+15
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Model: Ensure that a TunnelConfiguration always has a valid array of peersRoopesh Chander2018-11-101-2/+9
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Remove unused file PacketTunnelOptionKey.swiftRoopesh Chander2018-11-081-30/+0
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Model: Endpoint.hostname()Roopesh Chander2018-11-081-0/+11
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Move logic to extension: NETunnelProviderProtocol extension code should be sharedRoopesh Chander2018-11-081-0/+35
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Model: Move InterfaceConfiguration.publicKey to Curve25519.swiftRoopesh Chander2018-11-081-4/+0
| | | | | | The code for public key calculation need not be shared with the extension Signed-off-by: Roopesh Chander <roop@roopc.net>
* Move logic to extension: Move model files to SharedRoopesh Chander2018-11-084-0/+287
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Global: fix up captialization in headersJason A. Donenfeld2018-10-301-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* VPN: Bring up the tunnelRoopesh Chander2018-10-271-0/+30
The app figures out all settings and passes them in the 'options' parameter of startTunnel(). The network extension just takes them as is and just plugs the supplied values into the right places. Signed-off-by: Roopesh Chander <roop@roopc.net>