aboutsummaryrefslogtreecommitdiffstats
path: root/WireGuard/WireGuard/Tunnel/TunnelsManager.swift (follow)
Commit message (Collapse)AuthorAgeFilesLines
* macOS: reload: Iterate in reverseRoopesh Chander2019-01-221-5/+3
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* TunnelsManager: refresh status after replacing insidesJason A. Donenfeld2019-01-221-0/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* TunnelsManager: use new helperJason A. Donenfeld2019-01-221-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* macOS: Handle tunnel deletions outside the appRoopesh Chander2019-01-221-18/+39
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* TunnelsManager: Remove unused variableRoopesh Chander2019-01-181-1/+0
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* macOS: Different status bar icon looks for different statesRoopesh Chander2019-01-161-0/+4
| | | | | | | | - Looks dimmed when no tunnel is active - Looks normal when a tunnel is active - Animates when a tunnel is activating Signed-off-by: Roopesh Chander <roop@roopc.net>
* Update copyrightJason A. Donenfeld2019-01-071-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Fix typo for simulator buildsEric Kuck2018-12-221-1/+1
| | | | Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
* TunnelErrors: Add alert text for PacketTunnelProviderErrorRoopesh Chander2018-12-221-13/+4
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Also refresh statusJason A. Donenfeld2018-12-221-1/+4
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Reassign tunnelProvider if it changes from outside the appJason A. Donenfeld2018-12-221-2/+4
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* All models now EquatableEric Kuck2018-12-211-1/+1
| | | | Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
* Clean up trailing whitespaceJason A. Donenfeld2018-12-221-3/+3
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Removing a tunnel from iOS's settings is now immediately reflected in appEric Kuck2018-12-211-33/+43
| | | | Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
* Localize remaining strings in network extensionJason A. Donenfeld2018-12-221-6/+15
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Combine double log invocationsJason A. Donenfeld2018-12-221-4/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Move name from interface to tunnelJason A. Donenfeld2018-12-221-5/+5
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Fix paren typoJason A. Donenfeld2018-12-211-2/+2
| | | | | | "I am very anti-paren." --Eric Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Nuke trailing spacesJason A. Donenfeld2018-12-211-7/+7
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* providerConfiguration is now a WgQuickConfigEric Kuck2018-12-211-17/+13
| | | | Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
* Get rid of superflous isActivateOnDemandEnabled keyJason A. Donenfeld2018-12-211-4/+4
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Updated NETunnelProvider save formatEric Kuck2018-12-211-9/+17
| | | | Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
* Added a String->[String] helperEric Kuck2018-12-201-1/+1
| | | | Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
* TunnelsManager: If only Activate On Demand has changed, don't restart tunnelRoopesh Chander2018-12-191-6/+11
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* NE: Handle bad domain names and Activate On DemandRoopesh Chander2018-12-191-2/+2
| | | | | | | | | | | 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>
* TunnelsManager: Handle waiting on a stale tunnelRoopesh Chander2018-12-191-13/+23
| | | | | | | | | If we have a stale tunnel on which we don't get status updates we rely on a timer to update the status (see commit 34a7e5b). Previously, if the user tries to activate another tunnel, that resulted in both tunnels waiting indefinitely. This commit fixes that. Signed-off-by: Roopesh Chander <roop@roopc.net>
* Error handling: Add info on the underlying system error to error alertsRoopesh Chander2018-12-171-69/+10
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Got TunnelsManager back under the max file length by splitting out NEVPNStatus+CustomStringConvertibleEric Kuck2018-12-161-20/+4
| | | | Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
* Provide mock tunnels for the SimulatorRoopesh Chander2018-12-161-1/+9
| | | | | | To help in generation of screenshots for the App Store Signed-off-by: Roopesh Chander <roop@roopc.net>
* Most similar views now shared between ViewControllersEric Kuck2018-12-141-61/+20
| | | | Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
* Fix tunnel remaining in 'Activating' stateRoopesh Chander2018-12-141-1/+19
| | | | | | | | It uses to remain in 'Activating' state when we don't get a status update notification, for example, when turning on the tunnel repeatedly without Internet connectivity. Signed-off-by: Roopesh Chander <roop@roopc.net>
* Deduplicate functionsJason A. Donenfeld2018-12-141-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Can't -> cannotJason A. Donenfeld2018-12-131-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* NE: Communicate last error to app through a shared fileRoopesh Chander2018-12-141-3/+30
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* TunnelsManager: startActivation() need not take a tunnelConfigurationRoopesh Chander2018-12-141-11/+3
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Reorganized ViewControllers (split out UIViews and UITableViewCells into their own classes)Eric Kuck2018-12-131-57/+49
| | | | | | All swiftlint warnings except one fixed up Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
* TunnelsManager: Remove mentions of 'internal error'Roopesh Chander2018-12-131-5/+5
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* TunnelsManager: Ask to check Internet connectivity in error alertRoopesh Chander2018-12-131-1/+1
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* TunnelsManager: Remove unused variableRoopesh Chander2018-12-131-4/+0
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* TunnelsManager: Remove assertRoopesh Chander2018-12-131-1/+0
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* TunnelsManager: Fix race between multiple startActivation() callsRoopesh Chander2018-12-131-0/+2
| | | | | | | | After startActivate() is called on a waiting tunnel, user might turn on a different tunnel before the waiting tunnel's status gets updated. This fix prevents that from happening. Signed-off-by: Roopesh Chander <roop@roopc.net>
* TunnelsManager: Reintroduce waiting for another tunnel to deactivateRoopesh Chander2018-12-131-3/+21
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* TunnelsManager: Report activation errors through the activationDelegateRoopesh Chander2018-12-131-49/+62
| | | | | | Don't report activation errors through completion handlers Signed-off-by: Roopesh Chander <roop@roopc.net>
* Logging: Use ringlogger for logging from the appRoopesh Chander2018-12-131-21/+20
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Avoid using 'VPN' in code where possibleRoopesh Chander2018-12-131-18/+18
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* mv WireGuard/WireGuard/VPN/ WireGuard/WireGuard/Tunnel/Roopesh Chander2018-12-131-0/+480
Signed-off-by: Roopesh Chander <roop@roopc.net>