Roopesh Chander
6d8965e97d
macOS: Remove custom key event handling
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-05-20 16:42:27 +05:30
Roopesh Chander
5e5481b69b
macOS: Show app in dock when showing the manage tunnels window
...
This way, the app can participate in Cmd+Tab
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-05-20 16:42:27 +05:30
Roopesh Chander
69b33c0fad
macOS: Edit view: Save on Cmd+S
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-05-12 15:45:26 +05:30
Roopesh Chander
167e4f0bf2
macOS: Edit view: Dismiss on Esc
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-05-12 13:23:52 +05:30
Roopesh Chander
6e3b28852a
macOS: Log view: Dismiss on Esc
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-05-12 13:21:42 +05:30
Roopesh Chander
5914e868ab
iOS: Log view: Improve the look
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-04-28 14:29:22 +05:30
Roopesh Chander
76894fba68
Xcode: Use dwarf for debug and dwarf-with-dsym for release
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-04-21 18:22:31 +05:30
Roopesh Chander
89a564ce62
Swift 5 migration: Make use of Result type
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-04-21 17:51:42 +05:30
Roopesh Chander
178fe86d36
macOS: Detect when updating from the App Store
...
And show an alert when tunnels are active during updation -- that
might cause the update to not work correctly.
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-04-21 15:43:10 +05:30
Roopesh Chander
98ebd55208
Log view: Don't use a global array to store log entries
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-04-10 17:57:36 +05:30
Roopesh Chander
83d0d34411
macOS: Log view: Stop updating the log once the log view is dismissed
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-04-10 15:42:39 +05:30
Roopesh Chander
cef3957875
Swift 5 migration: Handle changes in Data's pointer interface
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-04-09 11:25:04 +05:30
Roopesh Chander
d9e88c51bd
Swift 5 migration: Fix switch warnings
...
We now get a warning when switching over enums from system
frameworks even when we handle all public cases because
there can be future cases that aren't handled.
When such a future case is introduced, we'll get a warning.
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-04-09 11:25:04 +05:30
Roopesh Chander
90eb45e287
Xcode: Move to Swift 5.0
...
No code changes were necessary
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-04-07 16:42:36 +05:30
Roopesh Chander
9f3d86723a
macOS: Minor fix to export panel texts
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-04-06 17:59:42 +05:30
Roopesh Chander
11063d0f88
macOS: Tunnels list: Suppress alert buttons when removing tunnels is in progress
...
Also refactor the deletion alert into a separate helper class
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-04-06 17:53:41 +05:30
Roopesh Chander
557ee4390b
TunnelsManager: When setting a config, also set isAvailable cache
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-04-06 00:26:06 +05:30
Roopesh Chander
9ce42d152d
macOS: Tunnels list: Show the confirmation alert till removal completes
...
Fix tunnel selection during deletion
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-04-06 00:08:45 +05:30
Roopesh Chander
4c1b2e1258
TunnelsManager: Fix comparing tunnels with tunnelProviders in reload()
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-04-05 13:43:08 +05:30
Roopesh Chander
3bd611aa7c
TunnelsManager: Cache isTunnelConfigurationAvailableInKeychain
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-04-05 13:29:17 +05:30
Roopesh Chander
adbe0b065e
macOS: Attempt to remove keychain item only if verified
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-04-04 15:29:25 +05:30
Roopesh Chander
6015661beb
macOS: Simplify reusing of the detail VC when applicable
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-04-04 12:24:32 +05:30
Roopesh Chander
6e6a6b88fb
macOS: Hide other-user tunnels in the status menu
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-04-03 19:18:53 +05:30
Roopesh Chander
9690365dd4
macOS: Better handling of tunnels created by another user
...
Previously, the tunnels just got deleted.
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-04-03 19:04:12 +05:30
Roopesh Chander
0299c3929e
iOS: Log view: Make log text selectable
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-04-01 23:29:15 +05:30
Roopesh Chander
0043233872
macOS: Log view: Fix autoscroll to end of log
...
Looks like the tableview doesn't know how much to scroll to get to the
end when we use usesAutomaticRowHeights. So we wait for the tableview
to realize its frame has changed and then scroll to the bottom of the
frame explicitly.
Also, we keep track of whether the scroll view is scrolled to the end or
not every time scrolling happens, not just when we add log entries to
the table.
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-04-01 23:07:48 +05:30
Roopesh Chander
a74dd24578
macOS: Bring app to front before 'exiting with an active tunnel' alert
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-03-29 00:17:37 +05:30
Roopesh Chander
dd9506ecee
macOS: If a sheet is being shown, ignore quit and bring window to front
...
Otherwise, the 'exiting with an active tunnel' alert could get queued up
to be shown after the current sheet is dismissed.
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-03-29 00:17:37 +05:30
Roopesh Chander
f83f159f97
macOS: Log view: No need to disable Close button
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-03-28 19:32:58 +05:30
Roopesh Chander
6175de0438
iOS: Ability to view the log
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-03-28 19:28:27 +05:30
Roopesh Chander
bd61be52e6
iOS: Xcode: Minor project rearrangement
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-03-28 14:10:42 +05:30
Roopesh Chander
909f88be70
macOS: Ability to view the log
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-03-28 13:57:06 +05:30
Roopesh Chander
b7c3bd0d8c
Add LogViewHelper
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-03-27 17:55:52 +05:30
Roopesh Chander
4237ab4a6f
macOS: Syntax highlighter: Free spans array
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-03-22 17:53:34 +05:30
Roopesh Chander
0fcaf6debb
macOS: Hide exclude private IPs when PrivateKey / PublicKey is missing
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-03-22 16:00:45 +05:30
Roopesh Chander
dbd5ea1ff0
macOS: Syntax highlighter: Swift can bridge c strings automatically
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-03-22 15:31:02 +05:30
Roopesh Chander
9afe230c10
macOS: On Add new, Exclude Private IPs should remain hidden
...
because there aren't any peers in the bootstrapped config.
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-03-22 15:15:26 +05:30
Roopesh Chander
4bdfbb518e
Xcode: iOS: Remove armv7 as 'Required device capabilities'
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-03-20 14:23:56 +05:30
Roopesh Chander and Jason A. Donenfeld
5f8843e247
iOS: Delete confirmation prompt should be a question
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-03-19 21:23:46 +01:00
Roopesh Chander and Jason A. Donenfeld
7a3f65fd2f
macOS: Add 'Deactivate' status menu item
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-03-19 21:23:46 +01:00
Roopesh Chander and Jason A. Donenfeld
fc163fc9ff
iOS: Consolidate all showConfirmationAlert()s into one place
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-03-18 14:54:05 -06:00
Roopesh Chander and Jason A. Donenfeld
adc5a7cac2
iOS: Tunnels list: Ability to remove multiple tunnels at a time
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-03-18 14:54:05 -06:00
Roopesh Chander and Jason A. Donenfeld
0dd22ca45a
iOS: Tunnel edit: Add missing enum values
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-03-18 14:54:05 -06:00
Roopesh Chander
bca9fead5e
macOS: ButtonedDetailViewController: Set min dimensions
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-03-19 01:28:52 +05:30
Roopesh Chander
121d223229
macOS: Tunnels list: Double-click to activate / deactivate
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-03-18 12:03:41 +05:30
Roopesh Chander
439fb6bbac
macOS: Tunnels list: Don't allow empty selection
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-03-18 12:03:41 +05:30
Roopesh Chander and Jason A. Donenfeld
9c8231dcf7
on-demand: macOS: Remove unused class ControlRow
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-03-18 06:46:56 +01:00
Roopesh Chander and Jason A. Donenfeld
0440c4a33a
on-demand: macOS: Integrate Ethernet and Wi-Fi controls in one row
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-03-18 06:46:56 +01:00
Roopesh Chander and Jason A. Donenfeld
01be43aa7a
on-demand: View model should account for isActivateOnDemandEnabled
...
This is needed to correctly handle NETunnelProviderManager's
isOnDemandEnabled property getting changed outside of the app.
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-03-18 06:46:56 +01:00
Roopesh Chander and Jason A. Donenfeld
e29c6900e5
on-demand: macOS: Disable SSIDs field when adding a tunnel
...
It shouldn't be editable when the VPN prompt is shown.
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-03-18 06:46:56 +01:00
Roopesh Chander and Jason A. Donenfeld
a334c25aff
on-demand: iOS: Disable selection in SSID detail table view
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-03-18 06:46:56 +01:00
Roopesh Chander and Jason A. Donenfeld
f56b2ad968
on-demand: macOS: Remove unused class PopupRow
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-03-18 06:46:56 +01:00
Roopesh Chander and Jason A. Donenfeld
503ac6c8a2
on-demand: macOS: Auto-complete SSIDs based on currently connected SSID
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-03-18 06:46:56 +01:00
Roopesh Chander and Jason A. Donenfeld
5f30e021ef
on-demand: iOS: Change wording for add-SSIDs rows
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-03-18 06:46:56 +01:00
Roopesh Chander and Jason A. Donenfeld
d748382fce
on-demand: "Only selected SSIDs" -> "Only these SSIDs"
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-03-18 06:46:56 +01:00
Roopesh Chander and Jason A. Donenfeld
63299a2752
on-demand: macOS: Tunnel detail: List SSIDs
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-03-18 06:46:55 +01:00
Roopesh Chander and Jason A. Donenfeld
b7f8f74b56
on-demand: iOS: Only n SSIDs / Except m SSIDs
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-03-18 06:46:55 +01:00
Roopesh Chander and Jason A. Donenfeld
8e5a9215de
on-demand: iOS: Show list of SSIDs in a separate screen
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-03-18 06:46:55 +01:00
Roopesh Chander and Jason A. Donenfeld
64925cab89
on-demand: iOS: SSIDs view: Always show the selected SSIDs section
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-03-18 06:46:55 +01:00
Roopesh Chander and Jason A. Donenfeld
062b4d4b16
on-demand: Remove ActivateOnDemandSetting type
...
The ActivateOnDemandOption type shall be used instead
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-03-18 06:46:55 +01:00
Roopesh Chander and Jason A. Donenfeld
d9bdc61fb9
on-demand: TunnelViewModel: Remove unused on-demand-related methods
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-03-18 06:46:55 +01:00
Roopesh Chander and Jason A. Donenfeld
0ae8d25134
on-demand: macOS: Tunnel detail: Show SSID info
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-03-18 06:46:55 +01:00
Roopesh Chander and Jason A. Donenfeld
574d8433b3
on-demand: iOS: Update on-demand info shown in tunnel edit view
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-03-18 06:46:55 +01:00
Roopesh Chander and Jason A. Donenfeld
bd339e2876
on-demand: ActivateOnDemandViewModel: Uniquify SSIDs list
...
And if SSIDs list is empty, fall back to .anySSID option
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-03-18 06:46:55 +01:00
Roopesh Chander and Jason A. Donenfeld
fff75adfe1
on-demand: macOS: Support SSIDs in on demand activation
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-03-18 06:46:55 +01:00
Roopesh Chander and Jason A. Donenfeld
01604dd8d1
on-demand: iOS: Tunnel detail: Show SSID info
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-03-18 06:46:55 +01:00
Roopesh Chander and Jason A. Donenfeld
bdeb89a9e5
on-demand: iOS: Add ability to add current SSID
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-03-18 06:46:55 +01:00
Roopesh Chander and Jason A. Donenfeld
36dc252512
on-demand: iOS: Xcode: Add ability to access current SSID
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-03-18 06:46:55 +01:00
Roopesh Chander and Jason A. Donenfeld
5941bf181c
on-demand: iOS: Support for SSIDs
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-03-18 06:46:55 +01:00
Roopesh Chander and Jason A. Donenfeld
7a450089c0
on-demand: Introducing ActivateOnDemandViewModel
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-03-18 06:46:55 +01:00
Roopesh Chander and Jason A. Donenfeld
5d757982ba
on-demand: Infrastructure for supporting SSID-based rules
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-03-18 06:46:55 +01:00
Roopesh Chander and Jason A. Donenfeld
3767a12983
on-demand: Simplify OS-specific code for interface type selection
...
Previously, the enum values themselves were different for iOS and macOS.
With this commit, the enum values are common, and only how they're handled
is specific to iOS and macOS.
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-03-18 06:46:55 +01:00
Roopesh Chander and Jason A. Donenfeld
9795b0609a
macOS: Localize tooltips
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-03-18 06:46:55 +01:00
Roopesh Chander and Jason A. Donenfeld
0f98312d15
macOS: Tunnel detail: Make the Activate button part of the list view
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-03-18 06:46:55 +01:00
Roopesh Chander and Jason A. Donenfeld
f81275812c
macOS: Nullify observationToken on prepareForReuse()
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-03-18 06:46:55 +01:00
Roopesh Chander
e23c221aff
macOS: Tunnel detail: Activate / Deactivate is now a button
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-03-17 02:27:46 +05:30
Roopesh Chander
50bc994762
macOS: Tunnel detail: Show the status in the list view
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-03-17 02:27:46 +05:30
Roopesh Chander
3e05da4486
macOS: KeyValueImageRow class
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-03-17 02:27:46 +05:30
Roopesh Chander
663923864c
TunnelsManager: Don't restart if only on-demand setting has changed
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-03-11 13:20:21 +05:30
Roopesh Chander
9250780ffc
macOS: Ability to remove multiple tunnels at a time
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-03-10 20:02:19 +05:30
Roopesh Chander
9bc17034dd
TunnelsManager: Support for removing multiple tunnels at a time
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-03-10 19:43:27 +05:30
Roopesh Chander
db6f0729c6
macOS: Generalize NoTunnelsDetailVC into a ButtonedDetailVC
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-03-10 19:22:33 +05:30
Roopesh Chander
fe4f8b666d
Importing: Only the main thread shall access lastFileImportErrorText
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-03-05 16:11:57 +05:30
Roopesh Chander
90c0f7e92e
Importing: Make use of lastError returned from TunnelsManager.addMultiple()
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-03-05 16:11:41 +05:30
Roopesh Chander
3afcee04be
TunnelsManager: addMultiple() should also return the last error
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-03-05 15:29:28 +05:30
Roopesh Chander
202e7a4890
Importing: Simplify TunnelImporter
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-03-04 14:13:49 +05:30
Roopesh Chander
a389bd93cb
Importing: macOS: Support importing of multiple files at a time
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-02-25 18:43:20 +05:30
Roopesh Chander
b2a2110d8c
Importing: Use case-insensitive comparison for zip extension
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-02-25 16:21:29 +05:30
Roopesh Chander
5ed28907ec
iOS: Hack to restart active tunnel after adding a new tunnel
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-02-24 19:30:14 +05:30
Roopesh Chander
ab6d714070
Importing: Show OS error when unable to open a .conf file
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-02-24 16:50:57 +05:30
Roopesh Chander
d3df8734c2
macOS: Tunnel edit: Disable user interaction when OS VPN prompt is shown
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-02-24 16:06:37 +05:30
Roopesh Chander
ea5996abe0
macOS: Tunnel edit: s/populateTextFields()/populateFields()/g;
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-02-24 15:14:35 +05:30
Roopesh Chander
ce405f856e
macOS: When programmatically selecting a tunnel, also scroll if required
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-02-22 18:18:53 +05:30
Roopesh Chander
98a967acc8
macOS: Replace NSSegmentedControl with NSPopUpButton and NSButton
...
Thereby avoiding the hacky way of showing the menus.
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-02-22 17:59:41 +05:30
Roopesh Chander
b01d09dfb5
Importing: Give a clearer error message on importing an invalid config
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-02-22 13:03:53 +05:30
Roopesh Chander
7a580e8941
macOS: Show 'quitting with active tunnel' only when appropriate
...
Not when logging off or when the machine's shutting down
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-02-22 13:03:53 +05:30
Roopesh Chander
39fb52a2e3
macOS: Fix removal of DNSes from AllowedIPs when DNS has changed
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-02-21 18:17:28 +05:30
Roopesh Chander
69a064d954
iOS: On changing DNS, update AllowedIPs with the current DNS servers
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-02-21 17:57:13 +05:30
Roopesh Chander
eb684ef711
macOS: On saving, update AllowedIPs with the current DNS servers
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-02-21 17:57:13 +05:30
Roopesh Chander
b0eff424f9
Importing: Better error message when .conf file is not readable
...
Signed-off-by: Roopesh Chander <roop@roopc.net >
2019-02-21 17:57:13 +05:30