aboutsummaryrefslogtreecommitdiffstats
path: root/WireGuard/WireGuard/VPN (follow)
Commit message (Collapse)AuthorAgeFilesLines
* mv WireGuard/WireGuard/VPN/ WireGuard/WireGuard/Tunnel/Roopesh Chander2018-12-133-606/+0
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Remove useless whitespaceJason A. Donenfeld2018-12-131-5/+5
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* More formatting nits and cyclomatic complexity fixesEric Kuck2018-12-121-37/+34
| | | | Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
* More linter warnings fixed, enabled more swiftlint rules, project cleanupEric Kuck2018-12-122-20/+17
| | | | Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
* Tons more swiftlint warnings fixed. Still a few remaining.Eric Kuck2018-12-123-40/+39
| | | | Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
* Added swiftlint and fixed all errors (and a bunch, but not all, warnings)Eric Kuck2018-12-121-25/+24
| | | | Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
* TunnelsManager: Error out only on no-internet scenarioRoopesh Chander2018-12-111-4/+4
| | | | | | The other scenario happens even during reloading of a tunnel for activation. Signed-off-by: Roopesh Chander <roop@roopc.net>
* Remove the feature of waiting for another tunnel to deactivateRoopesh Chander2018-12-111-55/+9
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* TunnelsManager: Deactivate only when the status becomes 'connected'Roopesh Chander2018-12-111-3/+11
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* TunnelsManager: Handle status change in TunnelsManagerRoopesh Chander2018-12-111-66/+78
| | | | | | Rather than in TunnelContainer. Signed-off-by: Roopesh Chander <roop@roopc.net>
* Error handling: alertText() can be nilRoopesh Chander2018-12-111-1/+1
| | | | | | Indicating that no alert is to be shown for that error. Signed-off-by: Roopesh Chander <roop@roopc.net>
* TunnelsManager: Don't act on status change on tunnelProviders we don't haveRoopesh Chander2018-12-101-2/+0
| | | | | | That causes errors we don't want, and duplicate notifications. Signed-off-by: Roopesh Chander <roop@roopc.net>
* TunnelsManager: Always call the completion handler before returningRoopesh Chander2018-12-101-0/+4
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* TunnelsManager: Debugging helpers for tunnel statusRoopesh Chander2018-12-101-0/+27
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* TunnelsManager: Handle deactivation of a waiting tunnelRoopesh Chander2018-12-101-1/+6
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* TunnelsManager: Observe status for all tunnels in one blockRoopesh Chander2018-12-081-52/+54
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* TunnelsManager: Remove unused variablesRoopesh Chander2018-12-081-14/+0
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* State restoration: Restore tunnel detail viewRoopesh Chander2018-12-071-0/+4
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Error handling: Introduce a WireGuardResult type to handle errors in callbacks across the appRoopesh Chander2018-12-071-28/+2
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Error handling: Introduce a WireGuardAppError protocol to manage errorsRoopesh Chander2018-12-071-1/+27
| | | | | | The alert strings shall be located next to where the errors are declared. Signed-off-by: Roopesh Chander <roop@roopc.net>
* Error handling: Cleanup Tunnels Manager errorsRoopesh Chander2018-12-071-45/+65
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Refactor out VPN-handling stuff from tunnels list VC to the main VCRoopesh Chander2018-12-031-8/+8
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* VPN: Error out when tunnel activation fails because there's no internetRoopesh Chander2018-12-032-6/+91
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* It's 'WiFi', not 'Wifi'Roopesh Chander2018-11-281-6/+6
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Tunnels manager: After saving after activating on-demand, reload tunnelRoopesh Chander2018-11-141-3/+16
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Tunnels manager: Need to keep VPN-on-demand tunnels's status under observationRoopesh Chander2018-11-121-4/+13
| | | | | | Because they can turn on automatically, even while the app is in the foreground. Signed-off-by: Roopesh Chander <roop@roopc.net>
* Tunnels manager: Keep track of NETunnelProviderManager's isOnDemandEnabled propertyRoopesh Chander2018-11-121-3/+8
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Model, Tunnels manager: Rewrite the model for VPN-on-demandRoopesh Chander2018-11-122-36/+86
| | | | | | | | | 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>
* TunnelsManager: Support for on-demand rulesRoopesh Chander2018-11-111-0/+36
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* VPN: When activating while another tunnel is active, deactivate the other tunnelRoopesh Chander2018-11-101-7/+14
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* TunnelsManager: startDeactivation() need not take a completion handlerRoopesh Chander2018-11-101-2/+1
| | | | | | Because the completion handler pattern doesn't fit in this case. Signed-off-by: Roopesh Chander <roop@roopc.net>
* VPN: There are no DNS errors to handle in the app nowRoopesh Chander2018-11-101-1/+0
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* TunnelsManager: Ability to refresh connection statusesRoopesh Chander2018-11-091-0/+14
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Move logic to extension: NETunnelProviderProtocol extension code should be sharedRoopesh Chander2018-11-081-31/+0
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Move logic to extension: Move DNSResolver to extensionRoopesh Chander2018-11-081-158/+0
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Move logic to extension: .resolvingEndpointDomains is not longer a valid statusRoopesh Chander2018-11-081-5/+0
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Move logic to extension: DNS resolution no longer happens in the appRoopesh Chander2018-11-081-44/+5
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Move logic to extension: Move PacketTunnelOptionsGenerator to the extensionRoopesh Chander2018-11-081-178/+0
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Move logic to extension: Invoke startTunnel() without any optionsRoopesh Chander2018-11-081-4/+1
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* TunnelsManager: Return a manager with no tunnels in the simulatorRoopesh Chander2018-11-071-0/+5
| | | | | | To be able to run at least parts of the app in the simulator. Signed-off-by: Roopesh Chander <roop@roopc.net>
* DNSResolver: No need to resolve if the endpoint is already an IP addressRoopesh Chander2018-11-061-2/+6
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Global: swiftlint autocorrect --formatRoopesh Chander2018-11-061-6/+6
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* TunnelsManager: account for no or many endpointsJason A. Donenfeld2018-11-052-20/+20
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* XCode: use old network extension ID0.0.20181104-1Jason A. Donenfeld2018-11-041-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Global: run through swiftlintJason A. Donenfeld2018-11-033-12/+12
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* TunnelsManager: restore sanityJason A. Donenfeld2018-11-031-45/+20
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* VPN: Make sure actions inside tunnelProvider completion handlers are done in the main queueRoopesh Chander2018-11-031-17/+35
| | | | | | They should really already be in the main queue, but we do this just in case. Signed-off-by: Roopesh Chander <roop@roopc.net>
* VPN: Start observing the status only if startTunnel() succeedsRoopesh Chander2018-11-031-1/+1
| | | | | | This should fix the status change to .disconnected when we're resolving endpoints Signed-off-by: Roopesh Chander <roop@roopc.net>
* VPN: We should never get a status change to .disconnected if we're resolving endpointsRoopesh Chander2018-11-031-0/+1
| | | | | | But we do, which we'll fix subsequently Signed-off-by: Roopesh Chander <roop@roopc.net>
* Revert "TunnelsManager: initialize observer on correct thread"Roopesh Chander2018-11-031-7/+5
| | | | | | | | | Rather, we'll make sure we always call startObservingTunnelStatus from the main thread. This reverts commit d16a6a167c8217e81dd9111d1ad9e4ec6429ef3b. Signed-off-by: Roopesh Chander <roop@roopc.net>