]> git.ipfire.org Git - thirdparty/wireguard-apple.git/log
thirdparty/wireguard-apple.git
6 years agoMove name from interface to tunnel
Jason A. Donenfeld [Fri, 21 Dec 2018 23:28:18 +0000 (00:28 +0100)] 
Move name from interface to tunnel

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
6 years agoFix paren typo
Jason A. Donenfeld [Fri, 21 Dec 2018 22:43:11 +0000 (23:43 +0100)] 
Fix paren typo

"I am very anti-paren." --Eric

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
6 years agoNuke trailing spaces
Jason A. Donenfeld [Fri, 21 Dec 2018 22:34:56 +0000 (23:34 +0100)] 
Nuke trailing spaces

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
6 years agoproviderConfiguration is now a WgQuickConfig
Eric Kuck [Fri, 21 Dec 2018 21:16:09 +0000 (15:16 -0600)] 
providerConfiguration is now a WgQuickConfig

Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
6 years agoDo not require NetworkExtension to know its own name
Jason A. Donenfeld [Fri, 21 Dec 2018 21:05:47 +0000 (22:05 +0100)] 
Do not require NetworkExtension to know its own name

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
6 years agoAll migration stuff moved to one gross file
Eric Kuck [Fri, 21 Dec 2018 18:51:14 +0000 (12:51 -0600)] 
All migration stuff moved to one gross file

Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
6 years agoSimplify versioning of stored data
Jason A. Donenfeld [Fri, 21 Dec 2018 17:58:06 +0000 (18:58 +0100)] 
Simplify versioning of stored data

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
6 years agoGet rid of superflous isActivateOnDemandEnabled key
Jason A. Donenfeld [Fri, 21 Dec 2018 17:50:32 +0000 (18:50 +0100)] 
Get rid of superflous isActivateOnDemandEnabled key

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
6 years agoUpdated NETunnelProvider save format
Eric Kuck [Fri, 21 Dec 2018 04:52:45 +0000 (22:52 -0600)] 
Updated NETunnelProvider save format

Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
6 years agoNE: simplify logic
Jason A. Donenfeld [Fri, 21 Dec 2018 14:56:03 +0000 (15:56 +0100)] 
NE: simplify logic

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
6 years agoNE: Simplify DNS resolution
Roopesh Chander [Fri, 21 Dec 2018 13:53:16 +0000 (19:23 +0530)] 
NE: Simplify DNS resolution

Signed-off-by: Roopesh Chander <roop@roopc.net>
6 years agoLocalize all the things
Roopesh Chander [Tue, 18 Dec 2018 11:00:16 +0000 (16:30 +0530)] 
Localize all the things

Signed-off-by: Roopesh Chander <roop@roopc.net>
6 years agoTunnel detail: iPad: Handle deletion of tunnel correctly
Roopesh Chander [Fri, 21 Dec 2018 12:32:18 +0000 (18:02 +0530)] 
Tunnel detail: iPad: Handle deletion of tunnel correctly

Signed-off-by: Roopesh Chander <roop@roopc.net>
6 years agoNE: Update listen port only when first interface changes
Roopesh Chander [Fri, 21 Dec 2018 12:02:44 +0000 (17:32 +0530)] 
NE: Update listen port only when first interface changes

When handling network path changes, change the listen port
only when the first interface has changed.

Signed-off-by: Roopesh Chander <roop@roopc.net>
6 years agoNE: Change handling of bad domain names and Activate On Demand
Roopesh Chander [Fri, 21 Dec 2018 10:10:04 +0000 (15:40 +0530)] 
NE: Change handling of bad domain names and Activate On Demand

The solution implemented in commit b8c331c causes the tunnel to
remain in 'Activating' state, without the ability to cancel that.

So, in this commit, instead of retrying DNS silently on
Activated-On-Demand tunnels, we fail the startTunnel() silently.

To summarize, if activate-on-demand is on:
- If started from the WireGuard app, show error using lastErrorFile
mechanism, suggesting a way to turn off Activate On Demand
- If not started from WireGuard app, don't call displayMessage()
(don't show error to user) and silently fail starting the tunnel

Signed-off-by: Roopesh Chander <roop@roopc.net>
6 years agoAdded missing param in MockTunnels
Eric Kuck [Thu, 20 Dec 2018 19:51:44 +0000 (13:51 -0600)] 
Added missing param in MockTunnels

Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
6 years agowireguard-go-bridge: SDK_DIR is not defined for simulator
Jason A. Donenfeld [Thu, 20 Dec 2018 19:47:42 +0000 (20:47 +0100)] 
wireguard-go-bridge: SDK_DIR is not defined for simulator

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
6 years agoEnabled more swiftlint rules
Eric Kuck [Thu, 20 Dec 2018 17:22:37 +0000 (11:22 -0600)] 
Enabled more swiftlint rules

Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
6 years agoAdded a String->[String] helper
Eric Kuck [Thu, 20 Dec 2018 16:46:26 +0000 (10:46 -0600)] 
Added a String->[String] helper

Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
6 years agoTunnelErrors: Remove unused error
Roopesh Chander [Thu, 20 Dec 2018 12:57:56 +0000 (18:27 +0530)] 
TunnelErrors: Remove unused error

Signed-off-by: Roopesh Chander <roop@roopc.net>
6 years agoTunnel edit: init() need not take a tunnelConfiguration argument
Roopesh Chander [Wed, 19 Dec 2018 11:00:34 +0000 (16:30 +0530)] 
Tunnel edit: init() need not take a tunnelConfiguration argument

Signed-off-by: Roopesh Chander <roop@roopc.net>
6 years agoNE: Log whether tunnel was activated from the app or not
Roopesh Chander [Wed, 19 Dec 2018 10:56:28 +0000 (16:26 +0530)] 
NE: Log whether tunnel was activated from the app or not

Signed-off-by: Roopesh Chander <roop@roopc.net>
6 years agoRemove non-helpful comments
Roopesh Chander [Wed, 19 Dec 2018 10:53:29 +0000 (16:23 +0530)] 
Remove non-helpful comments

Signed-off-by: Roopesh Chander <roop@roopc.net>
6 years agoTunnel edit: Fix comment
Roopesh Chander [Wed, 19 Dec 2018 10:53:14 +0000 (16:23 +0530)] 
Tunnel edit: Fix comment

Signed-off-by: Roopesh Chander <roop@roopc.net>
6 years agoTunnelsManager: If only Activate On Demand has changed, don't restart tunnel
Roopesh Chander [Wed, 19 Dec 2018 10:32:48 +0000 (16:02 +0530)] 
TunnelsManager: If only Activate On Demand has changed, don't restart tunnel

Signed-off-by: Roopesh Chander <roop@roopc.net>
6 years agoNE: Handle bad domain names and Activate On Demand
Roopesh Chander [Wed, 19 Dec 2018 10:08:00 +0000 (15:38 +0530)] 
NE: Handle bad domain names and Activate On Demand

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>
6 years agoNE: No need for two startTunnel() methods
Roopesh Chander [Wed, 19 Dec 2018 07:40:42 +0000 (13:10 +0530)] 
NE: No need for two startTunnel() methods

Signed-off-by: Roopesh Chander <roop@roopc.net>
6 years agoTunnelsManager: Handle waiting on a stale tunnel
Roopesh Chander [Tue, 18 Dec 2018 14:15:00 +0000 (19:45 +0530)] 
TunnelsManager: Handle waiting on a stale tunnel

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>
6 years agoRemove buttons and text from LaunchScreen.storyboard
Roopesh Chander [Tue, 18 Dec 2018 14:33:27 +0000 (20:03 +0530)] 
Remove buttons and text from LaunchScreen.storyboard

With state restoration, we're not guaranteed that the
list view will get shown immediately after the launch screen.
So, generalize the launch screen as much as possible.

Signed-off-by: Roopesh Chander <roop@roopc.net>
6 years agos/Observervation/Observation/g;
Roopesh Chander [Tue, 18 Dec 2018 14:30:01 +0000 (20:00 +0530)] 
s/Observervation/Observation/g;

Signed-off-by: Roopesh Chander <roop@roopc.net>
6 years agoTunnel detail: Update restorationIdentifier when tunnel name changes
Roopesh Chander [Tue, 18 Dec 2018 13:57:27 +0000 (19:27 +0530)] 
Tunnel detail: Update restorationIdentifier when tunnel name changes

Signed-off-by: Roopesh Chander <roop@roopc.net>
6 years agoTunnelsManager: Add periods to end the system error messages
Roopesh Chander [Tue, 18 Dec 2018 10:17:17 +0000 (15:47 +0530)] 
TunnelsManager: Add periods to end the system error messages

Because they can be part of a multi-sentence message when displayed
in the alert.

Signed-off-by: Roopesh Chander <roop@roopc.net>
6 years agoError handling: Add info on the underlying system error to error alerts
Roopesh Chander [Mon, 17 Dec 2018 13:26:26 +0000 (18:56 +0530)] 
Error handling: Add info on the underlying system error to error alerts

Signed-off-by: Roopesh Chander <roop@roopc.net>
6 years agoVersion bump 0.0.20181104-7
Jason A. Donenfeld [Mon, 17 Dec 2018 13:08:17 +0000 (14:08 +0100)] 
Version bump

This is our first release to the real app store.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
6 years agoGot TunnelsManager back under the max file length by splitting out NEVPNStatus+Custom...
Eric Kuck [Mon, 17 Dec 2018 05:51:25 +0000 (23:51 -0600)] 
Got TunnelsManager back under the max file length by splitting out NEVPNStatus+CustomStringConvertible

Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
6 years agoPotential fix for insertRowAtIndexPath crash
Eric Kuck [Mon, 17 Dec 2018 03:11:33 +0000 (21:11 -0600)] 
Potential fix for insertRowAtIndexPath crash

Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
6 years agoMore proper way to get sdk root directory
Jason A. Donenfeld [Sun, 16 Dec 2018 23:23:11 +0000 (00:23 +0100)] 
More proper way to get sdk root directory

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
6 years agoFurther generalize makefile
Jason A. Donenfeld [Sun, 16 Dec 2018 02:47:05 +0000 (03:47 +0100)] 
Further generalize makefile

This should allow us to eventually build on macOS

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
6 years agoBump the go runtime
Jason A. Donenfeld [Sun, 16 Dec 2018 00:55:00 +0000 (01:55 +0100)] 
Bump the go runtime

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
6 years agoImprove mock tunnels generation
Jason A. Donenfeld [Sun, 16 Dec 2018 00:51:14 +0000 (01:51 +0100)] 
Improve mock tunnels generation

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
6 years agoProvide mock tunnels for the Simulator
Roopesh Chander [Sat, 15 Dec 2018 19:41:23 +0000 (01:11 +0530)] 
Provide mock tunnels for the Simulator

To help in generation of screenshots for the App Store

Signed-off-by: Roopesh Chander <roop@roopc.net>
6 years agoNuke duplicate file
Jason A. Donenfeld [Sat, 15 Dec 2018 05:21:49 +0000 (06:21 +0100)] 
Nuke duplicate file

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
6 years agoBump the go runtime
Jason A. Donenfeld [Sat, 15 Dec 2018 05:13:33 +0000 (06:13 +0100)] 
Bump the go runtime

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
6 years agoVersion bump 0.0.20181104-6
Jason A. Donenfeld [Sat, 15 Dec 2018 04:08:31 +0000 (05:08 +0100)] 
Version bump

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
6 years agoFixed editable KeyValueCells being copyable
Eric Kuck [Sat, 15 Dec 2018 03:48:48 +0000 (21:48 -0600)] 
Fixed editable KeyValueCells being copyable
Fixed DNS servers not saving

Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
6 years agoFix confusing indentation
Jason A. Donenfeld [Sat, 15 Dec 2018 03:42:11 +0000 (04:42 +0100)] 
Fix confusing indentation

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
6 years agoKeyValueCells now share code
Eric Kuck [Sat, 15 Dec 2018 02:02:37 +0000 (20:02 -0600)] 
KeyValueCells now share code

Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
6 years agoReorganized project structure
Eric Kuck [Fri, 14 Dec 2018 23:27:11 +0000 (17:27 -0600)] 
Reorganized project structure

Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
6 years agoMost similar views now shared between ViewControllers
Eric Kuck [Fri, 14 Dec 2018 23:12:59 +0000 (17:12 -0600)] 
Most similar views now shared between ViewControllers

Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
6 years agoPrettier log time format
Jason A. Donenfeld [Fri, 14 Dec 2018 23:08:54 +0000 (00:08 +0100)] 
Prettier log time format

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
6 years agoSimplify logging tags
Jason A. Donenfeld [Fri, 14 Dec 2018 21:53:42 +0000 (22:53 +0100)] 
Simplify logging tags

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>
6 years agoFix tunnel remaining in 'Activating' state
Roopesh Chander [Fri, 14 Dec 2018 12:03:52 +0000 (17:33 +0530)] 
Fix tunnel remaining in 'Activating' state

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>
6 years agoFix status switch weird state after an error occurs
Roopesh Chander [Fri, 14 Dec 2018 11:03:31 +0000 (16:33 +0530)] 
Fix status switch weird state after an error occurs

Signed-off-by: Roopesh Chander <roop@roopc.net>
6 years agoDeduplicate functions
Jason A. Donenfeld [Thu, 13 Dec 2018 23:01:50 +0000 (00:01 +0100)] 
Deduplicate functions

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
6 years agoSimplify filemanager extension
Jason A. Donenfeld [Thu, 13 Dec 2018 22:25:18 +0000 (23:25 +0100)] 
Simplify filemanager extension

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
6 years agoCan't -> cannot
Jason A. Donenfeld [Thu, 13 Dec 2018 22:17:05 +0000 (23:17 +0100)] 
Can't -> cannot

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
6 years agoNE: Communicate last error to app through a shared file
Roopesh Chander [Thu, 13 Dec 2018 20:54:53 +0000 (02:24 +0530)] 
NE: Communicate last error to app through a shared file

Signed-off-by: Roopesh Chander <roop@roopc.net>
6 years agoTunnelsManager: startActivation() need not take a tunnelConfiguration
Roopesh Chander [Thu, 13 Dec 2018 18:31:41 +0000 (00:01 +0530)] 
TunnelsManager: startActivation() need not take a tunnelConfiguration

Signed-off-by: Roopesh Chander <roop@roopc.net>
6 years agoLocalize swiftlint
Jason A. Donenfeld [Thu, 13 Dec 2018 19:06:37 +0000 (20:06 +0100)] 
Localize swiftlint

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
6 years agoReorganized ViewControllers (split out UIViews and UITableViewCells into their own...
Eric Kuck [Thu, 13 Dec 2018 18:58:50 +0000 (12:58 -0600)] 
Reorganized ViewControllers (split out UIViews and UITableViewCells into their own classes)
All swiftlint warnings except one fixed up

Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
6 years agoAvoid escaping heap allocation
Jason A. Donenfeld [Thu, 13 Dec 2018 18:43:12 +0000 (19:43 +0100)] 
Avoid escaping heap allocation

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
6 years agoTidy up str to gostr conversion
Jason A. Donenfeld [Thu, 13 Dec 2018 18:36:43 +0000 (19:36 +0100)] 
Tidy up str to gostr conversion

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
6 years agoTunnelsManager: Remove mentions of 'internal error'
Roopesh Chander [Thu, 13 Dec 2018 18:23:17 +0000 (23:53 +0530)] 
TunnelsManager: Remove mentions of 'internal error'

Signed-off-by: Roopesh Chander <roop@roopc.net>
6 years agoTunnelsManager: Ask to check Internet connectivity in error alert
Roopesh Chander [Thu, 13 Dec 2018 18:17:12 +0000 (23:47 +0530)] 
TunnelsManager: Ask to check Internet connectivity in error alert

Signed-off-by: Roopesh Chander <roop@roopc.net>
6 years agoRemove unused code: InternetReachability
Roopesh Chander [Thu, 13 Dec 2018 18:15:21 +0000 (23:45 +0530)] 
Remove unused code: InternetReachability

Signed-off-by: Roopesh Chander <roop@roopc.net>
6 years agoTunnelsManager: Remove unused variable
Roopesh Chander [Thu, 13 Dec 2018 18:14:13 +0000 (23:44 +0530)] 
TunnelsManager: Remove unused variable

Signed-off-by: Roopesh Chander <roop@roopc.net>
6 years agoTunnelsManager: Remove assert
Roopesh Chander [Thu, 13 Dec 2018 18:12:50 +0000 (23:42 +0530)] 
TunnelsManager: Remove assert

Signed-off-by: Roopesh Chander <roop@roopc.net>
6 years agoSimplify C strings
Jason A. Donenfeld [Thu, 13 Dec 2018 18:02:48 +0000 (19:02 +0100)] 
Simplify C strings

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
6 years agoTunnelsManager: Fix race between multiple startActivation() calls
Roopesh Chander [Thu, 13 Dec 2018 18:04:00 +0000 (23:34 +0530)] 
TunnelsManager: Fix race between multiple startActivation() calls

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>
6 years agoTunnelsManager: Reintroduce waiting for another tunnel to deactivate
Roopesh Chander [Thu, 13 Dec 2018 17:43:54 +0000 (23:13 +0530)] 
TunnelsManager: Reintroduce waiting for another tunnel to deactivate

Signed-off-by: Roopesh Chander <roop@roopc.net>
6 years agoRewrite Logger
Jason A. Donenfeld [Thu, 13 Dec 2018 14:26:04 +0000 (15:26 +0100)] 
Rewrite Logger

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>
6 years agoMore reliable logo sizing
Eric Kuck [Thu, 13 Dec 2018 15:30:13 +0000 (09:30 -0600)] 
More reliable logo sizing

Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
6 years agoTunnelsManager: Report activation errors through the activationDelegate
Roopesh Chander [Thu, 13 Dec 2018 13:25:20 +0000 (18:55 +0530)] 
TunnelsManager: Report activation errors through the activationDelegate

Don't report activation errors through completion handlers

Signed-off-by: Roopesh Chander <roop@roopc.net>
6 years agoLogging: Write versions from both app and extension
Roopesh Chander [Thu, 13 Dec 2018 12:39:38 +0000 (18:09 +0530)] 
Logging: Write versions from both app and extension

Signed-off-by: Roopesh Chander <roop@roopc.net>
6 years agoLogging: file_log doesn't need the message type
Roopesh Chander [Thu, 13 Dec 2018 12:36:57 +0000 (18:06 +0530)] 
Logging: file_log doesn't need the message type

Signed-off-by: Roopesh Chander <roop@roopc.net>
6 years agoLogging: Tag the entries in the merged log
Roopesh Chander [Thu, 13 Dec 2018 12:30:29 +0000 (18:00 +0530)] 
Logging: Tag the entries in the merged log

So we know which entry is from the app and which is from the network
extension.

Signed-off-by: Roopesh Chander <roop@roopc.net>
6 years agoLogging: Use ringlogger for logging from the app
Roopesh Chander [Thu, 13 Dec 2018 12:00:02 +0000 (17:30 +0530)] 
Logging: Use ringlogger for logging from the app

Signed-off-by: Roopesh Chander <roop@roopc.net>
6 years agoLogging: ringlogger.c: Trim trailing newlines
Roopesh Chander [Thu, 13 Dec 2018 11:40:24 +0000 (17:10 +0530)] 
Logging: ringlogger.c: Trim trailing newlines

Signed-off-by: Roopesh Chander <roop@roopc.net>
6 years agoLogging: Use ringlogger for logging from the extension
Roopesh Chander [Thu, 13 Dec 2018 10:08:10 +0000 (15:38 +0530)] 
Logging: Use ringlogger for logging from the extension

Signed-off-by: Roopesh Chander <roop@roopc.net>
6 years agoAvoid using 'VPN' in code where possible
Roopesh Chander [Thu, 13 Dec 2018 06:50:10 +0000 (12:20 +0530)] 
Avoid using 'VPN' in code where possible

Signed-off-by: Roopesh Chander <roop@roopc.net>
6 years agomv WireGuard/WireGuard/VPN/ WireGuard/WireGuard/Tunnel/
Roopesh Chander [Thu, 13 Dec 2018 06:44:21 +0000 (12:14 +0530)] 
mv WireGuard/WireGuard/VPN/ WireGuard/WireGuard/Tunnel/

Signed-off-by: Roopesh Chander <roop@roopc.net>
6 years agoCommit untested ringlogger code
Jason A. Donenfeld [Thu, 13 Dec 2018 04:51:03 +0000 (05:51 +0100)] 
Commit untested ringlogger code

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
6 years agoRemove useless whitespace
Jason A. Donenfeld [Thu, 13 Dec 2018 04:26:04 +0000 (05:26 +0100)] 
Remove useless whitespace

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
6 years agoSettings: better padding calculation
Jason A. Donenfeld [Thu, 13 Dec 2018 04:15:50 +0000 (05:15 +0100)] 
Settings: better padding calculation

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
6 years agoFixed hacky logo display for settings
Eric Kuck [Thu, 13 Dec 2018 03:16:28 +0000 (21:16 -0600)] 
Fixed hacky logo display for settings

Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
6 years agoMore formatting nits and cyclomatic complexity fixes
Eric Kuck [Thu, 13 Dec 2018 03:09:52 +0000 (21:09 -0600)] 
More formatting nits and cyclomatic complexity fixes

Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
6 years agoMore linter warnings fixed, enabled more swiftlint rules, project cleanup
Eric Kuck [Wed, 12 Dec 2018 21:33:14 +0000 (15:33 -0600)] 
More linter warnings fixed, enabled more swiftlint rules, project cleanup

Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
6 years agoTons more swiftlint warnings fixed. Still a few remaining.
Eric Kuck [Wed, 12 Dec 2018 18:28:27 +0000 (12:28 -0600)] 
Tons more swiftlint warnings fixed. Still a few remaining.

Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
6 years agoAdded swiftlint and fixed all errors (and a bunch, but not all, warnings)
Eric Kuck [Wed, 12 Dec 2018 17:40:57 +0000 (11:40 -0600)] 
Added swiftlint and fixed all errors (and a bunch, but not all, warnings)

Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
6 years agoZip importing: importFromFile should take a completionHandler
Roopesh Chander [Wed, 12 Dec 2018 13:54:12 +0000 (19:24 +0530)] 
Zip importing: importFromFile should take a completionHandler

Deletion of the being-imported file should be done in the
completionHandler.

Signed-off-by: Roopesh Chander <roop@roopc.net>
6 years agoErrorPresenter: Support onPresented for showErrorAlert(title:,message:)
Roopesh Chander [Wed, 12 Dec 2018 13:47:06 +0000 (19:17 +0530)] 
ErrorPresenter: Support onPresented for showErrorAlert(title:,message:)

Signed-off-by: Roopesh Chander <roop@roopc.net>
6 years agoZip importing: Handle spaces in filenames correctly
Roopesh Chander [Wed, 12 Dec 2018 10:31:24 +0000 (16:01 +0530)] 
Zip importing: Handle spaces in filenames correctly

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>
6 years agoSupply missing pieces of path change
Jason A. Donenfeld [Tue, 11 Dec 2018 23:45:50 +0000 (00:45 +0100)] 
Supply missing pieces of path change

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
6 years agoFixed a potential race condition, better naming on PacketTunnelSettingsGenerator...
Eric Kuck [Tue, 11 Dec 2018 22:59:15 +0000 (16:59 -0600)] 
Fixed a potential race condition, better naming on PacketTunnelSettingsGenerator methods

Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
6 years agoAdded an (unfinished) NWPathMonitor implementation for reconnecting on network changes
Eric Kuck [Tue, 11 Dec 2018 22:12:04 +0000 (16:12 -0600)] 
Added an (unfinished) NWPathMonitor implementation for reconnecting on network changes

Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
6 years agoRevert pure-go network monitoring and add wgSetConfig
Jason A. Donenfeld [Tue, 11 Dec 2018 21:21:33 +0000 (22:21 +0100)] 
Revert pure-go network monitoring and add wgSetConfig

This reverts commit 99f0e457c34480f25582d7b4ed509404712c648c and adds a
function too.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
6 years agoState restoration: Don't create duplicate mainVC and tunnelsListVC
Roopesh Chander [Tue, 11 Dec 2018 12:18:34 +0000 (17:48 +0530)] 
State restoration: Don't create duplicate mainVC and tunnelsListVC

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>
6 years agoTunnelsManager: Error out only on no-internet scenario
Roopesh Chander [Mon, 10 Dec 2018 22:18:24 +0000 (03:48 +0530)] 
TunnelsManager: Error out only on no-internet scenario

The other scenario happens even during reloading of a tunnel for activation.

Signed-off-by: Roopesh Chander <roop@roopc.net>
6 years agoRemove the feature of waiting for another tunnel to deactivate
Roopesh Chander [Mon, 10 Dec 2018 21:54:28 +0000 (03:24 +0530)] 
Remove the feature of waiting for another tunnel to deactivate

Signed-off-by: Roopesh Chander <roop@roopc.net>
6 years agoTunnelsManager: Deactivate only when the status becomes 'connected'
Roopesh Chander [Mon, 10 Dec 2018 20:28:40 +0000 (01:58 +0530)] 
TunnelsManager: Deactivate only when the status becomes 'connected'

Signed-off-by: Roopesh Chander <roop@roopc.net>