Commit Graph

915 Commits

Author SHA1 Message Date
Roopesh Chander 100fc4b855 macOS: Replace NSSegmentedControl with NSPopUpButton and NSButton
Thereby avoiding the hacky way of showing the menus.
2019-02-22 17:59:41 +05:30
Roopesh Chander e6c146f8c7 Importing: Give a clearer error message on importing an invalid config 2019-02-22 13:03:53 +05:30
Roopesh Chander 926a2fa401 macOS: Show 'quitting with active tunnel' only when appropriate
Not when logging off or when the machine's shutting down
2019-02-22 13:03:53 +05:30
Roopesh Chander 0862faa3b7 macOS: Fix removal of DNSes from AllowedIPs when DNS has changed 2019-02-21 18:17:28 +05:30
Roopesh Chander b787ed9f5a iOS: On changing DNS, update AllowedIPs with the current DNS servers 2019-02-21 17:57:13 +05:30
Roopesh Chander e5e5418307 macOS: On saving, update AllowedIPs with the current DNS servers 2019-02-21 17:57:13 +05:30
Roopesh Chander 24141baa66 Importing: Better error message when .conf file is not readable 2019-02-21 17:57:13 +05:30
Jason A. Donenfeld e6d62f334a macOS: Specify crypto compliance 2019-02-19 16:12:33 +01:00
Roopesh Chander 9cfdbfa1a2 TunnelViewModel: Remove DNS from AllowedIPs when unchecking 'Exclude private IPs' 2019-02-16 19:57:31 +05:30
Roopesh Chander 226911715c macOS: Exclude private IPs 2019-02-16 18:25:17 +05:30
Roopesh Chander 549f5de700 TunnelViewModel: Minor refactoring of exclude private IPs handling 2019-02-16 17:35:33 +05:30
Jason A. Donenfeld 2a4e4e798a ConfTextStorage: lowercase only once
Also fix submodule regression.
2019-02-16 17:18:10 +05:30
Roopesh Chander 89c108d00f ConfTextStorage: Let's keep the AllowedIPs and DNS servers as strings 2019-02-16 01:20:11 +05:30
Roopesh Chander 0e124746d9 ConfTextStorage: Make fieldType an enum 2019-02-16 00:26:49 +05:30
Jason A. Donenfeld da3b9d8077 ConfTextStorage: keep track of single peer state for exclude private IPs 2019-02-15 19:44:06 +01:00
Roopesh Chander eb683ce18c macOS: Tunnel detail: Set min width/height 2019-02-15 15:44:11 +05:30
Roopesh Chander 5eaef2f573 macOS: Tunnels list: Use constant width for the table view 2019-02-15 15:40:12 +05:30
Jason A. Donenfeld 40250bfbab macOS: Show privacy notice on adding first tunnel
App store reviewers don't understand that this isn't a service.

Revert this as soon as they come to their senses.
2019-02-15 01:14:14 +01:00
Jason A. Donenfeld 429af207c7 Version bump 2019-02-14 23:07:06 +01:00
Roopesh Chander 9c0e001265 Preshared key field in the detail view should just say 'enabled' 2019-02-12 19:30:59 +05:30
Roopesh Chander 74f55febab Log migration of tunnel configuration 2019-02-12 19:17:32 +05:30
Roopesh Chander 70923d9c87 Migrate when we notice a new tunnel in reload() 2019-02-12 17:43:40 +05:30
Roopesh Chander 078780a3ba Don't migrate in asTunnelConfiguration()
It causes problems when installing a tunnel through a
Configuration Profile on macOS and activating it first through
Network Preferences.
2019-02-12 17:37:27 +05:30
Roopesh Chander e49e20ca51 Info.plist: Localize with InfoPlist.strings 2019-02-11 16:08:55 +05:30
Roopesh Chander ee80eb7614 macOS: Change keyboard shortcut for importing to Cmd+O 2019-02-10 17:55:50 +05:30
Roopesh Chander 10ca25e60f macOS: Adapt to the new applyConfiguration API 2019-02-10 03:35:24 +05:30
Roopesh Chander aea253a6e9 iOS: Rewrite applying runtime configuration
To make scrolling smoother while the fields are modified
2019-02-10 03:35:24 +05:30
Roopesh Chander 3355019408 Importing: Ignore case in matching file extensions inside zip files 2019-02-09 19:42:50 +05:30
Roopesh Chander 7cee9608d9 TunnelsManager: No need to access tunnelConfiguration on status change 2019-02-09 19:42:50 +05:30
Jason A. Donenfeld 36ccb5883d Version bump 2019-02-08 17:32:38 +01:00
Roopesh Chander 3cea15f6f2 Fix writing of preshared key to config format 2019-02-09 14:57:24 +05:30
Jason A. Donenfeld 80f48aec81 Project: don't embed swift binaries into appex
Otherwise we're rejected from the app store.
2019-02-08 17:26:05 +01:00
Jason A. Donenfeld 6134817b23 Global: fix swiftlint issues 2019-02-08 17:07:28 +01:00
Jason A. Donenfeld 98866b323b KeyEncoding: rename file to match extension filename style 2019-02-08 16:15:10 +01:00
Jason A. Donenfeld 9852a75f01 Key: we already do len checking in C 2019-02-08 14:39:59 +01:00
Jason A. Donenfeld 657915e931 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.
2019-02-08 03:47:36 +01:00
Jason A. Donenfeld 9239512b49 Version bump
First Mac App Store release if all goes well.
2019-02-08 03:28:28 +01:00
Jason A. Donenfeld 7ebf36d0f4 Key: Use C implementation instead
Swift compiles so slowly and it's unclear all of the insane type punning
was even correct.
2019-02-08 03:23:15 +01:00
Jason A. Donenfeld e2c717212b Key: Constant time encoding 2019-02-08 03:23:15 +01:00
Roopesh Chander 443ecb1e20 TunnelsManager: Ignore status changes on tunnel providers we don't have 2019-02-08 04:40:11 +05:30
Roopesh Chander 6014b4b8a6 iOS: Use shorter pretty time 2019-02-08 04:40:11 +05:30
Roopesh Chander b947c98dc0 iOS: Tunnel detail: Turn off animation when showing fields changing 2019-02-08 04:40:11 +05:30
Roopesh Chander 59918ec67a macOS: Show alert if exiting with an active tunnel
Instead of deactivating the tunnel.
2019-02-08 04:40:11 +05:30
Roopesh Chander fd40b3adb8 TunnelsManager: Don't lose .restarting state 2019-02-08 02:34:30 +05:30
Roopesh Chander 9111b2723f TunnelsManager: Log startDeactivation calls 2019-02-08 02:34:29 +05:30
Jason A. Donenfeld 56d878481b Enable hardened runtime 2019-02-07 19:17:27 +01:00
Jason A. Donenfeld e89714cfbb NetworkExtensionMac: Don't forget to link to the networkextension framework 2019-02-07 19:13:43 +01:00
Jason A. Donenfeld 364fcd4dbe StatusItemController: Show animation when deactivating 2019-02-07 18:19:15 +01:00
Jason A. Donenfeld 2d761b4a00 PacketTunnelProvider: proper fix for 32073323 2019-02-07 15:01:37 +01:00
Roopesh Chander af026c106e TunnelsManager: When creating/modifying a tunnel, update the associated object 2019-02-07 18:18:04 +05:30
Jason A. Donenfeld 5c67f7467c macOS: prohibit multiple instances of app 2019-02-06 06:20:23 +01:00
Jason A. Donenfeld c005893fe7 PrivateDataConfirmation: prompt with touch/face/pin/password ID for viewing/exporting keys 2019-02-06 06:20:23 +01:00
Jason A. Donenfeld 30576a1fe6 LegacyConfig: Remove and support plaintext for .mobileconfig 2019-02-06 06:20:23 +01:00
Jason A. Donenfeld 0407d41005 Keychain: store configurations in keychain instead of providerConfig 2019-02-06 06:20:23 +01:00
Jason A. Donenfeld bcd475e0bc 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.
2019-02-06 01:52:31 +01:00
Jason A. Donenfeld c79a45f2e2 Project: Remove OS name from appex file name 2019-02-06 01:52:31 +01:00
Jason A. Donenfeld d2556d045d TunnelsManager: Wait for 6 seconds on deactivation instead of 5 2019-02-06 01:52:31 +01:00
Roopesh Chander 4ac1437c4b wg-quick conf parser: Handle inline comments correctly 2019-02-05 16:45:32 +05:30
Roopesh Chander d3a4d606cf macOS: Select tunnel after adding it with 'Add empty tunnel' 2019-02-05 16:39:19 +05:30
Roopesh Chander 6838d19599 macOS: Ensure fields are updated on saving 2019-02-05 16:15:43 +05:30
Roopesh Chander 1ae8e6228f iOS: Ensure fields are updated on saving 2019-02-05 15:54:23 +05:30
Roopesh Chander caa4fadd01 macOS: Apply runtime configuration by diff-ing
And apply the diff on the tableView as insertRows/removeRows.
2019-02-05 12:36:35 +05:30
Roopesh Chander 63371841af TunnelViewModel: Don't call peer change handler if there are no changes 2019-02-05 12:36:34 +05:30
Roopesh Chander 5e704465a7 macOS: Tunnel detail: Refactor calculation of tableViewModelRows 2019-02-05 12:36:34 +05:30
Jason A. Donenfeld e4277c2dfd x25519: demand RNG is successful 2019-02-05 00:49:48 +01:00
Jason A. Donenfeld fc63aa7c17 Config: Add template for macOS key 2019-02-03 13:47:42 +01:00
Roopesh Chander c392ed13d6 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"
2019-02-03 12:40:19 +05:30
Roopesh Chander c322117e49 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.
2019-02-03 12:40:19 +05:30
Roopesh Chander 99f72293f6 iOS: Apply runtime configuration by diff-ing
And apply the diff on the tableView as insert/remove/reloads.
2019-02-02 19:22:01 +05:30
Roopesh Chander 10f52ca69a iOS: Tunnel detail: Keep track of visible fields with a [Bool] array 2019-02-02 18:10:57 +05:30
Jason A. Donenfeld ac7b938953 Strings: fix backwards clock wording 2019-02-01 14:49:38 +01:00
Roopesh Chander d2e14cfb19 iOS: Tunnel detail: Reload runtime config every second 2019-02-01 15:27:17 +05:30
Roopesh Chander 26e6f23582 iOS: Tunnel detail: Refactor updation of status 2019-01-31 18:46:46 +05:30
Roopesh Chander d605613c62 Fix handling of 'PersistentKeepalive: every n seconds' 2019-01-31 18:22:08 +05:30
Roopesh Chander d2abc246cf iOS: Make it compile again 2019-01-31 18:17:04 +05:30
Roopesh Chander 60f1fee6e7 Configure timers to fire even when tracking mouse events 2019-01-31 17:04:34 +05:30
Roopesh Chander 85e9b48f87 macOS: Tunnel detail: Reload runtime config every second 2019-01-31 16:48:51 +05:30
Roopesh Chander 558f6db3c2 Logger: Convert do-catch to try? 2019-01-28 17:50:48 +05:30
Roopesh Chander 28e5a061c1 Runtime info: Make bytecount and timestamp info prettier 2019-01-28 17:27:08 +05:30
Roopesh Chander 69fddfa1f8 Persistent Keepalive detail should read 'every n seconds' 2019-01-28 16:07:28 +05:30
Roopesh Chander df7bdc0baa TunnelsManager: Invoke reload() in a subsequent runloop 2019-01-26 14:31:42 +05:30
Roopesh Chander 0c9380fe4e 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.
2019-01-26 14:25:38 +05:30
Roopesh Chander e8c644dfdf macOS: Select the active tunnel when showing the manage tunnels window 2019-01-24 18:35:11 +05:30
Roopesh Chander 4df2b7e642 TunnelsTracker: Simplify using TunnelsManager.tunnelInOperation() 2019-01-24 18:11:55 +05:30
Roopesh Chander a099d6fa26 TunnelsManager: func tunnelInOperation() 2019-01-24 18:11:26 +05:30
Roopesh Chander 1e3be2a51e macOS: Ensure status is up-to-date on startup 2019-01-24 16:51:01 +05:30
Roopesh Chander e95cb6e6bd Config file parsing: Fix bug when there are comments at the end 2019-01-24 16:23:07 +05:30
Jason A. Donenfeld 8c4475111b macOS: show runtime configuration in tunnel manager 2019-01-24 01:37:57 +01:00
Jason A. Donenfeld fef3e80472 Tunnel: support getting runtime configuration 2019-01-24 01:37:57 +01:00
Roopesh Chander 262d8800a1 macOS: Tunnel detail: Fix updation of tunnelEditVC 2019-01-23 19:26:43 +05:30
Roopesh Chander c45f591f8b macOS: Deactivate any active tunnel when app exits 2019-01-23 16:31:30 +05:30
Roopesh Chander 8c64f28742 macOS: Adapt to TunnelsManagerListDelegate changes 2019-01-23 16:21:20 +05:30
Roopesh Chander d272cc2ab3 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.
2019-01-23 16:11:55 +05:30
Roopesh Chander 775b65306d iOS: Fix handling of deletion outside app 2019-01-23 14:48:45 +05:30
Roopesh Chander b6ad3f39e0 macOS: reload: Iterate in reverse 2019-01-22 20:06:52 +05:30
Jason A. Donenfeld 5ddb81b654 TunnelsManager: refresh status after replacing insides 2019-01-22 15:35:14 +01:00
Jason A. Donenfeld 465b9037ba TunnelsManager: use new helper 2019-01-22 15:20:57 +01:00
Roopesh Chander f1cec084da macOS: Tunnel edit: Handle deletion outside app 2019-01-22 19:30:21 +05:30
Roopesh Chander f281b932c2 macOS: Tunnel detail: Handle deletion outside app 2019-01-22 19:30:21 +05:30
Roopesh Chander c477f721fb macOS: Handle tunnel deletions outside the app 2019-01-22 19:30:21 +05:30
Jason A. Donenfeld d3db8519b0 macOS: remove mobile network tweeks 2019-01-22 13:11:28 +01:00
Jason A. Donenfeld b3d9d582bf MacOS: StatusMenu: Properly localize menu title
Partially revert "macOS: StatusMenu: Remove unused menu title"
2019-01-22 11:26:07 +01:00
Roopesh Chander 658c54f59c macOS: Disable save button if the syntax highlighter detects any errors 2019-01-22 12:57:32 +05:30
Roopesh Chander d056732e27 macOS: Fix crash when importing using NoTunnelsDetailVC's button 2019-01-22 05:00:39 +05:30
Roopesh Chander 592ea5cfca macOS: StatusMenu: Remove unused menu title 2019-01-22 04:41:52 +05:30
Roopesh Chander 8b89c29ace Let there be newlines at the end of all files 2019-01-22 04:40:47 +05:30
Roopesh Chander 4f28737dbf Fix localization
- Use Unicode ellipses
 - Use single quotes everywhere
 - Use smart quotes
 - Minor text change ("You cannot undo this action.")
2019-01-22 04:35:13 +05:30
Roopesh Chander 927ce4c129 macOS: Use Unicode version of '...' for menu text 2019-01-22 04:16:22 +05:30
Roopesh Chander 0f140d2222 macOS: Fix status-related menu items 2019-01-22 04:11:24 +05:30
Roopesh Chander ca827d2d10 Better os() directives 2019-01-22 04:06:37 +05:30
Jason A. Donenfeld c0883e37c4 macOS: Tunnel edit: actually clean up error handling 2019-01-21 23:21:47 +01:00
Jason A. Donenfeld b69dbfda52 XCode: set default signing identity back 2019-01-21 23:17:08 +01:00
Roopesh Chander 808c95567a macOS: Tunnel edit: Clean up error handling when saving 2019-01-22 03:26:01 +05:30
Jason A. Donenfeld 285c21c84c macOS: Observe private key changes for new tunnels too 2019-01-21 22:55:25 +01:00
Jason A. Donenfeld 5b6b34d9c6 macOS: Better highlighter default value and move c implementation 2019-01-21 22:22:20 +01:00
Jason A. Donenfeld 015e94d0a1 macOS: Make highlighter themes static 2019-01-21 22:13:14 +01:00
Roopesh Chander ef54cae788 Avoid using return in single-line closures 2019-01-22 02:01:32 +05:30
Roopesh Chander 1df572218d macOS: Make color theme use a dict 2019-01-22 02:01:32 +05:30
Roopesh Chander dd38cbe7ac macOS: Reset attributes for each syntax highlight cycle 2019-01-22 01:19:16 +05:30
Roopesh Chander 053ea9fc54 macOS: Refactor syntax highlighting 2019-01-22 01:18:07 +05:30
Roopesh Chander a1608819f9 macOS: Simplify NSColor extension 2019-01-21 19:07:42 +05:30
Jason A. Donenfeld 150fd25569 macOS: show icon for inactive state 2019-01-18 21:17:53 +01:00
Jason A. Donenfeld 6b5b8f3c27 highlighter: do not rely on localized case comparisons 2019-01-18 09:32:49 +01:00
Jason A. Donenfeld 919c46af69 Xcode: move directives to toplevel project when possible 2019-01-18 09:32:49 +01:00
Jason A. Donenfeld aefd7425cf global: Fix up copyright headers 2019-01-18 09:32:49 +01:00
Roopesh Chander 02dbb4f94d TunnelsManager: Remove unused variable 2019-01-18 09:32:49 +01:00
Roopesh Chander 9dc6d68b80 macOS: Tunnel detail: Better alignment for bottom controls 2019-01-18 09:32:49 +01:00
Roopesh Chander 5c4b43bcaf 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.
2019-01-18 01:34:24 +05:30
Roopesh Chander a61a043537 macOS: Fix autolayout errors on Add Empty Tunnel 2019-01-17 14:20:09 +05:30
Roopesh Chander 1e25c4f554 macOS: Update copyright year 2019-01-17 14:08:11 +05:30
Roopesh Chander b345005645 macOS: Make sure app is active when showing the About dialog 2019-01-17 14:05:23 +05:30
Roopesh Chander 50f6ff311c macOS: Application: Fix comment 2019-01-17 14:03:59 +05:30
Roopesh Chander 19a738b509 macOS: Manage tunnels: Make keyboard shortcuts discoverable 2019-01-17 02:43:24 +05:30
Roopesh Chander 3e850963fc macOS: Manage tunnels: Keyboard shortcuts 2019-01-17 01:44:50 +05:30
Roopesh Chander 4c8c397fac macOS: Tunnel edit: Rename action handling methods 2019-01-17 01:28:57 +05:30
Roopesh Chander 8530ce1545 macOS: Tunnel detail: Rename action handling methods 2019-01-17 00:41:32 +05:30
Roopesh Chander e116365ea4 macOS: Tunnels list: Rename action handling methods 2019-01-17 00:38:44 +05:30
Roopesh Chander e7b40cf993 macOS: Support window management keyboard shortcuts 2019-01-16 18:01:59 +05:30
Jason A. Donenfeld fe1840b028 macOS: Networks should show allowedIPs and disappear when inactive 2019-01-15 22:35:30 +01:00
Roopesh Chander 670673cccc macOS: Use tunnelOverheadBytes for automatic MTU in macOS 2019-01-16 01:51:56 +05:30
Roopesh Chander b6d159ac96 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
2019-01-16 01:26:10 +05:30
Roopesh Chander 02814ba546 macOS: Add About dialog 2019-01-14 14:52:37 +05:30
Roopesh Chander e1d329707a macOS: Add app icon 2019-01-14 14:52:37 +05:30
Roopesh Chander 93b9b0442b macOS: Edit view: Auto hide editor scrollbars 2019-01-14 14:52:37 +05:30
Roopesh Chander ea053c2701 macOS: To set default size, change frame instead of min size 2019-01-14 14:52:37 +05:30
Roopesh Chander bec0cb1e75 macOS: Fix editor scrolling 2019-01-14 14:52:37 +05:30
Eric Kuck 1c3cf52c7d Default view controller sizes 2019-01-14 14:52:36 +05:30
Jason A. Donenfeld 40cabd6e66 ConfTextView: enable undo and disable junk
Double space stil makes a period, unfortunately.
2019-01-14 14:52:36 +05:30
Eric Kuck ab48f7bed8 Cut/copy/paste now work 2019-01-14 14:52:36 +05:30
Jason A. Donenfeld 171989ec56 Resync highlighter 2019-01-14 14:52:36 +05:30