aboutsummaryrefslogtreecommitdiffstats
path: root/WireGuard/WireGuard (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Version bump0.0.20181104-6Jason A. Donenfeld2018-12-151-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Fixed editable KeyValueCells being copyableEric Kuck2018-12-142-4/+1
| | | | | | Fixed DNS servers not saving Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
* Fix confusing indentationJason A. Donenfeld2018-12-151-3/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* KeyValueCells now share codeEric Kuck2018-12-148-374/+192
| | | | Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
* Reorganized project structureEric Kuck2018-12-1417-0/+1
| | | | Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
* Most similar views now shared between ViewControllersEric Kuck2018-12-1425-443/+240
| | | | Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
* Simplify logging tagsJason A. Donenfeld2018-12-142-2/+2
| | | | | | | 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>
* 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>
* Fix status switch weird state after an error occursRoopesh Chander2018-12-142-2/+2
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Deduplicate functionsJason A. Donenfeld2018-12-142-10/+2
| | | | 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-1327-714/+1265
| | | | | | 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>
* Remove unused code: InternetReachabilityRoopesh Chander2018-12-131-51/+0
| | | | 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-132-3/+23
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Rewrite LoggerJason A. Donenfeld2018-12-132-14/+4
| | | | | | | 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>
* More reliable logo sizingEric Kuck2018-12-131-33/+34
| | | | Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
* TunnelsManager: Report activation errors through the activationDelegateRoopesh Chander2018-12-134-68/+77
| | | | | | Don't report activation errors through completion handlers Signed-off-by: Roopesh Chander <roop@roopc.net>
* Logging: Write versions from both app and extensionRoopesh Chander2018-12-131-0/+1
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Logging: Tag the entries in the merged logRoopesh Chander2018-12-131-1/+1
| | | | | | | 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-132-21/+22
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Logging: Use ringlogger for logging from the extensionRoopesh Chander2018-12-133-11/+16
| | | | 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-133-0/+0
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Remove useless whitespaceJason A. Donenfeld2018-12-135-25/+25
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Settings: better padding calculationJason A. Donenfeld2018-12-131-3/+3
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Fixed hacky logo display for settingsEric Kuck2018-12-121-3/+9
| | | | Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
* More formatting nits and cyclomatic complexity fixesEric Kuck2018-12-1211-113/+99
| | | | Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
* More linter warnings fixed, enabled more swiftlint rules, project cleanupEric Kuck2018-12-1214-493/+532
| | | | Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
* Tons more swiftlint warnings fixed. Still a few remaining.Eric Kuck2018-12-1216-195/+183
| | | | Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
* Added swiftlint and fixed all errors (and a bunch, but not all, warnings)Eric Kuck2018-12-1212-355/+338
| | | | Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
* Zip importing: importFromFile should take a completionHandlerRoopesh Chander2018-12-122-7/+13
| | | | | | | Deletion of the being-imported file should be done in the completionHandler. Signed-off-by: Roopesh Chander <roop@roopc.net>
* ErrorPresenter: Support onPresented for showErrorAlert(title:,message:)Roopesh Chander2018-12-121-3/+4
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Zip importing: Handle spaces in filenames correctlyRoopesh Chander2018-12-122-13/+14
| | | | | | | Previously, if a filename of a .conf file inside the zip file contained spaces, it was not imported. Signed-off-by: Roopesh Chander <roop@roopc.net>
* State restoration: Don't create duplicate mainVC and tunnelsListVCRoopesh Chander2018-12-111-6/+1
| | | | | | | | | | | | | | | | | | | This creates a duplicate tunnels manager, leading to problems tracking tunnel statuses. To reproduce the bug that this commit fixes, you can do the following: 1. Remove all tunnels 2. Run in Xcode 3. Import zip with ~10 tunnels 4. Stop app in Xcode 5. Run in Xcode 6. Turn on 1st tunnel, after it's on, turn off Turn on 2nd tunnel, after it's on, turn off ... After 6-8 tunnels, the spinner doesn't show up, indicating that the status is not being tracked. Signed-off-by: Roopesh Chander <roop@roopc.net>
* 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-113-59/+11
| | | | 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>
* Allow turning off the status switch of a waiting tunnelRoopesh Chander2018-12-112-2/+2
| | | | | | It just means the waiting should be cancelled 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-116-6/+6
| | | | | | 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>