]>
git.ipfire.org Git - thirdparty/wireguard-apple.git/log
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Roopesh Chander [Thu, 13 Dec 2018 18:12:50 +0000 (23:42 +0530)]
TunnelsManager: Remove assert
Signed-off-by: Roopesh Chander <roop@roopc.net>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Roopesh Chander [Mon, 10 Dec 2018 20:06:15 +0000 (01:36 +0530)]
Allow turning off the status switch of a waiting tunnel
It just means the waiting should be cancelled
Signed-off-by: Roopesh Chander <roop@roopc.net>
Roopesh Chander [Mon, 10 Dec 2018 11:34:24 +0000 (17:04 +0530)]
TunnelsManager: Handle status change in TunnelsManager
Rather than in TunnelContainer.
Signed-off-by: Roopesh Chander <roop@roopc.net>
Roopesh Chander [Mon, 10 Dec 2018 19:00:33 +0000 (00:30 +0530)]
Error handling: alertText() can be nil
Indicating that no alert is to be shown for that error.
Signed-off-by: Roopesh Chander <roop@roopc.net>
Roopesh Chander [Mon, 10 Dec 2018 11:33:17 +0000 (17:03 +0530)]
TunnelsManager: Don't act on status change on tunnelProviders we don't have
That causes errors we don't want, and duplicate notifications.
Signed-off-by: Roopesh Chander <roop@roopc.net>
Roopesh Chander [Mon, 10 Dec 2018 11:30:31 +0000 (17:00 +0530)]
TunnelsManager: Always call the completion handler before returning
Signed-off-by: Roopesh Chander <roop@roopc.net>
Roopesh Chander [Mon, 10 Dec 2018 11:01:36 +0000 (16:31 +0530)]
TunnelsManager: Debugging helpers for tunnel status
Signed-off-by: Roopesh Chander <roop@roopc.net>
Roopesh Chander [Mon, 10 Dec 2018 10:58:41 +0000 (16:28 +0530)]
TunnelsManager: Handle deactivation of a waiting tunnel
Signed-off-by: Roopesh Chander <roop@roopc.net>
Roopesh Chander [Mon, 10 Dec 2018 07:29:31 +0000 (12:59 +0530)]
Tunnels list: Fix AutoLayout error during deletion of a tunnel
Signed-off-by: Roopesh Chander <roop@roopc.net>
Roopesh Chander [Sun, 9 Dec 2018 19:57:53 +0000 (01:27 +0530)]
Settings: Dynamic Type support
Signed-off-by: Roopesh Chander <roop@roopc.net>
Roopesh Chander [Sun, 9 Dec 2018 19:30:08 +0000 (01:00 +0530)]
Tunnel edit: Dynamic Type support
Signed-off-by: Roopesh Chander <roop@roopc.net>
Roopesh Chander [Sun, 9 Dec 2018 17:50:25 +0000 (23:20 +0530)]
Tunnel detail: Dynamic Type support
Signed-off-by: Roopesh Chander <roop@roopc.net>
Roopesh Chander [Sun, 9 Dec 2018 12:43:37 +0000 (18:13 +0530)]
Tunnels list: Dynamic Type support for the add button at the center
Signed-off-by: Roopesh Chander <roop@roopc.net>
Roopesh Chander [Sun, 9 Dec 2018 12:16:01 +0000 (17:46 +0530)]
Tunnels list: Dynamic Type support for the table view
Signed-off-by: Roopesh Chander <roop@roopc.net>
Roopesh Chander [Sat, 8 Dec 2018 13:22:11 +0000 (18:52 +0530)]
Model: Declare keyLength constant and use that wherever applicable
Signed-off-by: Roopesh Chander <roop@roopc.net>
Roopesh Chander [Sat, 8 Dec 2018 13:13:24 +0000 (18:43 +0530)]
TunnelsManager: Observe status for all tunnels in one block
Signed-off-by: Roopesh Chander <roop@roopc.net>
Roopesh Chander [Sat, 8 Dec 2018 08:20:41 +0000 (13:50 +0530)]
TunnelsManager: Remove unused variables
Signed-off-by: Roopesh Chander <roop@roopc.net>
Roopesh Chander [Sat, 8 Dec 2018 08:13:00 +0000 (13:43 +0530)]
Zip: Fix comment
Signed-off-by: Roopesh Chander <roop@roopc.net>
Jason A. Donenfeld [Fri, 7 Dec 2018 22:58:53 +0000 (23:58 +0100)]
Version bump
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Fri, 7 Dec 2018 22:56:26 +0000 (23:56 +0100)]
PacketTunnelProvider: Show log timestamp
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Fri, 7 Dec 2018 20:47:19 +0000 (21:47 +0100)]
wireguard-go-bridge: account for network changes
Everytime the network changes, we need to recreate the UDP socket,
because the ephemeral listen port is tied to the old physical interface.
As well, we need to re-set the IP addresses for each endpoint, so that
they're passed to getaddrinfo and are then resolved using DNS46.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Roopesh Chander [Fri, 7 Dec 2018 19:58:57 +0000 (01:28 +0530)]
Zip: Increase size of buffer used to read data from the archive
Signed-off-by: Roopesh Chander <roop@roopc.net>
Roopesh Chander [Fri, 7 Dec 2018 19:51:46 +0000 (01:21 +0530)]
Settings: Export log: Perform file operations in a background thread
Signed-off-by: Roopesh Chander <roop@roopc.net>
Roopesh Chander [Fri, 7 Dec 2018 19:24:58 +0000 (00:54 +0530)]
On-Demand: TunnelViewModel: Make activate-on-demand methods static
Signed-off-by: Roopesh Chander <roop@roopc.net>
Roopesh Chander [Fri, 7 Dec 2018 20:24:18 +0000 (01:54 +0530)]
On-Demand: Move detail text to TunnelViewModel
Signed-off-by: Roopesh Chander <roop@roopc.net>
Jason A. Donenfeld [Wed, 28 Nov 2018 22:06:43 +0000 (23:06 +0100)]
Plist: Handle crypto export
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Fri, 7 Dec 2018 17:35:06 +0000 (18:35 +0100)]
Make strings consistent
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Roopesh Chander [Fri, 7 Dec 2018 13:35:04 +0000 (19:05 +0530)]
State restoration: Restore tunnel detail view
Signed-off-by: Roopesh Chander <roop@roopc.net>
Roopesh Chander [Fri, 7 Dec 2018 10:22:47 +0000 (15:52 +0530)]
Main VC: No need to refresh statuses if the tunnelsManager isn't initialized yet
Signed-off-by: Roopesh Chander <roop@roopc.net>
Roopesh Chander [Fri, 7 Dec 2018 06:19:10 +0000 (11:49 +0530)]
Tunnels list: Deselect rows correctly
Do it like UITableViewController.clearsSelectionOnViewWillAppear would.
Signed-off-by: Roopesh Chander <roop@roopc.net>
Roopesh Chander [Fri, 7 Dec 2018 06:16:22 +0000 (11:46 +0530)]
Settings: Exporting configs as zip should open document picker
Because:
- Exporting UI should be consistent with importing UI
- UIActivityVC takes a long time to open
Signed-off-by: Roopesh Chander <roop@roopc.net>
Roopesh Chander [Thu, 6 Dec 2018 13:52:48 +0000 (19:22 +0530)]
Error handling: Use ErrorPresenter.showErrorAlert() instead of per-VC showErrorAlert() methods
Signed-off-by: Roopesh Chander <roop@roopc.net>
Roopesh Chander [Thu, 6 Dec 2018 13:35:46 +0000 (19:05 +0530)]
Error handling: Use WireGuardAppError and WireGuardResult throughout the app
Signed-off-by: Roopesh Chander <roop@roopc.net>
Roopesh Chander [Thu, 6 Dec 2018 11:00:11 +0000 (16:30 +0530)]
Error handling: Introduce a WireGuardResult type to handle errors in callbacks across the app
Signed-off-by: Roopesh Chander <roop@roopc.net>
Roopesh Chander [Thu, 6 Dec 2018 10:43:48 +0000 (16:13 +0530)]
Error handling: Introduce a WireGuardAppError protocol to manage errors
The alert strings shall be located next to where the errors are declared.
Signed-off-by: Roopesh Chander <roop@roopc.net>
Roopesh Chander [Thu, 6 Dec 2018 10:28:27 +0000 (15:58 +0530)]
Error handling: Cleanup Tunnels Manager errors
Signed-off-by: Roopesh Chander <roop@roopc.net>
Roopesh Chander [Wed, 5 Dec 2018 10:08:19 +0000 (15:38 +0530)]
Error presenter: Always handle the passed error
Signed-off-by: Roopesh Chander <roop@roopc.net>
Roopesh Chander [Wed, 5 Dec 2018 10:04:10 +0000 (15:34 +0530)]
Tunnel detail: Cell status switch should be toggled only after the alert presentation completes
Signed-off-by: Roopesh Chander <roop@roopc.net>
Roopesh Chander [Wed, 5 Dec 2018 09:53:55 +0000 (15:23 +0530)]
Refactoring: Consolidate file deletion into a separate function
Signed-off-by: Roopesh Chander <roop@roopc.net>
Roopesh Chander [Tue, 4 Dec 2018 10:57:31 +0000 (16:27 +0530)]
NE: Logging: Log file should begin with version numbers and tunnel name
Signed-off-by: Roopesh Chander <roop@roopc.net>
Roopesh Chander [Tue, 4 Dec 2018 10:28:02 +0000 (15:58 +0530)]
NE: Logging: Make it clear which calls to wg_log use String and which use StaticString
Signed-off-by: Roopesh Chander <roop@roopc.net>
Roopesh Chander [Tue, 4 Dec 2018 08:20:43 +0000 (13:50 +0530)]
Settings: Add timestamp to exported log
And remove the exported log afterwards.
Signed-off-by: Roopesh Chander <roop@roopc.net>
Roopesh Chander [Mon, 3 Dec 2018 13:21:51 +0000 (18:51 +0530)]
Refactor out VPN-handling stuff from tunnels list VC to the main VC
Signed-off-by: Roopesh Chander <roop@roopc.net>
Roopesh Chander [Mon, 3 Dec 2018 10:04:58 +0000 (15:34 +0530)]
VPN: Error out when tunnel activation fails because there's no internet
Signed-off-by: Roopesh Chander <roop@roopc.net>
Roopesh Chander [Thu, 29 Nov 2018 19:25:42 +0000 (00:55 +0530)]
Settings: Export log file
Signed-off-by: Roopesh Chander <roop@roopc.net>
Roopesh Chander [Thu, 29 Nov 2018 10:16:21 +0000 (15:46 +0530)]
NE: Write log to file
Signed-off-by: Roopesh Chander <roop@roopc.net>
Roopesh Chander [Thu, 29 Nov 2018 08:35:18 +0000 (14:05 +0530)]
Info.plist: Add app group id for accessing from both the app and the network extension
Signed-off-by: Roopesh Chander <roop@roopc.net>
Roopesh Chander [Thu, 29 Nov 2018 06:31:45 +0000 (12:01 +0530)]
Xcode: Add app groups capability
Signed-off-by: Roopesh Chander <roop@roopc.net>
Roopesh Chander [Wed, 28 Nov 2018 07:11:35 +0000 (12:41 +0530)]
It's 'WiFi', not 'Wifi'
Signed-off-by: Roopesh Chander <roop@roopc.net>
Roopesh Chander [Fri, 23 Nov 2018 07:34:55 +0000 (13:04 +0530)]
NE: All DNS queries must first go through the VPN's DNS servers
Signed-off-by: Roopesh Chander <roop@roopc.net>