aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Kit: implement Codable for IPAddressRangeam/codable-ipaddress-rangeAndrej Mihajlov2022-09-261-0/+23
| | | | Signed-off-by: Andrej Mihajlov <and@mullvad.net>
* UI: When saving on-demand rules, deactivate if reqd and then saveRoopesh Chander2021-09-282-14/+30
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* UI: When saving on-demand rules on a config, enable on-demand if activeRoopesh Chander2021-09-242-3/+13
| | | | | | | | 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>
* App: version bump1.0.15-26Jason A. Donenfeld2021-09-231-2/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* UI: macOS: increase login detector file timeoutJason A. Donenfeld2021-09-231-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Model: migrate iOS 14 keychain references to iOS 15 formatJason A. Donenfeld2021-09-231-1/+22
| | | | | | | | | | | | | | | | | | | | | | | 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>
* UI: iOS: remove list pinking when no configJason A. Donenfeld2021-09-232-5/+0
| | | | | | This reverts commit 86afd1a46a83038a787176272a7c486b7269e1a3. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* WireGuardApp: restore old keychain consistency behaviorJason A. Donenfeld2021-09-231-7/+9
| | | | | | This reverts commit adcbd17ebeedaf6fa8106c8835ebf43667170878. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* App: version bump1.0.14-25Jason A. Donenfeld2021-09-221-2/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* UI: iOS: disable list rows when no configJason A. Donenfeld2021-09-222-0/+5
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* WireGuardApp: use file to communicate launch-by-login-helperJason A. Donenfeld2021-09-226-40/+47
| | | | | | Apple event params are broken on recent macOS versions. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Keychain: remove class constraint when copyingJason A. Donenfeld2021-09-221-4/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* WireGuardApp: do not delete unverifying profiles everJason A. Donenfeld2021-09-221-9/+7
| | | | | | | 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>
* WireGuardKitGo: bump wireguard-go versionJason A. Donenfeld2021-09-222-13/+14
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* MacAppStoreUpdateDetector: Detect StoreAEService correctlyRoopesh Chander2021-09-221-1/+1
| | | | | | | | | | 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>
* MacAppStoreUpdateDetector: Add pid to the logRoopesh Chander2021-09-221-1/+2
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* WireGuardKitGo: include new homebrew location in PATHJason A. Donenfeld2021-09-221-0/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* build: Fix swiftlint warningsRoopesh Chander2021-09-228-8/+7
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* build: Fix swift warningsRoopesh Chander2021-09-227-8/+8
| | | | | | Use 'AnyObject' instead of 'class' to restrict protocol inheritance Signed-off-by: Roopesh Chander <roop@roopc.net>
* build: Include 'swiftlint' location in the PATH before invoking itRoopesh Chander2021-09-221-4/+4
| | | | | | | | | | | | | | | | 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>
* UI: Use 'On-Demand', with hyphen, consistentlyJason A. Donenfeld2021-09-221-6/+6
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* UI: macOS: do on-demand ritual for clicking list item tooJason A. Donenfeld2021-09-222-7/+16
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* UI: Consider on-demand to be enabled iff the tunnel provider is enabledRoopesh Chander2021-08-031-3/+4
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* UI: When setting on-demand, avoid a second saveToPreferences() callRoopesh Chander2021-08-031-14/+2
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* UI: When saving on-demand rules, don't set isOnDemandEnabledRoopesh Chander2021-08-021-1/+1
| | | | | | | | | 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>
* UI: macOS: Incorporate on-demand-ness in status menuRoopesh Chander2021-07-301-6/+29
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* UI: macOS: Tunnel detail: Incorporate on-demand-ness in toggle buttonRoopesh Chander2021-07-303-27/+59
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* UI: macOS: Tunnel detail: Incorporate on-demand-ness in the status rowRoopesh Chander2021-07-303-19/+43
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* UI: macOS: Tunnel list: Incorporate on-demand-ness in the status circleRoopesh Chander2021-07-301-6/+18
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* UI: macOS: Add yellow circle imageRoopesh Chander2021-07-304-3/+25
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* UI: Localizations: Remove alertTunnelActivationFailureOnDemandAddendumRoopesh Chander2021-07-2818-29/+0
| | | | | | It's not used anymore. Signed-off-by: Roopesh Chander <roop@roopc.net>
* UI: Remove addendum on on-demand from error on tunnel activationRoopesh Chander2021-07-282-6/+4
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* UI: When setting on-demand, enable the tunnel if requiredRoopesh Chander2021-07-281-0/+16
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* UI: iOS: Tunnels list: Move the "On Demand" label to the rightRoopesh Chander2021-07-282-44/+24
| | | | | | | Having that at the bottom makes it harder for iOS to get the row height correctly. Signed-off-by: Roopesh Chander <roop@roopc.net>
* UI: iOS: Show on-demand state in 'Status' if there are on-demand rulesRoopesh Chander2021-07-282-0/+6
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* UI: When reloading tunnels, preserve '.waiting' stateRoopesh Chander2021-07-281-1/+1
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* UI: When deactivating for activating another tunnel, disable on-demandRoopesh Chander2021-07-281-1/+11
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* UI: Keep on-demand rules even if on-demand is disabledRoopesh Chander2021-07-282-15/+13
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* UI: iOS: Tunnel detail: Incorporate on-demand-ness in 'Status'Roopesh Chander2021-07-283-14/+54
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* UI: iOS: Show "on-demand is active" for tunnels with the active on-demandAndrej Mihajlov2021-07-282-5/+54
| | | | | Signed-off-by: Andrej Mihajlov <and@mullvad.net> Signed-off-by: Roopesh Chander <roop@roopc.net>
* UI: iOS: Tunnels list: Incorporate on-demand-ness in the switchRoopesh Chander2021-07-283-10/+44
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* UI: TunnelsManager: Add setOnDemandEnabled() instance methodRoopesh Chander2021-07-281-0/+30
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* UI: TunnelsManager: Add TunnelContainer.hasOnDemandRulesRoopesh Chander2021-07-281-2/+8
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Global: bump copyright yearJason A. Donenfeld2021-06-17120-120/+120
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Kit: add missing import for WireGuardKitCAndrej Mihajlov2021-06-171-0/+1
| | | | Signed-off-by: Andrej Mihajlov <and@mullvad.net>
* App: version bump1.0.13-24Jason A. Donenfeld2021-06-161-2/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Kit: Go: mod bumpJason A. Donenfeld2021-06-162-9/+15
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Kit: Adapter: use more reliable utun detection techniqueJason A. Donenfeld2021-06-162-3/+39
| | | | | | | | | | | | | | | 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>
* Kit: Adapter: iterate through all FDs to find UTUNJason A. Donenfeld2021-06-161-1/+8
| | | | | | | | | | | | 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>
* SPM: update exclude rulesAndrej Mihajlov2021-06-162-2/+2
| | | | | | Fixes missing excluded file warning in Xcode. api-ios.go was renamed to api-apple.go. Signed-off-by: Andrej Mihajlov <and@mullvad.net>