]> git.ipfire.org Git - thirdparty/wireguard-apple.git/log
thirdparty/wireguard-apple.git
4 years agoKeychain: prevent call to stat() when determining appex path
Andrej Mihajlov [Mon, 21 Dec 2020 16:57:18 +0000 (17:57 +0100)] 
Keychain: prevent call to stat() when determining appex path

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
4 years agoKit: Go: use Windows-style retry sleep loop on bind updates
Jason A. Donenfeld [Fri, 18 Dec 2020 10:50:13 +0000 (11:50 +0100)] 
Kit: Go: use Windows-style retry sleep loop on bind updates

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>
4 years agoUI: Model: remove 0.0.0.0/8 from non-private IPs
Jason A. Donenfeld [Fri, 18 Dec 2020 11:42:28 +0000 (12:42 +0100)] 
UI: Model: remove 0.0.0.0/8 from non-private IPs

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>
4 years agoUI: iOS: remove donation link 1.0.11-21
Jason A. Donenfeld [Tue, 15 Dec 2020 23:03:34 +0000 (00:03 +0100)] 
UI: iOS: remove donation link

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>
4 years agoUI: macOS: Fix UTF-8 and UTF-16 conversions in highlighter code
Andrej Mihajlov [Tue, 15 Dec 2020 17:26:55 +0000 (18:26 +0100)] 
UI: macOS: Fix UTF-8 and UTF-16 conversions in highlighter code

NSString uses UTF-16 internally, while String uses UTF-8 in Swift 5.

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
4 years agoproject: generate more stable locale IDs
Jason A. Donenfeld [Thu, 17 Dec 2020 11:41:23 +0000 (12:41 +0100)] 
project: generate more stable locale IDs

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
4 years agobuild: disable hardened runtime on iOS but keep it enabled on macOS
Andrej Mihajlov [Thu, 17 Dec 2020 10:56:17 +0000 (11:56 +0100)] 
build: disable hardened runtime on iOS but keep it enabled on macOS

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
4 years agoVersion bump 1.0.11-20
Jason A. Donenfeld [Wed, 16 Dec 2020 23:43:38 +0000 (00:43 +0100)] 
Version bump

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
4 years agoUI: add missing translations to incomplete locales
Jason A. Donenfeld [Wed, 16 Dec 2020 23:40:42 +0000 (00:40 +0100)] 
UI: add missing translations to incomplete locales

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>
4 years agoKit: Adapter: do not treat NE settings timeouts as fatal
Jason A. Donenfeld [Wed, 16 Dec 2020 23:24:39 +0000 (00:24 +0100)] 
Kit: Adapter: do not treat NE settings timeouts as fatal

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>
4 years agoKit: PacketTunnelSettingsGenerator: do not require DNS queries if no DNS
Jason A. Donenfeld [Wed, 16 Dec 2020 23:10:28 +0000 (00:10 +0100)] 
Kit: PacketTunnelSettingsGenerator: do not require DNS queries if no DNS

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>
4 years agoUI: macOS: remove donation link 1.0.10-19
Jason A. Donenfeld [Tue, 15 Dec 2020 23:03:34 +0000 (00:03 +0100)] 
UI: macOS: remove donation link

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>
4 years agoVersion bump 1.0.10-18
Jason A. Donenfeld [Tue, 15 Dec 2020 15:18:07 +0000 (16:18 +0100)] 
Version bump

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
4 years agoWireGuardApp: Refactor TunnelListCell
Andrej Mihajlov [Tue, 15 Dec 2020 13:51:02 +0000 (14:51 +0100)] 
WireGuardApp: Refactor TunnelListCell

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
4 years agoWireGuardApp: Replace AnyObject with a concrete NSKeyValueObservation
Andrej Mihajlov [Tue, 15 Dec 2020 13:21:39 +0000 (14:21 +0100)] 
WireGuardApp: Replace AnyObject with a concrete NSKeyValueObservation

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
4 years agoWireGuardApp: Animate switch control in TunnelListCell
Andrej Mihajlov [Tue, 15 Dec 2020 13:21:21 +0000 (14:21 +0100)] 
WireGuardApp: Animate switch control in TunnelListCell

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
4 years agoWireGuardApp: Remove 200ms delay when updating tunnel status switch
Andrej Mihajlov [Tue, 15 Dec 2020 11:41:26 +0000 (12:41 +0100)] 
WireGuardApp: Remove 200ms delay when updating tunnel status switch

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
4 years agoWireGuardApp: Pin status switch to cell margin
Andrej Mihajlov [Mon, 14 Dec 2020 15:48:53 +0000 (16:48 +0100)] 
WireGuardApp: Pin status switch to cell margin

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
4 years agoWireGuardApp: Refactor indicator view initialization
Andrej Mihajlov [Mon, 14 Dec 2020 15:38:16 +0000 (16:38 +0100)] 
WireGuardApp: Refactor indicator view initialization

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
4 years agoWireGuardApp: Use Bundle.forInfoDictionaryKey to access Info.plist fields
Andrej Mihajlov [Mon, 14 Dec 2020 15:25:12 +0000 (16:25 +0100)] 
WireGuardApp: Use Bundle.forInfoDictionaryKey to access Info.plist fields

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
4 years agoWireGuardApp: Refactor indicator initialization
Andrej Mihajlov [Mon, 14 Dec 2020 15:22:52 +0000 (16:22 +0100)] 
WireGuardApp: Refactor indicator initialization

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
4 years agoWireGuardApp: Fix window background color to default black
Andrej Mihajlov [Mon, 14 Dec 2020 14:26:24 +0000 (15:26 +0100)] 
WireGuardApp: Fix window background color to default black

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
4 years agoglobal: support DNS search domains
Jason A. Donenfeld [Tue, 15 Dec 2020 12:49:21 +0000 (13:49 +0100)] 
global: support DNS search domains

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>
4 years agoWireGuardKitGo: update to latest wireguard-go tag
Jason A. Donenfeld [Tue, 15 Dec 2020 12:16:35 +0000 (13:16 +0100)] 
WireGuardKitGo: update to latest wireguard-go tag

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
4 years agoRevert "[REVERT ME SOON] TunnelsManager: Workaround for macOS Catalina deleting tunne...
Jason A. Donenfeld [Fri, 11 Dec 2020 11:50:31 +0000 (12:50 +0100)] 
Revert "[REVERT ME SOON] TunnelsManager: Workaround for macOS Catalina deleting tunnels arbitrarily"

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>
4 years agoWireGuardApp: modify xcodeproj when syncing translations
Jason A. Donenfeld [Fri, 11 Dec 2020 11:38:24 +0000 (12:38 +0100)] 
WireGuardApp: modify xcodeproj when syncing translations

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
4 years agoWireGuardKit: Let wireguard-go backend run in offline on macOS
Andrej Mihajlov [Fri, 11 Dec 2020 10:49:56 +0000 (11:49 +0100)] 
WireGuardKit: Let wireguard-go backend run in offline on macOS

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
4 years agoWireGuardApp: add CrowdIn syncer and run it
Jason A. Donenfeld [Fri, 11 Dec 2020 10:33:59 +0000 (11:33 +0100)] 
WireGuardApp: add CrowdIn syncer and run it

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
4 years agoWireGuardKit: Conditionally turn on/off wireguard-go
Andrej Mihajlov [Tue, 1 Dec 2020 10:18:31 +0000 (11:18 +0100)] 
WireGuardKit: Conditionally turn on/off wireguard-go

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
4 years agoWireGuardGoKit: drop support for armv7
Jason A. Donenfeld [Wed, 9 Dec 2020 14:56:35 +0000 (15:56 +0100)] 
WireGuardGoKit: drop support for armv7

Apple and Go have both dropped it, so we do the same.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
4 years agoglobal: fix remaining swiftlint violations
Jason A. Donenfeld [Wed, 9 Dec 2020 13:35:21 +0000 (14:35 +0100)] 
global: fix remaining swiftlint violations

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
4 years agoWireGuardKitGo: get rid of missing -Wno-unused-command-line-argument flag
Jason A. Donenfeld [Wed, 9 Dec 2020 13:25:22 +0000 (14:25 +0100)] 
WireGuardKitGo: get rid of missing -Wno-unused-command-line-argument flag

Recent toolchains error out on it, and it's no longer needed.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
4 years agoWireGuardKitGo: rebase boottime patch onto Go 1.15.6
Jason A. Donenfeld [Wed, 9 Dec 2020 13:08:45 +0000 (14:08 +0100)] 
WireGuardKitGo: rebase boottime patch onto Go 1.15.6

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
4 years agoglobal: bump year in header
Jason A. Donenfeld [Fri, 4 Dec 2020 11:15:29 +0000 (12:15 +0100)] 
global: bump year in header

A bit overdue, but better late than never.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
4 years agoWireGuardApp: Update target membership to exclude sources that are only used in netwo...
Andrej Mihajlov [Fri, 4 Dec 2020 10:28:53 +0000 (11:28 +0100)] 
WireGuardApp: Update target membership to exclude sources that are only used in network extensions

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
4 years agoWireGuardKit: Delegate IPv*Address initialization to self.init
Andrej Mihajlov [Fri, 4 Dec 2020 10:25:16 +0000 (11:25 +0100)] 
WireGuardKit: Delegate IPv*Address initialization to self.init

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
4 years agoWireGuardApp: Remove backend version call in Logger.swift & extract wireguard-go...
Andrej Mihajlov [Fri, 4 Dec 2020 10:01:36 +0000 (11:01 +0100)] 
WireGuardApp: Remove backend version call in Logger.swift & extract wireguard-go version script from network extension targets

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
4 years agoWireGuardKit: Log XLAT resolution errors
Andrej Mihajlov [Thu, 3 Dec 2020 14:10:29 +0000 (15:10 +0100)] 
WireGuardKit: Log XLAT resolution errors

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
4 years agoWireGuardApp: Disable SWIFT_PRECOMPILE_BRIDGING_HEADER
Andrej Mihajlov [Thu, 3 Dec 2020 11:53:22 +0000 (12:53 +0100)] 
WireGuardApp: Disable SWIFT_PRECOMPILE_BRIDGING_HEADER

Clang automatically picks up module.modulemap files from WireGuardKit directories when precompiling bridging header file, which causes the compiler to fail with obscure error.

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
4 years agoWireGuardApp: Update swift version from 4.2 to 5.0
Andrej Mihajlov [Thu, 3 Dec 2020 11:52:49 +0000 (12:52 +0100)] 
WireGuardApp: Update swift version from 4.2 to 5.0

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
4 years agoUpdate checkout path in README
Andrej Mihajlov [Thu, 3 Dec 2020 10:13:42 +0000 (11:13 +0100)] 
Update checkout path in README

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
4 years agoKeychain: Avoid roundtrip via items when accessing item label (stored in kSecAttrLabel)
Andrej Mihajlov [Wed, 2 Dec 2020 17:16:41 +0000 (18:16 +0100)] 
Keychain: Avoid roundtrip via items when accessing item label (stored in kSecAttrLabel)

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
4 years agoKeychain: Remove unnecessary cast to String in Keychain queries
Andrej Mihajlov [Wed, 2 Dec 2020 17:09:39 +0000 (18:09 +0100)] 
Keychain: Remove unnecessary cast to String in Keychain queries

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
4 years agoWireGuardApp: Remove WireGuardKit.swift from Xcode source tree
Andrej Mihajlov [Wed, 2 Dec 2020 17:05:37 +0000 (18:05 +0100)] 
WireGuardApp: Remove WireGuardKit.swift from Xcode source tree

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
4 years agoWireGuadKit: Rename WireGuardAdapter.version -> .backendVersion & remove `var wireGua...
Andrej Mihajlov [Wed, 2 Dec 2020 17:05:17 +0000 (18:05 +0100)] 
WireGuadKit: Rename WireGuardAdapter.version -> .backendVersion & remove `var wireGuardVersion` with WireGuardKit.swift

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
4 years agoWireGuardApp: Add back the wireguard-go version extraction script and use WIREGUARD_G...
Andrej Mihajlov [Wed, 2 Dec 2020 17:03:16 +0000 (18:03 +0100)] 
WireGuardApp: Add back the wireguard-go version extraction script and use WIREGUARD_GO_VERSION directly

Avoids linking against libwg-go.a in order to access the WireGuard backend version.

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
4 years agoWireGuardApp: Include headers from WireGuardKitC
Andrej Mihajlov [Wed, 2 Dec 2020 16:24:31 +0000 (17:24 +0100)] 
WireGuardApp: Include headers from WireGuardKitC

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
4 years agoWireGuardApp: integrate WireGuardKit sources directly
Andrej Mihajlov [Wed, 2 Dec 2020 15:10:44 +0000 (16:10 +0100)] 
WireGuardApp: integrate WireGuardKit sources directly

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
4 years agoRemove Sources/ in project folder names
Andrej Mihajlov [Wed, 2 Dec 2020 14:38:12 +0000 (15:38 +0100)] 
Remove Sources/ in project folder names

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
4 years agoWireGuardKit: Rename WireGuardKitSwift -> WireGuardKit
Andrej Mihajlov [Wed, 2 Dec 2020 14:21:36 +0000 (15:21 +0100)] 
WireGuardKit: Rename WireGuardKitSwift -> WireGuardKit

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
4 years agoLinter: Fix all linter issues across the codebase
Andrej Mihajlov [Wed, 2 Dec 2020 14:08:45 +0000 (15:08 +0100)] 
Linter: Fix all linter issues across the codebase

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
4 years agoWireGuardApp: Fix build working dir for go-bridge targets
Andrej Mihajlov [Wed, 2 Dec 2020 13:47:50 +0000 (14:47 +0100)] 
WireGuardApp: Fix build working dir for go-bridge targets

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
4 years agoWireGuardNetworkExtension: Remove wireguard.h from bridging header
Andrej Mihajlov [Wed, 2 Dec 2020 13:47:14 +0000 (14:47 +0100)] 
WireGuardNetworkExtension: Remove wireguard.h from bridging header

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
4 years agoFix paths pointing to xcconfigs
Andrej Mihajlov [Wed, 2 Dec 2020 13:31:59 +0000 (14:31 +0100)] 
Fix paths pointing to xcconfigs

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
4 years agoWireGuardKit: Add wireguard-go files to exclude list to eliminate SwiftPM warnings
Andrej Mihajlov [Wed, 2 Dec 2020 12:06:36 +0000 (13:06 +0100)] 
WireGuardKit: Add wireguard-go files to exclude list to eliminate SwiftPM warnings

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
4 years agoWireGuardKit: Set publicHeadersPath = "." to flatten public headers structure
Andrej Mihajlov [Wed, 2 Dec 2020 12:02:36 +0000 (13:02 +0100)] 
WireGuardKit: Set publicHeadersPath = "." to flatten public headers structure

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
4 years agoWireGuardKit: Fix module map for WireGuardKitC
Andrej Mihajlov [Wed, 2 Dec 2020 12:01:21 +0000 (13:01 +0100)] 
WireGuardKit: Fix module map for WireGuardKitC

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
4 years agoWireGuardKit: Fix import statements
Andrej Mihajlov [Wed, 2 Dec 2020 11:32:20 +0000 (12:32 +0100)] 
WireGuardKit: Fix import statements

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
4 years agoMove all source files to `Sources/` and rename WireGuardKit targets
Andrej Mihajlov [Wed, 2 Dec 2020 11:27:39 +0000 (12:27 +0100)] 
Move all source files to `Sources/` and rename WireGuardKit targets

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
4 years agoWireGuardKit: Assert that resolutionResults must not contain failures
Andrej Mihajlov [Wed, 2 Dec 2020 12:54:31 +0000 (13:54 +0100)] 
WireGuardKit: Assert that resolutionResults must not contain failures

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
4 years agoWireGuardKit: Only assign self.settingsGenerator upon success to set tunnel network...
Andrej Mihajlov [Wed, 2 Dec 2020 12:53:58 +0000 (13:53 +0100)] 
WireGuardKit: Only assign self.settingsGenerator upon success to set tunnel network settings to avoid inconsistent state

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
4 years agoWireGuardKit: Remove handleLogLine from WireGuardAdapter
Andrej Mihajlov [Wed, 2 Dec 2020 12:53:16 +0000 (13:53 +0100)] 
WireGuardKit: Remove handleLogLine from WireGuardAdapter

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
4 years agoWireGuardKit: Remove isStarted: bool from WireGuardAdapter
Andrej Mihajlov [Wed, 2 Dec 2020 12:52:24 +0000 (13:52 +0100)] 
WireGuardKit: Remove isStarted: bool from WireGuardAdapter

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
4 years agoWireGuardKit: Fix docs for WireGuardAdapterError
Andrej Mihajlov [Thu, 3 Dec 2020 12:19:31 +0000 (13:19 +0100)] 
WireGuardKit: Fix docs for WireGuardAdapterError

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
4 years agoWireGuardKit: Fix docs for WireGuardLogLevel
Andrej Mihajlov [Wed, 2 Dec 2020 12:49:25 +0000 (13:49 +0100)] 
WireGuardKit: Fix docs for WireGuardLogLevel

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
4 years agoWireGuardKit: Pass logHandler via constructor
Andrej Mihajlov [Wed, 2 Dec 2020 12:48:24 +0000 (13:48 +0100)] 
WireGuardKit: Pass logHandler via constructor

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
4 years agoPacket tunnel: Remove last error in the completion handler given to adapter.stop
Andrej Mihajlov [Wed, 2 Dec 2020 12:43:09 +0000 (13:43 +0100)] 
Packet tunnel: Remove last error in the completion handler given to adapter.stop

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
4 years agoWireGuardKit: Rename cannotLocateSocketDescriptor -> cannotLocateTunnelFileDescriptor...
Andrej Mihajlov [Wed, 2 Dec 2020 12:42:15 +0000 (13:42 +0100)] 
WireGuardKit: Rename cannotLocateSocketDescriptor -> cannotLocateTunnelFileDescriptor in WireGuardAdapterError

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
4 years agoWireGuardApp: Switch WireGuardKit to master branch
Andrej Mihajlov [Wed, 2 Dec 2020 12:40:56 +0000 (13:40 +0100)] 
WireGuardApp: Switch WireGuardKit to master branch

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
4 years agoWireGuardKit: Add TODO to log the error coming from `withReresolvedIP`
Andrej Mihajlov [Wed, 2 Dec 2020 12:40:08 +0000 (13:40 +0100)] 
WireGuardKit: Add TODO to log the error coming from `withReresolvedIP`

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
4 years agoWireGuardKit: Change getWireGuardVersion() -> wireGuardVersion
Andrej Mihajlov [Wed, 2 Dec 2020 12:38:38 +0000 (13:38 +0100)] 
WireGuardKit: Change getWireGuardVersion() -> wireGuardVersion

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
4 years agoUpdate README
Andrej Mihajlov [Tue, 3 Nov 2020 16:22:37 +0000 (17:22 +0100)] 
Update README

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
4 years agoPacket tunnel: Implement packet tunnel provider using WireGuardAdapter
Andrej Mihajlov [Thu, 19 Nov 2020 12:29:31 +0000 (13:29 +0100)] 
Packet tunnel: Implement packet tunnel provider using WireGuardAdapter

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
4 years agoWireGuardKit: Add WireGuardAdapter
Andrej Mihajlov [Wed, 4 Nov 2020 15:59:33 +0000 (16:59 +0100)] 
WireGuardKit: Add WireGuardAdapter

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
4 years agoWireGuardKit: Add wrappers for PrivateKey, PublicKey, PreSharedKey
Andrej Mihajlov [Thu, 26 Nov 2020 16:23:50 +0000 (17:23 +0100)] 
WireGuardKit: Add wrappers for PrivateKey, PublicKey, PreSharedKey

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
4 years agoiOS/macOS: Remove "Extract wireguard-go version" build phase
Andrej Mihajlov [Mon, 9 Nov 2020 12:16:37 +0000 (13:16 +0100)] 
iOS/macOS: Remove "Extract wireguard-go version" build phase

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
4 years agoiOS/macOS: Remove main bundle apps dependence on WireGuardgoBridge.
Andrej Mihajlov [Mon, 9 Nov 2020 12:16:08 +0000 (13:16 +0100)] 
iOS/macOS: Remove main bundle apps dependence on WireGuardgoBridge.

Main bundle apps do not have to depend on WireGuardGoBridge<PLATFORM> as they depend on network extnesions which in turn depend on WireGuardGoBridge<PLATFORM>.

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
4 years agoiOS/macOS: Integrate WireGuardKit
Andrej Mihajlov [Mon, 9 Nov 2020 09:52:06 +0000 (10:52 +0100)] 
iOS/macOS: Integrate WireGuardKit

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
4 years agogo-bridge: Add context support for wgSetLogger
Jason A. Donenfeld [Thu, 5 Nov 2020 16:14:16 +0000 (17:14 +0100)] 
go-bridge: Add context support for wgSetLogger

Cherry picked cda99bf45c3cb95ca56204549689a0ae91ff4813 from jd/loggerCtx with the fix for wgSetLogger signature in the C header file.

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
4 years agoWireGuardKit: Add WireGuardKitCTarget with private C sources
Andrej Mihajlov [Thu, 5 Nov 2020 11:41:31 +0000 (12:41 +0100)] 
WireGuardKit: Add WireGuardKitCTarget with private C sources

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
4 years agoWireGuardKit: Set public access level for shared structs
Andrej Mihajlov [Thu, 5 Nov 2020 11:23:06 +0000 (12:23 +0100)] 
WireGuardKit: Set public access level for shared structs

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
4 years agoWireGuardKit: Move shared structs to WireGuardKit
Andrej Mihajlov [Wed, 25 Nov 2020 12:41:56 +0000 (13:41 +0100)] 
WireGuardKit: Move shared structs to WireGuardKit

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
4 years agoWireGuardKit: Add swift package scaffolding
Andrej Mihajlov [Mon, 2 Nov 2020 13:40:24 +0000 (14:40 +0100)] 
WireGuardKit: Add swift package scaffolding

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
4 years agogo-bridge: dup tunFd so as to not confuse NetworkExtension
Jason A. Donenfeld [Wed, 2 Sep 2020 15:21:37 +0000 (17:21 +0200)] 
go-bridge: dup tunFd so as to not confuse NetworkExtension

The extension isn't banking on tunFd being closed ever, so dup it before
handing it to the rest of wireguard-go.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
5 years agoChange QoS to .utility
Andrej Mihajlov [Fri, 19 Jun 2020 11:17:31 +0000 (13:17 +0200)] 
Change QoS to .utility

As per comment by eskimo:
https://developer.apple.com/forums/thread/107904?answerId=328525022#328525022

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
5 years agoMake sure that the tunnel and path monitor run on the same serial queue
Andrej Mihajlov [Fri, 19 Jun 2020 10:51:55 +0000 (12:51 +0200)] 
Make sure that the tunnel and path monitor run on the same serial queue

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
5 years agoFix retain cycle between NWPathMonitor and PacketTunnelProvider
Andrej Mihajlov [Fri, 19 Jun 2020 10:42:35 +0000 (12:42 +0200)] 
Fix retain cycle between NWPathMonitor and PacketTunnelProvider

See: https://www.marisibrothers.com/2017/04/memory-leak-in-swift-assigning-function.html

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
5 years agoRefactor interface name query
Andrej Mihajlov [Fri, 19 Jun 2020 10:37:34 +0000 (12:37 +0200)] 
Refactor interface name query

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
5 years agoLocalization: Update Japanese
Jason A. Donenfeld [Sun, 12 Apr 2020 05:28:05 +0000 (23:28 -0600)] 
Localization: Update Japanese

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
5 years agoLocalization: macOS: Add translations for 'Edit' button
Roopesh Chander [Sat, 11 Apr 2020 11:27:49 +0000 (16:57 +0530)] 
Localization: macOS: Add translations for 'Edit' button

By copying the 'macMenuEdit' entries to 'macButtonEdit'.

Signed-off-by: Roopesh Chander <roop@roopc.net>
5 years agoLocalization: macOS: Fix localization for 'Edit' button
Roopesh Chander [Sat, 11 Apr 2020 11:26:54 +0000 (16:56 +0530)] 
Localization: macOS: Fix localization for 'Edit' button

Signed-off-by: Roopesh Chander <roop@roopc.net>
5 years agoLocalization: Add German translation
Roopesh Chander [Sat, 11 Apr 2020 11:11:07 +0000 (16:41 +0530)] 
Localization: Add German translation

Signed-off-by: Roopesh Chander <roop@roopc.net>
5 years agoLocalization: Add Italian translation
Roopesh Chander [Sat, 11 Apr 2020 11:07:18 +0000 (16:37 +0530)] 
Localization: Add Italian translation

Signed-off-by: Roopesh Chander <roop@roopc.net>
5 years agoLocalization: Wire up Japanese translation
Roopesh Chander [Wed, 8 Apr 2020 07:41:08 +0000 (13:11 +0530)] 
Localization: Wire up Japanese translation

By adding the translated Localizable.strings to the Xcode project

Signed-off-by: Roopesh Chander <roop@roopc.net>
5 years agohighlighter: insist on 256-bit keys, not 257-bit or 258-bit
Jason A. Donenfeld [Sat, 4 Apr 2020 05:17:56 +0000 (23:17 -0600)] 
highlighter: insist on 256-bit keys, not 257-bit or 258-bit

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
5 years agoJapanese Translation
Eiji Tanioka [Sun, 23 Feb 2020 07:11:17 +0000 (16:11 +0900)] 
Japanese Translation

Translation for wireguard-apple. Checked on Xcode iOS simulator but not
all messages.

Signed-off-by: Eiji Tanioka <tanioka404@gmail.com>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
5 years agowireguard-go-bridge: use C string instead of gostring_t
Andrej Mihajlov [Fri, 7 Feb 2020 11:31:42 +0000 (12:31 +0100)] 
wireguard-go-bridge: use C string instead of gostring_t

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
5 years agoVersion bump 0.0.20200127-17
Jason A. Donenfeld [Mon, 27 Jan 2020 11:10:53 +0000 (12:10 +0100)] 
Version bump

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
5 years agowireguard-go-bridge: bump
Jason A. Donenfeld [Mon, 27 Jan 2020 11:10:21 +0000 (12:10 +0100)] 
wireguard-go-bridge: bump

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
5 years agoUpdate repo urls
Jason A. Donenfeld [Mon, 30 Dec 2019 10:54:13 +0000 (11:54 +0100)] 
Update repo urls

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>