Roopesh Chander
0a3a5ee900
Importing: Ignore case in matching file extensions inside zip files
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-02-09 19:42:50 +05:30
Roopesh Chander
7720307fc9
TunnelsManager: No need to access tunnelConfiguration on status change
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-02-09 19:42:50 +05:30
Jason A. Donenfeld
ea827e2ebd
Version bump
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-02-08 17:32:38 +01:00
Roopesh Chander
91b1734b7a
Fix writing of preshared key to config format
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-02-09 14:57:24 +05:30
Jason A. Donenfeld
bac4851e95
Project: don't embed swift binaries into appex
...
Otherwise we're rejected from the app store.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-02-08 17:26:05 +01:00
Jason A. Donenfeld
0e2556544e
Global: fix swiftlint issues
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-02-08 17:07:28 +01:00
Jason A. Donenfeld
38a6ba7091
KeyEncoding: rename file to match extension filename style
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-02-08 16:15:10 +01:00
Jason A. Donenfeld
407b367c8d
Key: we already do len checking in C
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-02-08 14:39:59 +01:00
Jason A. Donenfeld
a231410c52
Info.plist: Add missing key types
...
I worry that LSMinimumSystemVersion in the extension's plist might be
problematic, since that same plist runs on macOS and iOS. We _might_
need to bifurcate.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-02-08 03:47:36 +01:00
Jason A. Donenfeld
f518c00722
Version bump
...
First Mac App Store release if all goes well.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-02-08 03:28:28 +01:00
Jason A. Donenfeld
0539929d0c
Key: Use C implementation instead
...
Swift compiles so slowly and it's unclear all of the insane type punning
was even correct.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-02-08 03:23:15 +01:00
Jason A. Donenfeld
05547861b6
Key: Constant time encoding
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-02-08 03:23:15 +01:00
Roopesh Chander
9eed5fd898
TunnelsManager: Ignore status changes on tunnel providers we don't have
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-02-08 04:40:11 +05:30
Roopesh Chander
1b8b9ed7ee
iOS: Use shorter pretty time
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-02-08 04:40:11 +05:30
Roopesh Chander
ef6af03412
iOS: Tunnel detail: Turn off animation when showing fields changing
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-02-08 04:40:11 +05:30
Roopesh Chander
a99a755c34
macOS: Show alert if exiting with an active tunnel
...
Instead of deactivating the tunnel.
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-02-08 04:40:11 +05:30
Roopesh Chander
ecd66defe5
TunnelsManager: Don't lose .restarting state
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-02-08 02:34:30 +05:30
Roopesh Chander
1f3ec042e0
TunnelsManager: Log startDeactivation calls
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-02-08 02:34:29 +05:30
Jason A. Donenfeld
446c3e3698
Enable hardened runtime
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-02-07 19:17:27 +01:00
Jason A. Donenfeld
02e9172940
NetworkExtensionMac: Don't forget to link to the networkextension framework
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-02-07 19:13:43 +01:00
Jason A. Donenfeld
8676f3a663
StatusItemController: Show animation when deactivating
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-02-07 18:19:15 +01:00
Jason A. Donenfeld
394a0cbeb0
PacketTunnelProvider: proper fix for 32073323
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-02-07 15:01:37 +01:00
Roopesh Chander
868fee0477
TunnelsManager: When creating/modifying a tunnel, update the associated object
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-02-07 18:18:04 +05:30
Jason A. Donenfeld
0cddb562fc
macOS: prohibit multiple instances of app
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-02-06 06:20:23 +01:00
Jason A. Donenfeld
bebcaa012b
PrivateDataConfirmation: prompt with touch/face/pin/password ID for viewing/exporting keys
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-02-06 06:20:23 +01:00
Jason A. Donenfeld
ed8dc516dc
LegacyConfig: Remove and support plaintext for .mobileconfig
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-02-06 06:20:23 +01:00
Jason A. Donenfeld
8c3557a907
Keychain: store configurations in keychain instead of providerConfig
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-02-06 06:20:23 +01:00
Jason A. Donenfeld
a26d620f11
TunnelsManager: cache access to configuration object
...
Supposedly we never change it once per object, so we do the objective C
hack of adding it cached to the extension. This prevents 1000s of calls
to the keychain and improves the speed of imports.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-02-06 01:52:31 +01:00
Jason A. Donenfeld
30a73a75fd
Project: Remove OS name from appex file name
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-02-06 01:52:31 +01:00
Jason A. Donenfeld
71d26b4122
TunnelsManager: Wait for 6 seconds on deactivation instead of 5
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-02-06 01:52:31 +01:00
Roopesh Chander
71525c9d4e
wg-quick conf parser: Handle inline comments correctly
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-02-05 16:45:32 +05:30
Roopesh Chander
02a96d4566
macOS: Select tunnel after adding it with 'Add empty tunnel'
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-02-05 16:39:19 +05:30
Roopesh Chander
466db151b8
macOS: Ensure fields are updated on saving
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-02-05 16:15:43 +05:30
Roopesh Chander
1be133f269
iOS: Ensure fields are updated on saving
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-02-05 15:54:23 +05:30
Roopesh Chander
80de2ac6ac
macOS: Apply runtime configuration by diff-ing
...
And apply the diff on the tableView as insertRows/removeRows.
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-02-05 12:36:35 +05:30
Roopesh Chander
8a6a60482c
TunnelViewModel: Don't call peer change handler if there are no changes
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-02-05 12:36:34 +05:30
Roopesh Chander
657ec34d19
macOS: Tunnel detail: Refactor calculation of tableViewModelRows
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-02-05 12:36:34 +05:30
Jason A. Donenfeld
f7a31ca7bb
x25519: demand RNG is successful
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-02-05 00:49:48 +01:00
Jason A. Donenfeld
3c61db3a21
Config: Add template for macOS key
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-02-03 13:47:42 +01:00
Roopesh Chander
618d89941a
iOS: SwitchCell should hold the observation token
...
And should nil the token when preparing for reuse.
This also reverts "iOS: Tunnel detail: Refactor updation of status"
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-02-03 12:40:19 +05:30
Roopesh Chander
cbc602245e
iOS: KeyValueCell should hold the observation token
...
And should nil the token when preparing for reuse.
Otherwise, the observation closure is still active even after the cell
gets reused.
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-02-03 12:40:19 +05:30
Roopesh Chander
4ff6105053
iOS: Apply runtime configuration by diff-ing
...
And apply the diff on the tableView as insert/remove/reloads.
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-02-02 19:22:01 +05:30
Roopesh Chander
4134baced1
iOS: Tunnel detail: Keep track of visible fields with a [Bool] array
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-02-02 18:10:57 +05:30
Jason A. Donenfeld
0c5739db82
Strings: fix backwards clock wording
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-02-01 14:49:38 +01:00
Roopesh Chander
1f51ff6b17
iOS: Tunnel detail: Reload runtime config every second
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-02-01 15:27:17 +05:30
Roopesh Chander
08e5d65045
iOS: Tunnel detail: Refactor updation of status
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-31 18:46:46 +05:30
Roopesh Chander
1189b3d700
Fix handling of 'PersistentKeepalive: every n seconds'
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-31 18:22:08 +05:30
Roopesh Chander
f292a0ec7a
iOS: Make it compile again
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-31 18:17:04 +05:30
Roopesh Chander
3b29578524
Configure timers to fire even when tracking mouse events
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-31 17:04:34 +05:30
Roopesh Chander
70ac48ceba
macOS: Tunnel detail: Reload runtime config every second
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-31 16:48:51 +05:30
Roopesh Chander
acecc70397
Logger: Convert do-catch to try?
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-28 17:50:48 +05:30
Roopesh Chander
b0bb2e993a
Runtime info: Make bytecount and timestamp info prettier
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-28 17:27:08 +05:30
Roopesh Chander
d1f83d167e
Persistent Keepalive detail should read 'every n seconds'
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-28 16:07:28 +05:30
Roopesh Chander
a796c6c485
TunnelsManager: Invoke reload() in a subsequent runloop
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-26 14:31:42 +05:30
Roopesh Chander
6ad3487a9d
macOS: Delay .deactivated status to workaround system bug
...
For some time after it's connection status becomes .disconnected,
if a tunnel gets started, it gets automatically killed by the system
after ~25 seconds.
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-26 14:25:38 +05:30
Roopesh Chander
eabeb8ff05
macOS: Select the active tunnel when showing the manage tunnels window
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-24 18:35:11 +05:30
Roopesh Chander
52eec55d36
TunnelsTracker: Simplify using TunnelsManager.tunnelInOperation()
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-24 18:11:55 +05:30
Roopesh Chander
3c80490273
TunnelsManager: func tunnelInOperation()
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-24 18:11:26 +05:30
Roopesh Chander
c36a9e4ffd
macOS: Ensure status is up-to-date on startup
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-24 16:51:01 +05:30
Roopesh Chander
812e660491
Config file parsing: Fix bug when there are comments at the end
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-24 16:23:07 +05:30
Jason A. Donenfeld
2fe9f83ba5
macOS: show runtime configuration in tunnel manager
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-01-24 01:37:57 +01:00
Jason A. Donenfeld
22625e8cc4
Tunnel: support getting runtime configuration
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-01-24 01:37:57 +01:00
Roopesh Chander
19f353127e
macOS: Tunnel detail: Fix updation of tunnelEditVC
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-23 19:26:43 +05:30
Roopesh Chander
e5a76be6fd
macOS: Deactivate any active tunnel when app exits
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-23 16:31:30 +05:30
Roopesh Chander
76527ef0f8
macOS: Adapt to TunnelsManagerListDelegate changes
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-23 16:21:20 +05:30
Roopesh Chander
11e44f9ae5
iOS: Fix stale tunnel being shown on iPad
...
When the detail view is shown in the iPad and we delete
the current tunnel with a list view swipe rather than the delete button,
the detail view should go blank.
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-23 16:11:55 +05:30
Roopesh Chander
77d4a02139
iOS: Fix handling of deletion outside app
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-23 14:48:45 +05:30
Roopesh Chander
54f45cb3f8
macOS: reload: Iterate in reverse
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-22 20:06:52 +05:30
Jason A. Donenfeld
704de3b26c
TunnelsManager: refresh status after replacing insides
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-01-22 15:35:14 +01:00
Jason A. Donenfeld
d05b735703
TunnelsManager: use new helper
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-01-22 15:20:57 +01:00
Roopesh Chander
9f362e8cb0
macOS: Tunnel edit: Handle deletion outside app
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-22 19:30:21 +05:30
Roopesh Chander
2677efc9bf
macOS: Tunnel detail: Handle deletion outside app
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-22 19:30:21 +05:30
Roopesh Chander
2aad8cf0e8
macOS: Handle tunnel deletions outside the app
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-22 19:30:21 +05:30
Jason A. Donenfeld
668c4a475c
macOS: remove mobile network tweeks
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-01-22 13:11:28 +01:00
Jason A. Donenfeld
557b093232
MacOS: StatusMenu: Properly localize menu title
...
Partially revert "macOS: StatusMenu: Remove unused menu title"
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-01-22 11:26:07 +01:00
Roopesh Chander
6f9fa35c5a
macOS: Disable save button if the syntax highlighter detects any errors
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-22 12:57:32 +05:30
Roopesh Chander
d37e230ee0
macOS: Fix crash when importing using NoTunnelsDetailVC's button
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-22 05:00:39 +05:30
Roopesh Chander
e812683d6c
macOS: StatusMenu: Remove unused menu title
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-22 04:41:52 +05:30
Roopesh Chander
6d8e5cf3ed
Let there be newlines at the end of all files
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-22 04:40:47 +05:30
Roopesh Chander
244a2df2dd
Fix localization
...
- Use Unicode ellipses
- Use single quotes everywhere
- Use smart quotes
- Minor text change ("You cannot undo this action.")
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-22 04:35:13 +05:30
Roopesh Chander
0848765f50
macOS: Use Unicode version of '...' for menu text
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-22 04:16:22 +05:30
Roopesh Chander
8951ea338f
macOS: Fix status-related menu items
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-22 04:11:24 +05:30
Roopesh Chander
273ee04450
Better os() directives
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-22 04:06:37 +05:30
Jason A. Donenfeld
e2b068af1a
macOS: Tunnel edit: actually clean up error handling
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-01-21 23:21:47 +01:00
Jason A. Donenfeld
4e2f4e7124
XCode: set default signing identity back
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-01-21 23:17:08 +01:00
Roopesh Chander
6509009afc
macOS: Tunnel edit: Clean up error handling when saving
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-22 03:26:01 +05:30
Jason A. Donenfeld
0b2a4c2811
macOS: Observe private key changes for new tunnels too
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-01-21 22:55:25 +01:00
Jason A. Donenfeld
e1198b6e08
macOS: Better highlighter default value and move c implementation
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-01-21 22:22:20 +01:00
Jason A. Donenfeld
d7a88300f6
macOS: Make highlighter themes static
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-01-21 22:13:14 +01:00
Roopesh Chander
b22aeaeb20
Avoid using return in single-line closures
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-22 02:01:32 +05:30
Roopesh Chander
e0798b8a97
macOS: Make color theme use a dict
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-22 02:01:32 +05:30
Roopesh Chander
1bc2177883
macOS: Reset attributes for each syntax highlight cycle
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-22 01:19:16 +05:30
Roopesh Chander
15517c4c3d
macOS: Refactor syntax highlighting
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-22 01:18:07 +05:30
Roopesh Chander
f6c9ce2d71
macOS: Simplify NSColor extension
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-21 19:07:42 +05:30
Jason A. Donenfeld
5aa0f1a25f
macOS: show icon for inactive state
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-01-18 21:17:53 +01:00
Jason A. Donenfeld
602639ee25
highlighter: do not rely on localized case comparisons
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-01-18 09:32:49 +01:00
Jason A. Donenfeld
d06887d435
Xcode: move directives to toplevel project when possible
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-01-18 09:32:49 +01:00
Jason A. Donenfeld
470e4e7f7f
global: Fix up copyright headers
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-01-18 09:32:49 +01:00
Roopesh Chander
86165d25f7
TunnelsManager: Remove unused variable
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-18 09:32:49 +01:00
Roopesh Chander
69b973efdc
macOS: Tunnel detail: Better alignment for bottom controls
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-18 09:32:49 +01:00
Roopesh Chander
dc8f27c5c3
macOS: Rafactor by introducing a TunnelsTracker
...
The TunnelTracker is now the central place to track what the current
tunnel is, and for keeping track of the tunnel list.
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-18 01:34:24 +05:30
Roopesh Chander
796342ddec
macOS: Fix autolayout errors on Add Empty Tunnel
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-17 14:20:09 +05:30
Roopesh Chander
b7a5b8eff1
macOS: Update copyright year
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-17 14:08:11 +05:30
Roopesh Chander
8a0245190c
macOS: Make sure app is active when showing the About dialog
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-17 14:05:23 +05:30
Roopesh Chander
98775bf8a0
macOS: Application: Fix comment
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-17 14:03:59 +05:30
Roopesh Chander
7d5eb476e4
macOS: Manage tunnels: Make keyboard shortcuts discoverable
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-17 02:43:24 +05:30
Roopesh Chander
c477d24d67
macOS: Manage tunnels: Keyboard shortcuts
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-17 01:44:50 +05:30
Roopesh Chander
bf9cb092a9
macOS: Tunnel edit: Rename action handling methods
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-17 01:28:57 +05:30
Roopesh Chander
dbd5108475
macOS: Tunnel detail: Rename action handling methods
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-17 00:41:32 +05:30
Roopesh Chander
47c5f23a0a
macOS: Tunnels list: Rename action handling methods
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-17 00:38:44 +05:30
Roopesh Chander
a2871e63a7
macOS: Support window management keyboard shortcuts
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-16 18:01:59 +05:30
Jason A. Donenfeld
811714e21a
macOS: Networks should show allowedIPs and disappear when inactive
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-01-15 22:35:30 +01:00
Roopesh Chander
f63c9fd598
macOS: Use tunnelOverheadBytes for automatic MTU in macOS
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-16 01:51:56 +05:30
Roopesh Chander
e29cf19fdd
macOS: Different status bar icon looks for different states
...
- 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>
2019-01-16 01:26:10 +05:30
Roopesh Chander
26ea353933
macOS: Add About dialog
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-14 14:52:37 +05:30
Roopesh Chander
cd5427ef92
macOS: Add app icon
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-14 14:52:37 +05:30
Roopesh Chander
595f7943e2
macOS: Edit view: Auto hide editor scrollbars
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-14 14:52:37 +05:30
Roopesh Chander
55f022688d
macOS: To set default size, change frame instead of min size
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-14 14:52:37 +05:30
Roopesh Chander
96bd50504b
macOS: Fix editor scrolling
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-14 14:52:37 +05:30
Eric Kuck
97fec0d992
Default view controller sizes
...
Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
2019-01-14 14:52:36 +05:30
Jason A. Donenfeld
470532d146
ConfTextView: enable undo and disable junk
...
Double space stil makes a period, unfortunately.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-01-14 14:52:36 +05:30
Eric Kuck
321b88864c
Cut/copy/paste now work
...
Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
2019-01-14 14:52:36 +05:30
Jason A. Donenfeld
ba731e0099
Resync highlighter
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-01-14 14:52:36 +05:30
Eric Kuck
70848c04de
Syntax highlighter color updates
...
Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
2019-01-14 14:52:36 +05:30
Roopesh Chander
13e8c6b178
macOS: Support for on-demand activation
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-14 14:52:36 +05:30
Roopesh Chander
53e915c578
macOS: Quit menu item
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-14 14:52:36 +05:30
Roopesh Chander
bc8ea55023
macOS: Get the app back in focus after macOS' VPN prompt
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-14 14:52:35 +05:30
Roopesh Chander
e0af06844d
macOS: Fix 'Network' entry in menu
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-14 14:52:35 +05:30
Roopesh Chander
8980b5a524
macOS: Ensure a tunnel is selected when '-' is clicked
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-14 14:52:35 +05:30
Roopesh Chander
df8ab96139
macOS: Handle errors from TunnelsManager.create()
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-14 14:52:35 +05:30
Roopesh Chander
4a8366421f
iOS: Export log: Should present error from the main thread
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-14 14:52:35 +05:30
Roopesh Chander
c9ee549a2e
macOS: Localize export sheets
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-14 14:52:35 +05:30
Roopesh Chander
f5059ce55b
macOS: Import sheet button should say 'Import'
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-14 14:52:35 +05:30
Roopesh Chander
5a73244ec9
macOS: Tunnel detail: Ensure long keys fit
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-14 14:52:35 +05:30
Roopesh Chander
922b6f76b2
macOS: Manage tunnels: Add empty tunnel pulldown menu implementation
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-14 14:52:35 +05:30
Roopesh Chander
fc9e2de72c
macOS: Update detail view after editing
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-14 14:52:35 +05:30
Roopesh Chander
80977b95de
macOS: Edit view: Update public key as you edit
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-14 14:52:35 +05:30
Roopesh Chander
bbeb732ef3
Highlighter: Report each key type separately
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-14 14:52:34 +05:30
Roopesh Chander
94c4922913
Parsing: Always error on unrecognized keys
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-14 14:52:34 +05:30
Roopesh Chander
fc03c635c1
Parsing: Error on duplicate entries
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-14 14:52:34 +05:30
Roopesh Chander
b0612df990
macOS: Edit view: Validate and save
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-14 14:52:34 +05:30
Roopesh Chander
c2a6241b5c
macOS: Refactor config file parsing
...
- To report more fine grained errors
- To make the parse errors conform to WireGuardAppError
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-14 14:52:34 +05:30
Eric Kuck
96fa6d3ba6
Syntax highlighter color updates
...
Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
2019-01-14 14:52:34 +05:30
Jason A. Donenfeld
64fe415879
Highlighter: use original file from contrib/examples/highlighter
...
This makes it easier to track updates and make diffs. Also, disable
things we don't support in the NetworkExtension app.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-01-14 14:52:34 +05:30
Eric Kuck
59bfa7f1df
Added syntax highlighting conf textview
...
Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
2019-01-14 14:52:34 +05:30
Roopesh Chander
c2633987c3
macOS: Tunnel edit view
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-14 14:52:33 +05:30
Roopesh Chander
f7b2f73015
macOS: Rename *Cell to *Row
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-14 14:52:33 +05:30
Roopesh Chander
c72f7056b3
macOS: On adding the first tunnel, select it
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-14 14:52:33 +05:30
Roopesh Chander
cb778fe7e0
macOS: Consolidate presenting of the import panel
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-14 14:52:33 +05:30
Roopesh Chander
f3c2904241
macOS: Manage tunnels: Handle the case when there are no tunnels
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-14 14:52:33 +05:30
Roopesh Chander
df8b400850
macOS: Present tunnel activation errors from the window when possible
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-14 14:52:33 +05:30
Roopesh Chander
252d940d34
macOS: Present errors as a sheet when applicable
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-14 14:52:32 +05:30
Roopesh Chander
efb64b1959
macOS: Manage tunnels: Remove tunnel
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-14 14:52:32 +05:30
Roopesh Chander
dfc4b37518
macOS: Manage tunnels: Update tunnels list on changes
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-14 14:52:32 +05:30
Roopesh Chander
60cfceec4f
macOS: Manage tunnels: Export log pulldown menu implementation
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-14 14:52:32 +05:30
Roopesh Chander
361830a69e
macOS: Manage tunnels: Export tunnels pulldown menu implementation
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-14 14:52:32 +05:30
Roopesh Chander
f6ea25573b
macOS: Xcode: Add ablity to save files
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-14 14:52:32 +05:30
Roopesh Chander
de12c27d5b
macOS: Manage tunnels: Select first tunnel on showing the window
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-14 14:52:32 +05:30
Roopesh Chander
a221cb566b
macOS: Manage tunnels: Set window title
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-14 14:52:32 +05:30
Roopesh Chander
f33cd0b6fd
macOS: Manage tunnels: Import pulldown menu implementation
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-14 14:52:32 +05:30
Roopesh Chander
38bb0faf86
macOS: Manage tunnels: Localize pulldown menu items
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-14 14:52:32 +05:30
Roopesh Chander
8d9c5e2950
macOS: Show open panel as sheet on manage window
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-14 14:52:32 +05:30
Roopesh Chander
09f4be17de
macOS: Manage tunnels: Adjust spacings
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-14 14:52:32 +05:30
Roopesh Chander
60e18dfdd5
macOS: Manage tunnels: Add a box around the detail view
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-14 14:52:31 +05:30
Roopesh Chander
5bc0c5b2b4
macOS: Manage tunnels: Show status checkbox and edit button
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-14 14:52:31 +05:30
Roopesh Chander
4a4eeb4a21
macOS: s/macMenuStatus/macStatus/g;
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-14 14:52:31 +05:30
Roopesh Chander
ada7db3dca
macOS: Manage tunnels: Tunnel detail view
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-14 14:52:31 +05:30
Roopesh Chander
c946c0ea48
macOS: Manage tunnels: Add a filler button
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-14 14:52:31 +05:30
Roopesh Chander
4a4690b5fa
macOS: Manage tunnels: Fix list view look
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-14 14:52:31 +05:30
Roopesh Chander
37fce31d16
macOS: Manage tunnels: Add buttons to the bottom of the list view
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-14 14:52:30 +05:30
Roopesh Chander
7934d6b0c7
macOS: Manage tunnels window: Tunnels list
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-14 14:52:30 +05:30
Roopesh Chander
98e9088aba
macOS: Capitalize All Rights Reserved
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-14 14:52:30 +05:30
Roopesh Chander
2c81c3a379
macOS: Show status as disabled menu items
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-14 14:52:30 +05:30
Roopesh Chander
04f6ee0f11
macOS: Ability to activate / deactivate a tunnel
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-14 14:52:30 +05:30
Roopesh Chander
545f8c88f4
macOS: Ability to import tunnels from file
...
For now, the open panel shows as a separate window.
Later, we'll open it as a sheet on the 'Manage tunnels' window.
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-14 14:52:30 +05:30
Roopesh Chander
6a27626fc0
iOS: Refactor importFromFile
...
So that it can be used in macOS as well
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-14 14:52:29 +05:30
Roopesh Chander
fb1607d4a2
macOS: Add tunnel management menu items
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-14 14:52:29 +05:30
Roopesh Chander
51a2c272b9
macOS: Specify app is an 'agent'
...
This hides the app from the Dock, while still enabling the app
to come to the foreground if required.
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-14 14:52:29 +05:30
Roopesh Chander
b5751b6321
macOS: Create status bar with tunnel names
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-14 14:52:29 +05:30
Roopesh Chander
110012dbcc
macOS: Add status bar icon
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-14 14:52:29 +05:30
Roopesh Chander
5c7a149167
macOS: Remove MainMenu.xib
...
When there's no xib, we should explicitly set the app delegate, so we
override NSApplication and set the app delegate in NSApplication.shared
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-14 14:52:29 +05:30
Roopesh Chander
629009d3be
macOS: NE: Add entitlements for making network connections
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-14 14:52:28 +05:30
Roopesh Chander
d7d4355f5e
Make app groups work on both iOS and macOS
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-14 14:52:28 +05:30
Roopesh Chander
55d6961a2f
macOS: Add Network Extensions capability to app
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-14 14:52:28 +05:30
Roopesh Chander
c8cd663a05
iOS: Fix WireGuardNetworkExtensioniOS target
...
- Rename WireGuardNetworkExtension.entitlements to WireGuardNetworkExtension_iOS.entitlements
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-14 14:52:28 +05:30
Roopesh Chander
a754c4d7ab
iOS: Fix WireGuardiOS target
...
- Move Info.plist and entitlements to WireGuard/UI/iOS/
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-14 14:52:28 +05:30
Roopesh Chander
95415cd917
macOS: Fix WireGuardmacOS target
...
- Include non-UI code from iOS while building
- Add run scripts
- Move files to WireGuard/UI/macOS
- Set Swift-Obj-C bridging header
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-14 14:52:28 +05:30
Roopesh Chander
b32b897181
macOS: Fix WireGuardNetworkExtensionmacOS target
...
- Build using common network extension code
- Add run scripts
- Set Info.plist to common network extension's Info.plist
- Move entitlements to common network extension folder
- Remove Xcode-generated macOS network extension code
- Set Swift-Obj-C bridging header
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-14 14:52:27 +05:30
Roopesh Chander
d5c1acb57e
macOS: WireGuardNetworkExtensionmacOS depends on WireGuardGoBridgemacOS
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-14 14:52:27 +05:30
Roopesh Chander
573f9640de
macOS: Add WireGuardNetworkExtensionmacOS target
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-14 14:52:27 +05:30
Roopesh Chander
f6772dc353
macOS: Add WireGuardmacOS target
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-14 14:52:27 +05:30
Roopesh Chander
0cbe66df99
Xcode: Add WireGuardGoBridgemacOS target
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-14 14:52:27 +05:30
Roopesh Chander
3cd33ebe8f
Move iOS images and storyboard into UI/iOS/ folder
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-14 14:52:27 +05:30
Roopesh Chander
c7a40d3cb0
Xcode: Rename iOS targets to include an 'iOS' suffix
...
But keep the PRODUCT_NAME as 'WireGuard', not 'WireGuardiOS'.
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-14 14:52:26 +05:30
Roopesh Chander
d02b0fd10e
xcconfig: Make app id platform-specific
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-14 14:52:26 +05:30
Roopesh Chander
09d7a5229a
On-Demand: Add support for macOS-specific values
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-14 14:52:26 +05:30
Roopesh Chander
10982a57ef
import Foundation instead of UIKit wherever possible
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-14 14:52:26 +05:30
Jason A. Donenfeld
5f15b664fc
Version bump
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-01-08 02:13:44 +01:00
Jason A. Donenfeld
49f287439e
PacketTunnelSettingsGenerator: use 127.0.0.1 as dummy address
...
It turns out that using 0.0.0.0 somehow conflicts with DNS lookups when
CLAT is in use.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-01-08 01:51:12 +01:00
Jason A. Donenfeld
150cd119c7
Avoid dynamic MTU calculations for now
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-01-07 19:23:39 -05:00
Jason A. Donenfeld
e2384e143c
Update copyright
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-01-07 19:23:39 -05:00
Jason A. Donenfeld
52c59704de
Version bump
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-12-28 19:43:11 +01:00
Jason A. Donenfeld
0b828f9b96
Rework DNS and routes in network extension
...
The DNS resolver prior had useless comments, awful nesting, converted
bytes into strings and back into bytes, and generally made no sense.
That's been rewritten now.
But more fundumentally, this commit made the DNS resolver actually
accomplish its objective, by passing AI_ALL to it. It turns out, though,
that the Go library isn't actually using GAI in the way we need for
parsing IP addresses, so we actually need to do another round, this time
with hints flag as zero, so that we get the DNS64 address.
Additionally, since we're now binding sockets to interfaces, we can
entirely remove the excludedRoutes logic.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-12-28 19:38:03 +01:00
Jason A. Donenfeld
51a3e5c0b4
Version bump
...
A Christmas Special, for TestFlight, and possibly for release if things
go well there.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-12-26 01:41:22 +01:00
Jason A. Donenfeld
c9c343cde2
NetworkExtension: rescope socket instead of tearing down socket
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-12-26 01:17:55 +01:00
Roopesh Chander
c563a24348
minizip: Remove zip encryption code
...
We can now remove -DNOCRYPT cflag while compiling
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-12-25 12:48:04 +05:30
Roopesh Chander
808852c547
Tunnel edit: Fix crash
...
This fixes a crash that happens when you:
1. Scroll to the end of the Edit screen
2. Delete a peer
3. Toggle the Activate On Demand switch
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-12-24 13:01:21 +05:30
Eric Kuck
035055ef0a
SwitchCell nits
...
Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
2018-12-22 15:32:29 -06:00
Eric Kuck
508ba44576
Fix typo for simulator builds
...
Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
2018-12-22 14:32:39 -06:00
Roopesh Chander
999b761ed0
Remove more comments
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-12-23 00:31:44 +05:30
Jason A. Donenfeld
129f94dccd
Rely on availability of fd only after setting network settings
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-12-22 18:29:54 +01:00
Jason A. Donenfeld
dddbf3b370
Retain aggressive socket reestablishment for now
...
This can be reverted once we've done more testing.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-12-22 15:45:09 +01:00
Roopesh Chander
d29f47fc9b
Don't set username on NETunnelProviderProtocol
...
The username corresponds to the Account field in iOS system VPN UI,
but if we don't set it, the field is not shown, so setting it isn't
really required.
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-12-22 16:13:31 +05:30
Roopesh Chander
e6e1795d08
TunnelErrors: Add alert text for PacketTunnelProviderError
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-12-22 16:05:43 +05:30
Roopesh Chander
fd29cf3402
TunnelStatus: Absorb NEVPNStatus+CustomStringConvertible
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-12-22 15:46:28 +05:30
Jason A. Donenfeld
56ad5f74e9
Also refresh status
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-12-22 07:07:53 +01:00
Jason A. Donenfeld
49bf55021f
Reassign tunnelProvider if it changes from outside the app
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-12-22 06:56:12 +01:00
Eric Kuck
0bec5b04b0
All models now Equatable
...
Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
2018-12-21 22:57:17 -06:00
Jason A. Donenfeld
d36e7e27ff
Clean up trailing whitespace
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-12-22 05:30:35 +01:00
Jason A. Donenfeld
b0b6866c51
Do not crash if we can't get socket.fileDescriptor
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-12-22 05:13:04 +01:00
Eric Kuck
9098cd1161
Removing a tunnel from iOS's settings is now immediately reflected in app
...
Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
2018-12-21 21:59:43 -06:00
Jason A. Donenfeld
8365adf435
Localize remaining strings in network extension
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-12-22 03:42:01 +01:00
Eric Kuck
9d9859248e
RTL support
...
Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
2018-12-21 20:37:22 -06:00
Eric Kuck
f7e9f4d631
Strongly recommended now appears as placeholder for DNS when needed
...
Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
2018-12-21 19:52:51 -06:00
Jason A. Donenfeld
f2000aa1da
Combine double log invocations
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-12-22 02:21:07 +01:00
Jason A. Donenfeld
41a4c6362a
Attempt to strongly recommend things
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-12-22 01:55:42 +01:00
Jason A. Donenfeld
aede9f6e45
Move model helpers to model directory
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-12-22 01:36:42 +01:00
Eric Kuck
1eeed89174
Fixes mock tunnels
...
Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
2018-12-21 18:35:01 -06:00
Jason A. Donenfeld
c1c5f7a7c7
Do not set copyable back to true on reuse
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-12-22 01:31:59 +01:00
Jason A. Donenfeld
4ed646973e
Move name from interface to tunnel
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-12-22 00:28:18 +01:00
Jason A. Donenfeld
9295895e3a
Fix paren typo
...
"I am very anti-paren." --Eric
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-12-21 23:45:20 +01:00
Jason A. Donenfeld
7b9d4cb9e3
Nuke trailing spaces
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-12-21 23:34:56 +01:00
Eric Kuck
1fecd8eb6c
providerConfiguration is now a WgQuickConfig
...
Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
2018-12-21 16:32:08 -06:00
Jason A. Donenfeld
accf60b82f
Do not require NetworkExtension to know its own name
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-12-21 22:05:47 +01:00
Eric Kuck
f6af9d9ffb
All migration stuff moved to one gross file
...
Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
2018-12-21 12:51:14 -06:00
Jason A. Donenfeld
78b38a4eba
Simplify versioning of stored data
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-12-21 18:58:06 +01:00
Jason A. Donenfeld
ec031b1f19
Get rid of superflous isActivateOnDemandEnabled key
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-12-21 18:50:32 +01:00
Eric Kuck
8553723e04
Updated NETunnelProvider save format
...
Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
2018-12-21 16:42:16 +01:00
Jason A. Donenfeld
38445114e0
NE: simplify logic
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-12-21 15:56:03 +01:00
Roopesh Chander
a21c569e9f
NE: Simplify DNS resolution
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-12-21 19:24:22 +05:30
Roopesh Chander
0552d75aa1
Localize all the things
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-12-21 18:34:09 +05:30
Roopesh Chander
e47a8232d8
Tunnel detail: iPad: Handle deletion of tunnel correctly
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-12-21 18:02:18 +05:30
Roopesh Chander
f818cdd963
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>
2018-12-21 17:32:44 +05:30
Roopesh Chander
28ce4d5164
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>
2018-12-21 15:52:47 +05:30
Eric Kuck
c2131cb757
Added missing param in MockTunnels
...
Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
2018-12-20 13:51:44 -06:00
Eric Kuck
a89ad95901
Enabled more swiftlint rules
...
Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
2018-12-20 11:22:37 -06:00
Eric Kuck
5618c465a2
Added a String->[String] helper
...
Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
2018-12-20 10:46:26 -06:00
Roopesh Chander
de08978a80
TunnelErrors: Remove unused error
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-12-20 19:44:57 +05:30
Roopesh Chander
9268c0c4bc
Tunnel edit: init() need not take a tunnelConfiguration argument
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-12-19 18:35:53 +05:30
Roopesh Chander
5c501ac9a6
NE: Log whether tunnel was activated from the app or not
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-12-19 18:35:53 +05:30