Commit Graph

984 Commits

Author SHA1 Message Date
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
Jason A. Donenfeld fbe101eabb macOS: Privacy notice is provided by system dialogs
So it really doesn't make sense to add our own. This causes several
popups when trying to add a tunnel, which is madness.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-03-20 04:24:23 +01:00
Jason A. Donenfeld cda3170970 macOS: Login item: Add a simple login item
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-03-19 21:15:38 -06:00
Jason A. Donenfeld a5e7c3906b Version bump
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-03-19 21:25:38 +01:00
Roopesh Chander 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 7a3f65fd2f macOS: Add 'Deactivate' status menu item
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-03-19 21:23:46 +01:00
Jason A. Donenfeld dca0fb29f6 Version: CFBundleVersion must always increase for macOS app store
So we'll just start doing it like that, then.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-03-19 06:00:40 +01:00
Jason A. Donenfeld af9c800af8 Swiftlint: variable_name -> identifier_name
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-03-18 22:26:13 -06:00
Jason A. Donenfeld a9b925c69b Version bump
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-03-18 22:13:27 -06:00
Jason A. Donenfeld f93f9d62f4 macos: TunnelsList: set allowsEmptySelection after making initial selection
Otherwise we never get the event that the selection changed, so we don't
wind up showing anything in the details pane.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-03-18 22:13:27 -06:00
Roopesh Chander 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 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 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
Jason A. Donenfeld 51822f722a ringlogger: document races
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-03-18 12:50:00 -06:00
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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 7a450089c0 on-demand: Introducing ActivateOnDemandViewModel
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-03-18 06:46:55 +01:00
Roopesh Chander 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 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 9795b0609a macOS: Localize tooltips
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-03-18 06:46:55 +01:00
Roopesh Chander 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 f81275812c macOS: Nullify observationToken on prepareForReuse()
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-03-18 06:46:55 +01:00
Jason A. Donenfeld b2b5e0e379 TunnelName: sort correctly with numbers and capitals
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-03-18 06:46:55 +01:00
Jason A. Donenfeld a6f80135ef ringlogger: support mpsc for singlefile
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-03-17 08:51:27 +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
Jason A. Donenfeld f6c70500a7 wg-quick parser: trim \r as well
The influx of Windows users has already begun to infect our nice
project.

Reported-by: Cosku Bas <cosku.bas@gmail.com>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-03-11 14:05:16 -06:00
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
Jason A. Donenfeld c195760b15 macOS: Specify crypto compliance
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-02-19 16:12:33 +01:00
Roopesh Chander ba3f0db92c TunnelViewModel: Remove DNS from AllowedIPs when unchecking 'Exclude private IPs'
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-02-16 19:57:31 +05:30
Roopesh Chander 5031a7db4c macOS: Exclude private IPs
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-02-16 18:25:17 +05:30
Roopesh Chander a355232e09 TunnelViewModel: Minor refactoring of exclude private IPs handling
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-02-16 17:35:33 +05:30
Jason A. Donenfeld 6f7214ff38 ConfTextStorage: lowercase only once
Also fix submodule regression.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-02-16 17:18:10 +05:30
Roopesh Chander 4c88f477a2 ConfTextStorage: Let's keep the AllowedIPs and DNS servers as strings
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-02-16 01:20:11 +05:30
Roopesh Chander 2fb9d6af71 ConfTextStorage: Make fieldType an enum
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-02-16 00:26:49 +05:30
Jason A. Donenfeld 38ac66071c ConfTextStorage: keep track of single peer state for exclude private IPs
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-02-15 19:44:06 +01:00
Roopesh Chander 910fdfc321 macOS: Tunnel detail: Set min width/height
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-02-15 15:44:11 +05:30
Roopesh Chander c38a88988b macOS: Tunnels list: Use constant width for the table view
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-02-15 15:40:12 +05:30
Jason A. Donenfeld fcca2d4fec 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.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-02-15 01:14:14 +01:00
Jason A. Donenfeld 58181a4d40 Version bump
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-02-14 23:07:06 +01:00
Roopesh Chander 4547e01283 Preshared key field in the detail view should just say 'enabled'
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-02-12 19:30:59 +05:30
Roopesh Chander 5792db22a6 Log migration of tunnel configuration
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-02-12 19:17:32 +05:30
Roopesh Chander 6331b81b5d Migrate when we notice a new tunnel in reload()
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-02-12 17:43:40 +05:30
Roopesh Chander 77f929789c 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.

Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-02-12 17:37:27 +05:30
Roopesh Chander b5b72b309f Info.plist: Localize with InfoPlist.strings
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-02-11 16:08:55 +05:30
Roopesh Chander 966fa7909b macOS: Change keyboard shortcut for importing to Cmd+O
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-02-10 17:55:50 +05:30
Roopesh Chander 115059f2bb macOS: Adapt to the new applyConfiguration API
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-02-10 03:35:24 +05:30
Roopesh Chander e53c2d4d17 iOS: Rewrite applying runtime configuration
To make scrolling smoother while the fields are modified

Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-02-10 03:35:24 +05:30
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