aboutsummaryrefslogtreecommitdiffstats
path: root/WireGuard (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Make strings consistentJason A. Donenfeld2018-12-074-9/+9
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* State restoration: Restore tunnel detail viewRoopesh Chander2018-12-075-1/+76
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Main VC: No need to refresh statuses if the tunnelsManager isn't initialized yetRoopesh Chander2018-12-071-4/+0
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Tunnels list: Deselect rows correctlyRoopesh Chander2018-12-071-1/+7
| | | | | | Do it like UITableViewController.clearsSelectionOnViewWillAppear would. Signed-off-by: Roopesh Chander <roop@roopc.net>
* Settings: Exporting configs as zip should open document pickerRoopesh Chander2018-12-071-5/+3
| | | | | | | | Because: - Exporting UI should be consistent with importing UI - UIActivityVC takes a long time to open Signed-off-by: Roopesh Chander <roop@roopc.net>
* Error handling: Use ErrorPresenter.showErrorAlert() instead of per-VC showErrorAlert() methodsRoopesh Chander2018-12-074-38/+9
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Error handling: Use WireGuardAppError and WireGuardResult throughout the appRoopesh Chander2018-12-075-41/+45
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Error handling: Introduce a WireGuardResult type to handle errors in callbacks across the appRoopesh Chander2018-12-073-28/+34
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Error handling: Introduce a WireGuardAppError protocol to manage errorsRoopesh Chander2018-12-074-29/+39
| | | | | | 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-075-76/+110
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Error presenter: Always handle the passed errorRoopesh Chander2018-12-071-4/+3
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Tunnel detail: Cell status switch should be toggled only after the alert presentation completesRoopesh Chander2018-12-071-4/+5
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Refactoring: Consolidate file deletion into a separate functionRoopesh Chander2018-12-073-17/+16
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* NE: Logging: Log file should begin with version numbers and tunnel nameRoopesh Chander2018-12-073-0/+36
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* NE: Logging: Make it clear which calls to wg_log use String and which use StaticStringRoopesh Chander2018-12-041-11/+11
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Settings: Add timestamp to exported logRoopesh Chander2018-12-041-1/+8
| | | | | | And remove the exported log afterwards. Signed-off-by: Roopesh Chander <roop@roopc.net>
* Refactor out VPN-handling stuff from tunnels list VC to the main VCRoopesh Chander2018-12-034-72/+94
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* VPN: Error out when tunnel activation fails because there's no internetRoopesh Chander2018-12-035-7/+109
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Settings: Export log fileRoopesh Chander2018-12-021-3/+52
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* NE: Write log to fileRoopesh Chander2018-11-303-10/+104
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Info.plist: Add app group id for accessing from both the app and the network extensionRoopesh Chander2018-11-292-0/+4
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Xcode: Add app groups capabilityRoopesh Chander2018-11-293-0/+11
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* It's 'WiFi', not 'Wifi'Roopesh Chander2018-11-284-17/+17
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* NE: All DNS queries must first go through the VPN's DNS serversRoopesh Chander2018-11-231-1/+3
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Tunnel view model: Invalidate the configuration object when updating allowedIPs using the 'Exclude private IPs' switchRoopesh Chander2018-11-191-0/+1
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Config file parser: Be case-insensitive to attribute keys in the config fileRoopesh Chander2018-11-191-12/+12
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Config file parser: Fix typoRoopesh Chander2018-11-171-1/+1
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Exporting: Export to zip in a background threadRoopesh Chander2018-11-152-23/+32
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Exporting: Refactor out zip exporting into a separate classRoopesh Chander2018-11-154-21/+49
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Exporting: No need to check for duplicate names - we disallow it at creation time itselfRoopesh Chander2018-11-151-9/+2
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Importing: Import from zip in a background threadRoopesh Chander2018-11-152-42/+43
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Importing: Refactor out zip importing into a separate classRoopesh Chander2018-11-144-43/+69
| | | | 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>
* Tunnel detail: Show VPN-on-demand informationRoopesh Chander2018-11-121-2/+67
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Tunnels manager: Keep track of NETunnelProviderManager's isOnDemandEnabled propertyRoopesh Chander2018-11-122-5/+10
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Tunnel edit: Update for VPN-on-demand changesRoopesh Chander2018-11-121-14/+26
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Tunnel view model: VPN-on-demand stuff shouldn't be part of the tunnel modelRoopesh Chander2018-11-121-16/+22
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Model, Tunnels manager: Rewrite the model for VPN-on-demandRoopesh Chander2018-11-126-130/+92
| | | | | | | | | 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>
* Tunnel edit, Tunnel view model: UI for providing On-Demand activation optionsRoopesh Chander2018-11-112-6/+125
| | | | 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-102-0/+72
| | | | 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-103-6/+11
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* VPN: When activating while another tunnel is active, deactivate the other tunnelRoopesh Chander2018-11-103-22/+16
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* TunnelsManager: startDeactivation() need not take a completion handlerRoopesh Chander2018-11-103-8/+3
| | | | | | 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-102-3/+0
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* NE: Minor refactoring to enable calling startTunnel() with a tunnelConfigurationRoopesh Chander2018-11-091-1/+6
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* VPN: Refresh tunnel statuses when app gets to the foregroundRoopesh Chander2018-11-092-0/+14
| | | | | | Because the tunnel could've be activated from iOS Settings now Signed-off-by: Roopesh Chander <roop@roopc.net>