]> git.ipfire.org Git - thirdparty/wireguard-apple.git/log
thirdparty/wireguard-apple.git
17 months agoMerge branch 'master' into an/shortcuts-integration an/shortcuts-integration
Alessio Nossa [Wed, 28 Feb 2024 09:28:12 +0000 (10:28 +0100)] 
Merge branch 'master' into an/shortcuts-integration

17 months agoRemove backward compatibility of GetPeers with SiriKit version
Alessio Nossa [Tue, 27 Feb 2024 23:26:10 +0000 (00:26 +0100)] 
Remove backward compatibility of GetPeers with SiriKit version

Signed-off-by: Alessio Nossa <alessio.nossa@gmail.com>
17 months agoAdd backwards compatibility of GetPeers wit SiriKit version
Alessio Nossa [Tue, 27 Feb 2024 23:24:09 +0000 (00:24 +0100)] 
Add backwards compatibility of GetPeers wit SiriKit version

Signed-off-by: Alessio Nossa <alessio.nossa@gmail.com>
17 months agoUpdate AppIntents Strings
Alessio Nossa [Tue, 27 Feb 2024 23:20:56 +0000 (00:20 +0100)] 
Update AppIntents Strings

Signed-off-by: Alessio Nossa <alessio.nossa@gmail.com>
17 months agoRename constant to satisfy SwiftLint
Alessio Nossa [Tue, 27 Feb 2024 23:19:52 +0000 (00:19 +0100)] 
Rename constant to satisfy SwiftLint

Signed-off-by: Alessio Nossa <alessio.nossa@gmail.com>
17 months agoRemove missing peers error in UpdateTunnelConfiguration Intent
Alessio Nossa [Tue, 27 Feb 2024 23:16:19 +0000 (00:16 +0100)] 
Remove missing peers error in UpdateTunnelConfiguration Intent

Signed-off-by: Alessio Nossa <alessio.nossa@gmail.com>
17 months agoFix return value of AppIntents in iOS 17
Alessio Nossa [Tue, 27 Feb 2024 23:12:14 +0000 (00:12 +0100)] 
Fix return value of AppIntents in iOS 17

Signed-off-by: Alessio Nossa <alessio.nossa@gmail.com>
2 years agoWireguardApp: macOS: Add App Intents to macOS app
Alessio Nossa [Tue, 11 Apr 2023 22:05:14 +0000 (00:05 +0200)] 
WireguardApp: macOS: Add App Intents to macOS app

Signed-off-by: Alessio Nossa <alessio.nossa@gmail.com>
2 years agoImplement UpdateTunnelConfiguration App Intent
Alessio Nossa [Tue, 11 Apr 2023 21:42:09 +0000 (23:42 +0200)] 
Implement UpdateTunnelConfiguration App Intent

Signed-off-by: Alessio Nossa <alessio.nossa@gmail.com>
2 years agoImplement BuildPeerConfigurationUpdate App Intent
Alessio Nossa [Tue, 11 Apr 2023 21:41:31 +0000 (23:41 +0200)] 
Implement BuildPeerConfigurationUpdate App Intent

Signed-off-by: Alessio Nossa <alessio.nossa@gmail.com>
2 years agoRemove UpdateConfiguration Intent with Dictionary input
Alessio Nossa [Tue, 11 Apr 2023 21:33:21 +0000 (23:33 +0200)] 
Remove UpdateConfiguration Intent with Dictionary input

Signed-off-by: Alessio Nossa <alessio.nossa@gmail.com>
2 years agoImplement UpdateConfiguration AppIntent with Dictionary as input
Alessio Nossa [Tue, 11 Apr 2023 16:26:32 +0000 (18:26 +0200)] 
Implement UpdateConfiguration AppIntent with Dictionary as input

Signed-off-by: Alessio Nossa <alessio.nossa@gmail.com>
2 years agoWireguardApp: Add async variant of modify tunnel function
Alessio Nossa [Tue, 11 Apr 2023 16:46:35 +0000 (18:46 +0200)] 
WireguardApp: Add async variant of modify tunnel function

Signed-off-by: Alessio Nossa <alessio.nossa@gmail.com>
2 years agoWireguardApp: iOS: Cleanup after SiriKit Intents removal
Alessio Nossa [Tue, 11 Apr 2023 22:20:02 +0000 (00:20 +0200)] 
WireguardApp: iOS: Cleanup after SiriKit Intents removal

Signed-off-by: Alessio Nossa <alessio.nossa@gmail.com>
2 years agoRemove WireGuardIntentsExtension
Alessio Nossa [Wed, 5 Apr 2023 13:48:46 +0000 (15:48 +0200)] 
Remove WireGuardIntentsExtension

Signed-off-by: Alessio Nossa <alessio.nossa@gmail.com>
2 years agoRemoved UpdateConfigurationIntent SiriKit Intent
Alessio Nossa [Wed, 5 Apr 2023 13:40:51 +0000 (15:40 +0200)] 
Removed UpdateConfigurationIntent SiriKit Intent

Signed-off-by: Alessio Nossa <alessio.nossa@gmail.com>
2 years agoImplement GetPeers AppIntent
Alessio Nossa [Tue, 11 Apr 2023 15:29:52 +0000 (17:29 +0200)] 
Implement GetPeers AppIntent

Signed-off-by: Alessio Nossa <alessio.nossa@gmail.com>
2 years agoRemove GetPeers SiriKit Intent
Alessio Nossa [Wed, 5 Apr 2023 11:30:40 +0000 (13:30 +0200)] 
Remove GetPeers SiriKit Intent

Signed-off-by: Alessio Nossa <alessio.nossa@gmail.com>
2 years agoComplete cleanup after SetTunnelStatus Intent removal
Alessio Nossa [Sat, 1 Apr 2023 14:12:32 +0000 (16:12 +0200)] 
Complete cleanup after SetTunnelStatus Intent removal

Signed-off-by: Alessio Nossa <alessio.nossa@gmail.com>
2 years agoRemoved SetTunnelStatus
Alessio Nossa [Sat, 1 Apr 2023 14:00:24 +0000 (16:00 +0200)] 
Removed SetTunnelStatus

Signed-off-by: Alessio Nossa <alessio.nossa@gmail.com>
2 years agoApp: version bump master 1.0.16-27
Jason A. Donenfeld [Wed, 15 Feb 2023 13:20:52 +0000 (14:20 +0100)] 
App: version bump

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2 years agoApp: bump copyright
Jason A. Donenfeld [Tue, 14 Feb 2023 15:10:32 +0000 (16:10 +0100)] 
App: bump copyright

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2 years agoApp: bump minimum OS versions
Jason A. Donenfeld [Tue, 14 Feb 2023 14:31:52 +0000 (15:31 +0100)] 
App: bump minimum OS versions

This allows us to remove a good deal of legacy cruft.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2 years agoWireGuardKitGo: bump
Jason A. Donenfeld [Tue, 14 Feb 2023 14:20:05 +0000 (15:20 +0100)] 
WireGuardKitGo: bump

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2 years agoWireGuardKit: fix incorrect IP address allocation size
John Biggs [Tue, 15 Nov 2022 19:50:15 +0000 (20:50 +0100)] 
WireGuardKit: fix incorrect IP address allocation size

According to [1], the `capacity` parameter is specified as "the number
of instances of T in the re-bound region" and not the total size of the
rebound struct.

Without this patch, there are crashes in the extension with the
following error:

  Fatal error: self must be a properly aligned pointer for types Pointee and T`

Since the subsequent line in the code only reads `sizeof(in_addr)` or
`sizeof(in6_addr)` anyway, change the `capacity` parameter to just be a
count of 1.

[1] https://developer.apple.com/documentation/swift/unsafepointer/withmemoryrebound(to:capacity:_:)

Signed-off-by: John Biggs <john.biggs@proton.ch>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2 years agoglobal: apply MIT more consistently
Jason A. Donenfeld [Thu, 17 Nov 2022 00:17:52 +0000 (01:17 +0100)] 
global: apply MIT more consistently

People keep asking.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
3 years agoWireguardApp: iOS: Added Siri shortcuts donations for SetTunnelStatus intent
Alessio Nossa [Tue, 1 Feb 2022 16:51:18 +0000 (17:51 +0100)] 
WireguardApp: iOS: Added Siri shortcuts donations for SetTunnelStatus intent

Signed-off-by: Alessio Nossa <alessio.nossa@gmail.com>
3 years agoImplemented SetTunnelStatus intent
Alessio Nossa [Tue, 1 Feb 2022 12:28:33 +0000 (13:28 +0100)] 
Implemented SetTunnelStatus intent

Signed-off-by: Alessio Nossa <alessio.nossa@gmail.com>
3 years agoImplemented UpdateConfiguration intent
Alessio Nossa [Tue, 1 Feb 2022 09:16:38 +0000 (10:16 +0100)] 
Implemented UpdateConfiguration intent

Signed-off-by: Alessio Nossa <alessio.nossa@gmail.com>
3 years agoWireguardApp: iOS: Moved tunnelsManager initialization to AppDelegate
Alessio Nossa [Sat, 29 Jan 2022 16:17:05 +0000 (17:17 +0100)] 
WireguardApp: iOS: Moved tunnelsManager initialization to AppDelegate

Signed-off-by: Alessio Nossa <alessio.nossa@gmail.com>
3 years agoImplemented GetPeers intent
Alessio Nossa [Sat, 29 Jan 2022 18:11:32 +0000 (19:11 +0100)] 
Implemented GetPeers intent

Signed-off-by: Alessio Nossa <alessio.nossa@gmail.com>
3 years agoproject: Added sources to WireGuardIntentsExtensioniOS
Alessio Nossa [Sat, 29 Jan 2022 16:06:18 +0000 (17:06 +0100)] 
project: Added sources to WireGuardIntentsExtensioniOS

Signed-off-by: Alessio Nossa <alessio.nossa@gmail.com>
3 years agoproject: Added WireGuardIntentsExtensioniOS target and Siri capability
Alessio Nossa [Fri, 28 Jan 2022 20:37:06 +0000 (21:37 +0100)] 
project: Added WireGuardIntentsExtensioniOS target and Siri capability

Signed-off-by: Alessio Nossa <alessio.nossa@gmail.com>
3 years agoAutomatic configuration files changes by Xcode
Alessio Nossa [Fri, 28 Jan 2022 16:20:29 +0000 (17:20 +0100)] 
Automatic configuration files changes by Xcode

Signed-off-by: Alessio Nossa <alessio.nossa@gmail.com>
3 years agoUI: When saving on-demand rules, deactivate if reqd and then save
Roopesh Chander [Mon, 27 Sep 2021 10:37:20 +0000 (16:07 +0530)] 
UI: When saving on-demand rules, deactivate if reqd and then save

Signed-off-by: Roopesh Chander <roop@roopc.net>
3 years agoUI: When saving on-demand rules on a config, enable on-demand if active
Roopesh Chander [Thu, 23 Sep 2021 19:11:46 +0000 (00:41 +0530)] 
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>
3 years agoApp: version bump 1.0.15-26
Jason A. Donenfeld [Thu, 23 Sep 2021 04:20:28 +0000 (06:20 +0200)] 
App: version bump

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
3 years agoUI: macOS: increase login detector file timeout
Jason A. Donenfeld [Thu, 23 Sep 2021 04:19:48 +0000 (06:19 +0200)] 
UI: macOS: increase login detector file timeout

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
3 years agoModel: migrate iOS 14 keychain references to iOS 15 format
Jason A. Donenfeld [Thu, 23 Sep 2021 04:00:14 +0000 (06:00 +0200)] 
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>
3 years agoUI: iOS: remove list pinking when no config
Jason A. Donenfeld [Thu, 23 Sep 2021 04:08:20 +0000 (06:08 +0200)] 
UI: iOS: remove list pinking when no config

This reverts commit 86afd1a46a83038a787176272a7c486b7269e1a3.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
3 years agoWireGuardApp: restore old keychain consistency behavior
Jason A. Donenfeld [Thu, 23 Sep 2021 03:39:47 +0000 (05:39 +0200)] 
WireGuardApp: restore old keychain consistency behavior

This reverts commit adcbd17ebeedaf6fa8106c8835ebf43667170878.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
3 years agoApp: version bump 1.0.14-25
Jason A. Donenfeld [Wed, 22 Sep 2021 18:59:19 +0000 (20:59 +0200)] 
App: version bump

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
3 years agoUI: iOS: disable list rows when no config
Jason A. Donenfeld [Wed, 22 Sep 2021 18:56:25 +0000 (20:56 +0200)] 
UI: iOS: disable list rows when no config

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
3 years agoWireGuardApp: use file to communicate launch-by-login-helper
Jason A. Donenfeld [Wed, 22 Sep 2021 17:22:44 +0000 (19:22 +0200)] 
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>
3 years agoKeychain: remove class constraint when copying
Jason A. Donenfeld [Wed, 22 Sep 2021 14:51:25 +0000 (16:51 +0200)] 
Keychain: remove class constraint when copying

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
3 years agoWireGuardApp: do not delete unverifying profiles ever
Jason A. Donenfeld [Wed, 22 Sep 2021 05:11:32 +0000 (07:11 +0200)] 
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>
3 years agoWireGuardKitGo: bump wireguard-go version
Jason A. Donenfeld [Wed, 22 Sep 2021 03:20:46 +0000 (05:20 +0200)] 
WireGuardKitGo: bump wireguard-go version

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
3 years agoMacAppStoreUpdateDetector: Detect StoreAEService correctly
Roopesh Chander [Thu, 22 Jul 2021 07:08:45 +0000 (12:38 +0530)] 
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>
3 years agoMacAppStoreUpdateDetector: Add pid to the log
Roopesh Chander [Thu, 22 Jul 2021 07:06:26 +0000 (12:36 +0530)] 
MacAppStoreUpdateDetector: Add pid to the log

Signed-off-by: Roopesh Chander <roop@roopc.net>
3 years agoWireGuardKitGo: include new homebrew location in PATH
Jason A. Donenfeld [Wed, 22 Sep 2021 03:06:10 +0000 (05:06 +0200)] 
WireGuardKitGo: include new homebrew location in PATH

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
3 years agobuild: Fix swiftlint warnings
Roopesh Chander [Mon, 2 Aug 2021 08:19:47 +0000 (13:49 +0530)] 
build: Fix swiftlint warnings

Signed-off-by: Roopesh Chander <roop@roopc.net>
3 years agobuild: Fix swift warnings
Roopesh Chander [Mon, 2 Aug 2021 08:16:06 +0000 (13:46 +0530)] 
build: Fix swift warnings

Use 'AnyObject' instead of 'class' to restrict protocol inheritance

Signed-off-by: Roopesh Chander <roop@roopc.net>
3 years agobuild: Include 'swiftlint' location in the PATH before invoking it
Roopesh Chander [Mon, 2 Aug 2021 08:11:52 +0000 (13:41 +0530)] 
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>
3 years agoUI: Use 'On-Demand', with hyphen, consistently
Jason A. Donenfeld [Wed, 22 Sep 2021 03:00:56 +0000 (05:00 +0200)] 
UI: Use 'On-Demand', with hyphen, consistently

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
3 years agoUI: macOS: do on-demand ritual for clicking list item too
Jason A. Donenfeld [Wed, 22 Sep 2021 00:40:49 +0000 (02:40 +0200)] 
UI: macOS: do on-demand ritual for clicking list item too

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
4 years agoUI: Consider on-demand to be enabled iff the tunnel provider is enabled
Roopesh Chander [Tue, 3 Aug 2021 11:05:18 +0000 (16:35 +0530)] 
UI: Consider on-demand to be enabled iff the tunnel provider is enabled

Signed-off-by: Roopesh Chander <roop@roopc.net>
4 years agoUI: When setting on-demand, avoid a second saveToPreferences() call
Roopesh Chander [Tue, 3 Aug 2021 11:03:59 +0000 (16:33 +0530)] 
UI: When setting on-demand, avoid a second saveToPreferences() call

Signed-off-by: Roopesh Chander <roop@roopc.net>
4 years agoUI: When saving on-demand rules, don't set isOnDemandEnabled
Roopesh Chander [Mon, 2 Aug 2021 17:39:06 +0000 (23:09 +0530)] 
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>
4 years agoUI: macOS: Incorporate on-demand-ness in status menu
Roopesh Chander [Fri, 30 Jul 2021 07:56:56 +0000 (13:26 +0530)] 
UI: macOS: Incorporate on-demand-ness in status menu

Signed-off-by: Roopesh Chander <roop@roopc.net>
4 years agoUI: macOS: Tunnel detail: Incorporate on-demand-ness in toggle button
Roopesh Chander [Fri, 30 Jul 2021 05:34:38 +0000 (11:04 +0530)] 
UI: macOS: Tunnel detail: Incorporate on-demand-ness in toggle button

Signed-off-by: Roopesh Chander <roop@roopc.net>
4 years agoUI: macOS: Tunnel detail: Incorporate on-demand-ness in the status row
Roopesh Chander [Thu, 29 Jul 2021 10:27:04 +0000 (15:57 +0530)] 
UI: macOS: Tunnel detail: Incorporate on-demand-ness in the status row

Signed-off-by: Roopesh Chander <roop@roopc.net>
4 years agoUI: macOS: Tunnel list: Incorporate on-demand-ness in the status circle
Roopesh Chander [Thu, 29 Jul 2021 05:42:30 +0000 (11:12 +0530)] 
UI: macOS: Tunnel list: Incorporate on-demand-ness in the status circle

Signed-off-by: Roopesh Chander <roop@roopc.net>
4 years agoUI: macOS: Add yellow circle image
Roopesh Chander [Wed, 28 Jul 2021 08:01:43 +0000 (13:31 +0530)] 
UI: macOS: Add yellow circle image

Signed-off-by: Roopesh Chander <roop@roopc.net>
4 years agoUI: Localizations: Remove alertTunnelActivationFailureOnDemandAddendum
Roopesh Chander [Wed, 28 Jul 2021 10:24:42 +0000 (15:54 +0530)] 
UI: Localizations: Remove alertTunnelActivationFailureOnDemandAddendum

It's not used anymore.

Signed-off-by: Roopesh Chander <roop@roopc.net>
4 years agoUI: Remove addendum on on-demand from error on tunnel activation
Roopesh Chander [Wed, 28 Jul 2021 06:21:23 +0000 (11:51 +0530)] 
UI: Remove addendum on on-demand from error on tunnel activation

Signed-off-by: Roopesh Chander <roop@roopc.net>
4 years agoUI: When setting on-demand, enable the tunnel if required
Roopesh Chander [Wed, 28 Jul 2021 05:59:34 +0000 (11:29 +0530)] 
UI: When setting on-demand, enable the tunnel if required

Signed-off-by: Roopesh Chander <roop@roopc.net>
4 years agoUI: iOS: Tunnels list: Move the "On Demand" label to the right
Roopesh Chander [Sat, 24 Jul 2021 18:03:26 +0000 (23:33 +0530)] 
UI: iOS: Tunnels list: Move the "On Demand" label to the right

Having that at the bottom makes it harder for iOS to get
the row height correctly.

Signed-off-by: Roopesh Chander <roop@roopc.net>
4 years agoUI: iOS: Show on-demand state in 'Status' if there are on-demand rules
Roopesh Chander [Tue, 27 Jul 2021 21:00:24 +0000 (02:30 +0530)] 
UI: iOS: Show on-demand state in 'Status' if there are on-demand rules

Signed-off-by: Roopesh Chander <roop@roopc.net>
4 years agoUI: When reloading tunnels, preserve '.waiting' state
Roopesh Chander [Tue, 27 Jul 2021 08:05:30 +0000 (13:35 +0530)] 
UI: When reloading tunnels, preserve '.waiting' state

Signed-off-by: Roopesh Chander <roop@roopc.net>
4 years agoUI: When deactivating for activating another tunnel, disable on-demand
Roopesh Chander [Tue, 27 Jul 2021 06:09:07 +0000 (11:39 +0530)] 
UI: When deactivating for activating another tunnel, disable on-demand

Signed-off-by: Roopesh Chander <roop@roopc.net>
4 years agoUI: Keep on-demand rules even if on-demand is disabled
Roopesh Chander [Tue, 27 Jul 2021 20:40:45 +0000 (02:10 +0530)] 
UI: Keep on-demand rules even if on-demand is disabled

Signed-off-by: Roopesh Chander <roop@roopc.net>
4 years agoUI: iOS: Tunnel detail: Incorporate on-demand-ness in 'Status'
Roopesh Chander [Mon, 26 Jul 2021 11:26:03 +0000 (16:56 +0530)] 
UI: iOS: Tunnel detail: Incorporate on-demand-ness in 'Status'

Signed-off-by: Roopesh Chander <roop@roopc.net>
4 years agoUI: iOS: Show "on-demand is active" for tunnels with the active on-demand
Andrej Mihajlov [Sat, 27 Mar 2021 21:02:09 +0000 (22:02 +0100)] 
UI: iOS: Show "on-demand is active" for tunnels with the active on-demand

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
Signed-off-by: Roopesh Chander <roop@roopc.net>
4 years agoUI: iOS: Tunnels list: Incorporate on-demand-ness in the switch
Roopesh Chander [Sat, 24 Jul 2021 20:04:03 +0000 (01:34 +0530)] 
UI: iOS: Tunnels list: Incorporate on-demand-ness in the switch

Signed-off-by: Roopesh Chander <roop@roopc.net>
4 years agoUI: TunnelsManager: Add setOnDemandEnabled() instance method
Roopesh Chander [Sat, 24 Jul 2021 19:29:36 +0000 (00:59 +0530)] 
UI: TunnelsManager: Add setOnDemandEnabled() instance method

Signed-off-by: Roopesh Chander <roop@roopc.net>
4 years agoUI: TunnelsManager: Add TunnelContainer.hasOnDemandRules
Roopesh Chander [Sat, 24 Jul 2021 18:23:31 +0000 (23:53 +0530)] 
UI: TunnelsManager: Add TunnelContainer.hasOnDemandRules

Signed-off-by: Roopesh Chander <roop@roopc.net>
4 years agoGlobal: bump copyright year
Jason A. Donenfeld [Thu, 17 Jun 2021 14:56:46 +0000 (16:56 +0200)] 
Global: bump copyright year

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
4 years agoKit: add missing import for WireGuardKitC
Andrej Mihajlov [Thu, 17 Jun 2021 11:23:22 +0000 (13:23 +0200)] 
Kit: add missing import for WireGuardKitC

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
4 years agoApp: version bump 1.0.13-24
Jason A. Donenfeld [Wed, 16 Jun 2021 16:11:22 +0000 (18:11 +0200)] 
App: version bump

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
4 years agoKit: Go: mod bump
Jason A. Donenfeld [Wed, 16 Jun 2021 16:03:28 +0000 (18:03 +0200)] 
Kit: Go: mod bump

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
4 years agoKit: Adapter: use more reliable utun detection technique
Jason A. Donenfeld [Wed, 16 Jun 2021 15:09:40 +0000 (17:09 +0200)] 
Kit: Adapter: use more reliable utun detection technique

Rather than hoping that the AF_SYSTEM fd is of type utun, and then
calling "2" on it to get the name -- which could be defined as something
else for a different AF_SYSTEM socket type -- instead simply query the
AF_SYSTEM control socket ID with getpeername. This has one catch, which
is that the ID is dynamically allocated, so we resolve it using the
qualified name. Normally we'd make a new AF_SYSTEM socket for this, but
since that's not allowed in the sandbox, we reuse the AF_SYSTEM socket
that we're checking. At this point in the flow, we know that it's a
proper AF_SYSTEM one, based on the first sockaddr member; we just don't
know that it's a utun variety.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
4 years agoKit: Adapter: iterate through all FDs to find UTUN
Jason A. Donenfeld [Wed, 16 Jun 2021 13:56:21 +0000 (15:56 +0200)] 
Kit: Adapter: iterate through all FDs to find UTUN

This is a bit of a kludge, until I find something better. We simply
iterate through all FDs, and call getsockopt on each one until we find
the utun FD. This works, and completes rather quickly (fd is usually 6
or 7). Rather than maintain the old path for older kernels, just use
this for all versions, to get more coverage. Other techniques involve
undocumented APIs; this one has the advantage of using nothing
undocumented.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
4 years agoSPM: update exclude rules
Andrej Mihajlov [Tue, 15 Jun 2021 13:18:21 +0000 (15:18 +0200)] 
SPM: update exclude rules

Fixes missing excluded file warning in Xcode. api-ios.go was renamed to api-apple.go.

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
4 years agoUI: iOS: asynchronously load from NEHotspotNetwork on iOS 14
Jason A. Donenfeld [Mon, 8 Mar 2021 23:57:35 +0000 (00:57 +0100)] 
UI: iOS: asynchronously load from NEHotspotNetwork on iOS 14

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
4 years agoUI: iOS: clean up visuals in SSID editor
Jason A. Donenfeld [Mon, 8 Mar 2021 23:02:03 +0000 (00:02 +0100)] 
UI: iOS: clean up visuals in SSID editor

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
4 years agoREADME: account for funky xcode paths
Jason A. Donenfeld [Mon, 8 Mar 2021 20:20:12 +0000 (21:20 +0100)] 
README: account for funky xcode paths

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
4 years agoKit: Go: bump to latest API
Jason A. Donenfeld [Mon, 8 Mar 2021 19:29:12 +0000 (20:29 +0100)] 
Kit: Go: bump to latest API

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
4 years agoUI: iOS: Disable "copy" action on on-demand cells
Andrej Mihajlov [Wed, 6 Jan 2021 10:57:40 +0000 (11:57 +0100)] 
UI: iOS: Disable "copy" action on on-demand cells

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
4 years agoKit: netcfg: add explicit IP mask routes
Jason A. Donenfeld [Fri, 1 Jan 2021 17:26:49 +0000 (18:26 +0100)] 
Kit: netcfg: add explicit IP mask routes

macOS will use the wrong source address unless we add explicit routes
that mention the self-pointing gateway. Actually, it won't add any
implicit routes on its own, so in order to route the masks of the
addresses, we have to add our own routes explicitly.

However, this still doesn't fix the problem while inside of the network
extension, even though it works outside it.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
4 years agoKit: Go: mod bump
Jason A. Donenfeld [Wed, 23 Dec 2020 16:47:07 +0000 (17:47 +0100)] 
Kit: Go: mod bump

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
4 years agoUI: iOS: Remove duplicate call to addSubview
Andrej Mihajlov [Wed, 23 Dec 2020 15:03:41 +0000 (16:03 +0100)] 
UI: iOS: Remove duplicate call to addSubview

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
4 years agoUI: iOS: Fix placeholder label alignment in text fields.
Andrej Mihajlov [Wed, 23 Dec 2020 15:03:01 +0000 (16:03 +0100)] 
UI: iOS: Fix placeholder label alignment in text fields.

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
4 years agoApp: version bump 1.0.12-22
Jason A. Donenfeld [Wed, 23 Dec 2020 14:05:56 +0000 (15:05 +0100)] 
App: version bump

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
4 years agoproject: sync translations and improve id generation again
Jason A. Donenfeld [Wed, 23 Dec 2020 13:55:29 +0000 (14:55 +0100)] 
project: sync translations and improve id generation again

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
4 years agoUI: macOS: Group more than 10 tunnels into submenu
Andrej Mihajlov [Tue, 22 Dec 2020 15:40:28 +0000 (16:40 +0100)] 
UI: macOS: Group more than 10 tunnels into submenu

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
4 years agoUI: Avoid force unwrap when checking for errors
Andrej Mihajlov [Wed, 23 Dec 2020 13:16:27 +0000 (14:16 +0100)] 
UI: Avoid force unwrap when checking for errors

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
4 years agoKit: do not crash on [abcd::] with missing port
Jason A. Donenfeld [Wed, 23 Dec 2020 13:06:26 +0000 (14:06 +0100)] 
Kit: do not crash on [abcd::] with missing port

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
4 years agoKit: Go: bump module and simplify API
Jason A. Donenfeld [Wed, 23 Dec 2020 12:40:24 +0000 (13:40 +0100)] 
Kit: Go: bump module and simplify API

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
4 years agoUI: pause VPN configurations observer while adding or removing multiple tunnels
Andrej Mihajlov [Mon, 21 Dec 2020 12:46:55 +0000 (13:46 +0100)] 
UI: pause VPN configurations observer while adding or removing multiple tunnels

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
4 years agoUI: use NotificationToken to properly clean up observers
Andrej Mihajlov [Tue, 22 Dec 2020 10:09:18 +0000 (11:09 +0100)] 
UI: use NotificationToken to properly clean up observers

When the variable goes out of scope, the observer isn't removed unless
an explicit call is made to the token.

Signed-off-by: Andrej Mihajlov <and@mullvad.net>