Commit Graph

1309 Commits

Author SHA1 Message Date
Alessio Nossa 7abdf6eaf2 Fix return value of AppIntents in iOS 17
Signed-off-by: Alessio Nossa <alessio.nossa@gmail.com>
2024-02-28 00:36:17 +01:00
Alessio Nossa 97bf1c1309 WireguardApp: macOS: Add App Intents to macOS app
Signed-off-by: Alessio Nossa <alessio.nossa@gmail.com>
2023-04-12 00:44:03 +02:00
Alessio Nossa ee035362ec Implement UpdateTunnelConfiguration App Intent
Signed-off-by: Alessio Nossa <alessio.nossa@gmail.com>
2023-04-12 00:44:02 +02:00
Alessio Nossa e13bc40f88 Implement BuildPeerConfigurationUpdate App Intent
Signed-off-by: Alessio Nossa <alessio.nossa@gmail.com>
2023-04-12 00:44:02 +02:00
Alessio Nossa eec11c1eef Remove UpdateConfiguration Intent with Dictionary input
Signed-off-by: Alessio Nossa <alessio.nossa@gmail.com>
2023-04-12 00:44:02 +02:00
Alessio Nossa ba250fe1a5 Implement UpdateConfiguration AppIntent with Dictionary as input
Signed-off-by: Alessio Nossa <alessio.nossa@gmail.com>
2023-04-12 00:44:02 +02:00
Alessio Nossa 1cb06536f1 WireguardApp: Add async variant of modify tunnel function
Signed-off-by: Alessio Nossa <alessio.nossa@gmail.com>
2023-04-12 00:44:02 +02:00
Alessio Nossa a0a6f26846 WireguardApp: iOS: Cleanup after SiriKit Intents removal
Signed-off-by: Alessio Nossa <alessio.nossa@gmail.com>
2023-04-12 00:44:01 +02:00
Alessio Nossa c1d7199f85 Remove WireGuardIntentsExtension
Signed-off-by: Alessio Nossa <alessio.nossa@gmail.com>
2023-04-12 00:09:21 +02:00
Alessio Nossa d05a1693e2 Removed UpdateConfigurationIntent SiriKit Intent
Signed-off-by: Alessio Nossa <alessio.nossa@gmail.com>
2023-04-12 00:09:21 +02:00
Alessio Nossa bee5d346b1 Implement GetPeers AppIntent
Signed-off-by: Alessio Nossa <alessio.nossa@gmail.com>
2023-04-12 00:09:21 +02:00
Alessio Nossa 2952206138 Remove GetPeers SiriKit Intent
Signed-off-by: Alessio Nossa <alessio.nossa@gmail.com>
2023-04-05 13:42:56 +02:00
Alessio Nossa 7ec6974005 Complete cleanup after SetTunnelStatus Intent removal
Signed-off-by: Alessio Nossa <alessio.nossa@gmail.com>
2023-04-01 16:12:32 +02:00
Alessio Nossa 63c09565f2 Removed SetTunnelStatus
Signed-off-by: Alessio Nossa <alessio.nossa@gmail.com>
2023-04-01 16:00:24 +02:00
Alessio Nossa c29787f898 WireguardApp: iOS: Added Siri shortcuts donations for SetTunnelStatus intent
Signed-off-by: Alessio Nossa <alessio.nossa@gmail.com>
2022-02-01 20:14:21 +01:00
Alessio Nossa bb6ea1b2f3 Implemented SetTunnelStatus intent
Signed-off-by: Alessio Nossa <alessio.nossa@gmail.com>
2022-02-01 20:14:02 +01:00
Alessio Nossa fe3f2d089b Implemented UpdateConfiguration intent
Signed-off-by: Alessio Nossa <alessio.nossa@gmail.com>
2022-02-01 20:13:38 +01:00
Alessio Nossa ceabb4ea34 WireguardApp: iOS: Moved tunnelsManager initialization to AppDelegate
Signed-off-by: Alessio Nossa <alessio.nossa@gmail.com>
2022-02-01 20:13:13 +01:00
Alessio Nossa ab1e96fcdc Implemented GetPeers intent
Signed-off-by: Alessio Nossa <alessio.nossa@gmail.com>
2022-02-01 20:12:47 +01:00
Alessio Nossa 0dd0672844 project: Added sources to WireGuardIntentsExtensioniOS
Signed-off-by: Alessio Nossa <alessio.nossa@gmail.com>
2022-02-01 20:12:15 +01:00
Alessio Nossa 3c63c386b9 project: Added WireGuardIntentsExtensioniOS target and Siri capability
Signed-off-by: Alessio Nossa <alessio.nossa@gmail.com>
2022-02-01 20:11:33 +01:00
Alessio Nossa a0fe44d214 Automatic configuration files changes by Xcode
Signed-off-by: Alessio Nossa <alessio.nossa@gmail.com>
2022-02-01 20:10:59 +01:00
Roopesh Chander 23618f994f UI: When saving on-demand rules, deactivate if reqd and then save
Signed-off-by: Roopesh Chander <roop@roopc.net>
2021-09-28 00:16:35 +05:30
Roopesh Chander ba644415c7 UI: When saving on-demand rules on a config, enable on-demand if active
When a user saves on-demand rules on the configuration, set
onDemandEnabled to true if the tunnel is active, and false if it isn't.
Then deactivate the tunnel.

Signed-off-by: Roopesh Chander <roop@roopc.net>
2021-09-24 01:01:10 +05:30
Jason A. Donenfeld 10da5cfdef App: version bump
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
1.0.15-26
2021-09-23 06:20:28 +02:00
Jason A. Donenfeld 75b6925deb UI: macOS: increase login detector file timeout
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-09-23 06:19:48 +02:00
Jason A. Donenfeld 03a59ff38e Model: migrate iOS 14 keychain references to iOS 15 format
Keychain references used to be bijective, but with the change in format,
Apple tried to be too clever, and references are no longer bijective.
This lead to us deleting keychain entries, which in turn emptied out
people's configs upon upgrading to iOS 15. Disaster!

Fix this by detecting the change in format and saving the new password
reference. We still rely on this being bijective moving forward;
hopefully this bug won't repeat itself. It would be nice to not rely on
that property, but doing so without grinding startup to a halt isn't
obviously done, given how slow the keychain accesses are and how limited
the API is.

Reported-by: Eddie <stunnel@attglobal.net>
Reported-by: Anatoli <me@anatoli.ws>
Reported-by: Alan Graham <alan@meshify.app>
Reported-by: Jacob Wilder <oss@jacobwilder.org>
Reported-by: Miguel Arroz <miguel.arroz@gmail.com>
Reported-by: Reid Rankin <reidrankin@gmail.com>
Reported-by: Fabien <patate.cosmique@pm.me>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-09-23 06:11:19 +02:00
Jason A. Donenfeld abf506c1fe UI: iOS: remove list pinking when no config
This reverts commit 86afd1a46a.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-09-23 06:08:53 +02:00
Jason A. Donenfeld dfb685f258 WireGuardApp: restore old keychain consistency behavior
This reverts commit adcbd17ebe.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-09-23 05:40:10 +02:00
Jason A. Donenfeld f3798d0e11 App: version bump
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
1.0.14-25
2021-09-22 20:59:19 +02:00
Jason A. Donenfeld 86afd1a46a UI: iOS: disable list rows when no config
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-09-22 20:56:25 +02:00
Jason A. Donenfeld 7171df84fa WireGuardApp: use file to communicate launch-by-login-helper
Apple event params are broken on recent macOS versions.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-09-22 19:22:44 +02:00
Jason A. Donenfeld d882a486a9 Keychain: remove class constraint when copying
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-09-22 16:51:25 +02:00
Jason A. Donenfeld adcbd17ebe WireGuardApp: do not delete unverifying profiles ever
The Keychain code is much too fragile, and it's better to err on the
safe side. Instead just log an error when this happens.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-09-22 07:13:48 +02:00
Jason A. Donenfeld 3d8de22b96 WireGuardKitGo: bump wireguard-go version
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-09-22 06:58:14 +02:00
Roopesh Chander ba4d1e7b21 MacAppStoreUpdateDetector: Detect StoreAEService correctly
In macOS 10.15 and macOS 11, the quit Apple event is sent by:
  com.apple.AppStoreDaemon.StoreAEService

In some earlier macOS release, the quit Apple event was sent by:
  com.apple.CommerceKit.StoreAEService

Signed-off-by: Roopesh Chander <roop@roopc.net>
2021-09-22 06:58:14 +02:00
Roopesh Chander f5a14b8434 MacAppStoreUpdateDetector: Add pid to the log
Signed-off-by: Roopesh Chander <roop@roopc.net>
2021-09-22 06:58:14 +02:00
Jason A. Donenfeld b74eb7239a WireGuardKitGo: include new homebrew location in PATH
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-09-22 06:58:14 +02:00
Roopesh Chander a8226b35d2 build: Fix swiftlint warnings
Signed-off-by: Roopesh Chander <roop@roopc.net>
2021-09-22 06:58:14 +02:00
Roopesh Chander 73c708d902 build: Fix swift warnings
Use 'AnyObject' instead of 'class' to restrict protocol inheritance

Signed-off-by: Roopesh Chander <roop@roopc.net>
2021-09-22 06:58:14 +02:00
Roopesh Chander 3668f3af9f build: Include 'swiftlint' location in the PATH before invoking it
In macOS 11, HomeBrew installs swiftlint under /opt/homebrew, which is not
in the default path that Xcode seems to use. So we include the PATH
to contain:

  - /usr/local/bin:

    Where HomeBrew installs 'swiftlint' in macOS 10.15 and earlier

  - /opt/homebrew/bin:

    Where HomeBrew installs 'swiftlint' in macOS 11

Signed-off-by: Roopesh Chander <roop@roopc.net>
2021-09-22 06:58:14 +02:00
Jason A. Donenfeld 54697a3240 UI: Use 'On-Demand', with hyphen, consistently
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-09-22 06:58:14 +02:00
Jason A. Donenfeld 3428bfbc9e UI: macOS: do on-demand ritual for clicking list item too
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-09-22 02:40:49 +02:00
Roopesh Chander cfd1b16801 UI: Consider on-demand to be enabled iff the tunnel provider is enabled
Signed-off-by: Roopesh Chander <roop@roopc.net>
2021-08-03 16:35:18 +05:30
Roopesh Chander ca70fe9ddc UI: When setting on-demand, avoid a second saveToPreferences() call
Signed-off-by: Roopesh Chander <roop@roopc.net>
2021-08-03 16:34:57 +05:30
Roopesh Chander 55c587b443 UI: When saving on-demand rules, don't set isOnDemandEnabled
When adding or modifying a config, when on-demand options are set by a
user, the rules are saved, but isOnDemandEnabled is left unset (and can
be set by the appropriate control in the detail view (switch in iOS /
button in macOS)).

Signed-off-by: Roopesh Chander <roop@roopc.net>
2021-08-02 23:25:53 +05:30
Roopesh Chander b6831c1aca UI: macOS: Incorporate on-demand-ness in status menu
Signed-off-by: Roopesh Chander <roop@roopc.net>
2021-07-30 13:29:38 +05:30
Roopesh Chander 2ac17da7cb UI: macOS: Tunnel detail: Incorporate on-demand-ness in toggle button
Signed-off-by: Roopesh Chander <roop@roopc.net>
2021-07-30 13:29:33 +05:30
Roopesh Chander 274c4cd092 UI: macOS: Tunnel detail: Incorporate on-demand-ness in the status row
Signed-off-by: Roopesh Chander <roop@roopc.net>
2021-07-30 13:29:28 +05:30
Roopesh Chander 95e1409bfb UI: macOS: Tunnel list: Incorporate on-demand-ness in the status circle
Signed-off-by: Roopesh Chander <roop@roopc.net>
2021-07-30 13:29:25 +05:30