aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* UI: iOS: asynchronously load from NEHotspotNetwork on iOS 14Jason A. Donenfeld2021-03-091-22/+44
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* UI: iOS: clean up visuals in SSID editorJason A. Donenfeld2021-03-093-4/+14
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* README: account for funky xcode pathsJason A. Donenfeld2021-03-091-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Kit: Go: bump to latest APIJason A. Donenfeld2021-03-097-75/+86
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* UI: iOS: Disable "copy" action on on-demand cellsAndrej Mihajlov2021-01-111-0/+2
| | | | Signed-off-by: Andrej Mihajlov <and@mullvad.net>
* Kit: netcfg: add explicit IP mask routesJason A. Donenfeld2021-01-012-18/+67
| | | | | | | | | | | | 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>
* Kit: Go: mod bumpJason A. Donenfeld2020-12-232-3/+3
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* UI: iOS: Remove duplicate call to addSubviewAndrej Mihajlov2020-12-231-2/+0
| | | | Signed-off-by: Andrej Mihajlov <and@mullvad.net>
* UI: iOS: Fix placeholder label alignment in text fields.Andrej Mihajlov2020-12-231-1/+8
| | | | Signed-off-by: Andrej Mihajlov <and@mullvad.net>
* App: version bump1.0.12-22Jason A. Donenfeld2020-12-231-2/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* project: sync translations and improve id generation againJason A. Donenfeld2020-12-2320-437/+809
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* UI: macOS: Group more than 10 tunnels into submenuAndrej Mihajlov2020-12-232-32/+138
| | | | Signed-off-by: Andrej Mihajlov <and@mullvad.net>
* UI: Avoid force unwrap when checking for errorsAndrej Mihajlov2020-12-231-14/+14
| | | | Signed-off-by: Andrej Mihajlov <and@mullvad.net>
* Kit: do not crash on [abcd::] with missing portJason A. Donenfeld2020-12-231-0/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Kit: Go: bump module and simplify APIJason A. Donenfeld2020-12-233-21/+15
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* UI: pause VPN configurations observer while adding or removing multiple tunnelsAndrej Mihajlov2020-12-221-2/+28
| | | | Signed-off-by: Andrej Mihajlov <and@mullvad.net>
* UI: use NotificationToken to properly clean up observersAndrej Mihajlov2020-12-224-25/+67
| | | | | | | 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>
* Keychain: prevent call to stat() when determining appex pathAndrej Mihajlov2020-12-221-1/+1
| | | | Signed-off-by: Andrej Mihajlov <and@mullvad.net>
* Kit: Go: use Windows-style retry sleep loop on bind updatesJason A. Donenfeld2020-12-183-29/+41
| | | | | | | Something odd happens in the network extension that we still don't understand. Attempt to poke it in this terrible way. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* UI: Model: remove 0.0.0.0/8 from non-private IPsJason A. Donenfeld2020-12-181-6/+7
| | | | | | | | | | | | | | | macOS freaks out if you try to explicitly route to 0.0.0.0/8 in its includedRoutes parameter. Even though 0.0.0.0/8 isn't RFC1918, it is marked in RFC6890 as "this host on this network", so removing it from the Internet routes makes sense semantically too. This commit changes 0.0.0.0/5 into: - 1.0.0.0/8 - 2.0.0.0/8 - 3.0.0.0/8 - 4.0.0.0/6 Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* UI: iOS: remove donation link1.0.11-21Jason A. Donenfeld2020-12-172-13/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Apple forbids us from having a simple link to wireguard.com/donations/ in the version info window, citing the existence of this link as a form of payment outside of their in-app purchase framework that requires 30%. The link had been there for around two years. After rejecting an app update for a critical networking regression unrelated to this, they wrote: Dec 17, 2020 at 8:35 PM From Apple 3.1.1 - Business - Payments - In-App Purchase We noticed that your app allows users to contribute donations to the development of your app with a mechanism other than the in-app purchase API, which is not appropriate for the App Store. Next Steps To resolve this issue, please revise your app to use the in-app purchase API to pay for this type of transaction. Please note that even though tipping another individual is optional, the tip is connected to or associated with the receipt of digital content or services in your app and must be purchased through in-app purchase in accordance with guideline 3.1.1 of the App Store Review Guidelines. Please see attached screenshot for details. Trying to appeal this or reason with Apple is not going to be a fruitful endeavor, so instead we simply cut our losses and remove the donation link entirely. The goal, anyway, is to get a timely critical update into the hands of users, and encouraging Apple to block that further would be a disservice. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* UI: macOS: Fix UTF-8 and UTF-16 conversions in highlighter codeAndrej Mihajlov2020-12-172-9/+25
| | | | | | NSString uses UTF-16 internally, while String uses UTF-8 in Swift 5. Signed-off-by: Andrej Mihajlov <and@mullvad.net>
* project: generate more stable locale IDsJason A. Donenfeld2020-12-172-40/+44
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* build: disable hardened runtime on iOS but keep it enabled on macOSAndrej Mihajlov2020-12-171-2/+4
| | | | Signed-off-by: Andrej Mihajlov <and@mullvad.net>
* Version bump1.0.11-20Jason A. Donenfeld2020-12-171-2/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* UI: add missing translations to incomplete localesJason A. Donenfeld2020-12-1710-36/+1320
| | | | | | | | | This is the wrong way to fix the problem. The correct way will involve moving away from the whacky tr() macro and using translations functions properly. But migrating to that will require some heavy scripting work. So for now, use a hammer. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Kit: Adapter: do not treat NE settings timeouts as fatalJason A. Donenfeld2020-12-172-9/+1
| | | | | | | | | | The general Network Extension framework is incredibly buggy, and a timeout when setting the network settings does not necessarily imply that the whole operation failed. Simply log the condition and move on. This restores the app's old behavior. Reported-by: Filipe Mendonça <cfilipem@gmail.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Kit: PacketTunnelSettingsGenerator: do not require DNS queries if no DNSJason A. Donenfeld2020-12-171-5/+9
| | | | | | | | | | | | | | | | | | | | Prior, we would set matchDomains=[""] even if the user didn't provide any DNS servers. This was kind of incoherent, but I guess we had in mind some kind of non-sensical leakproof scheme that never really worked anyway. NetworkExtension didn't like this, so setTunnelNetworkSettings would, rather than return an error, simply timeout and never call its callback function. But everything worked fine, so we had code in the UI to check to make sure everything was okay after 5 seconds or so of no callback. Recent changes made the timeout fatal on the network extension side, so rather than succeed, configs with no DNS server started erroring out, causing user reports. This commit attempts to handle the root cause of the timeout issue by not twiddling with DNS settings if no DNS server was specified. For now, however, it leaves the hard-timeout semantics in place. Reported-by: Filipe Mendonça <cfilipem@gmail.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* UI: macOS: remove donation link1.0.10-19Jason A. Donenfeld2020-12-162-4/+2
| | | | | | | | | Apple forbids us from having a simple donation link in the "About WireGuard" dialog, due to new policies. And arguing with the giant is not going to be a fruitful battle. Do the practical thing and just remove it. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Version bump1.0.10-18Jason A. Donenfeld2020-12-151-2/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* WireGuardApp: Refactor TunnelListCellAndrej Mihajlov2020-12-151-35/+33
| | | | Signed-off-by: Andrej Mihajlov <and@mullvad.net>
* WireGuardApp: Replace AnyObject with a concrete NSKeyValueObservationAndrej Mihajlov2020-12-151-2/+2
| | | | Signed-off-by: Andrej Mihajlov <and@mullvad.net>
* WireGuardApp: Animate switch control in TunnelListCellAndrej Mihajlov2020-12-151-9/+9
| | | | Signed-off-by: Andrej Mihajlov <and@mullvad.net>
* WireGuardApp: Remove 200ms delay when updating tunnel status switchAndrej Mihajlov2020-12-152-13/+8
| | | | Signed-off-by: Andrej Mihajlov <and@mullvad.net>
* WireGuardApp: Pin status switch to cell marginAndrej Mihajlov2020-12-151-1/+1
| | | | Signed-off-by: Andrej Mihajlov <and@mullvad.net>
* WireGuardApp: Refactor indicator view initializationAndrej Mihajlov2020-12-151-6/+5
| | | | Signed-off-by: Andrej Mihajlov <and@mullvad.net>
* WireGuardApp: Use Bundle.forInfoDictionaryKey to access Info.plist fieldsAndrej Mihajlov2020-12-151-2/+2
| | | | Signed-off-by: Andrej Mihajlov <and@mullvad.net>
* WireGuardApp: Refactor indicator initializationAndrej Mihajlov2020-12-151-6/+5
| | | | Signed-off-by: Andrej Mihajlov <and@mullvad.net>
* WireGuardApp: Fix window background color to default blackAndrej Mihajlov2020-12-151-5/+0
| | | | Signed-off-by: Andrej Mihajlov <and@mullvad.net>
* global: support DNS search domainsJason A. Donenfeld2020-12-156-16/+28
| | | | | | | This has been supported by Windows and Linux for quite some time. Add support here for iOS and macOS. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* WireGuardKitGo: update to latest wireguard-go tagJason A. Donenfeld2020-12-155-38/+48
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Revert "[REVERT ME SOON] TunnelsManager: Workaround for macOS Catalina deleting tunnels arbitrarily"Jason A. Donenfeld2020-12-111-161/+2
| | | | | | | | This reverts commit 028e76eb3fda127d84eb88dc5cb96d4278f37b96. It's been over a year. I really hope this is fixed by Apple. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* WireGuardApp: modify xcodeproj when syncing translationsJason A. Donenfeld2020-12-112-9/+107
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* WireGuardKit: Let wireguard-go backend run in offline on macOSAndrej Mihajlov2020-12-111-3/+8
| | | | Signed-off-by: Andrej Mihajlov <and@mullvad.net>
* WireGuardApp: add CrowdIn syncer and run itJason A. Donenfeld2020-12-1119-20/+4234
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>