diff options
| author | Joakim Hulthe <joakim.hulthe@mullvad.net> | 2025-08-05 13:07:10 +0200 |
|---|---|---|
| committer | Joakim Hulthe <joakim.hulthe@mullvad.net> | 2025-08-05 13:07:10 +0200 |
| commit | d71abf715b573e09451fb2ed0de3020a6cff44d6 (patch) | |
| tree | e6f9ea1ec94c2e9239a7248bb719bb6e7b33e2a3 | |
| parent | f367d4032bb36e1e3be449489f78feb7675dc954 (diff) | |
| parent | ab418067dba1bcf02861a8b197a2f7708d0dc0ae (diff) | |
| download | mullvadvpn-d71abf715b573e09451fb2ed0de3020a6cff44d6.tar.xz mullvadvpn-d71abf715b573e09451fb2ed0de3020a6cff44d6.zip | |
Merge branch 'boringtun-build-sh'
| -rw-r--r-- | Cargo.lock | 14 | ||||
| -rwxr-xr-x | build.sh | 13 | ||||
| -rw-r--r-- | talpid-wireguard/Cargo.toml | 2 |
3 files changed, 26 insertions, 3 deletions
diff --git a/Cargo.lock b/Cargo.lock index f6c6c26dfb..d9d9a990bb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -371,6 +371,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" [[package]] +name = "bitfield-struct" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3ca019570363e800b05ad4fd890734f28ac7b72f563ad8a35079efb793616f8" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.100", +] + +[[package]] name = "bitflags" version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -444,11 +455,12 @@ dependencies = [ [[package]] name = "boringtun" version = "0.6.0" -source = "git+https://github.com/mullvad/boringtun?rev=ad10b7b1aecc8bbd73925bf6c332f97f27923c77#ad10b7b1aecc8bbd73925bf6c332f97f27923c77" +source = "git+https://github.com/mullvad/boringtun?rev=58fda6d4040d59e32034cb214906ccde51a21e5a#58fda6d4040d59e32034cb214906ccde51a21e5a" dependencies = [ "aead", "async-trait", "base64 0.13.1", + "bitfield-struct", "blake2", "bytes", "chacha20poly1305", @@ -31,6 +31,8 @@ NOTARIZE="false" # If a macOS or Windows build should create an installer artifact working on both # x86 and arm64 UNIVERSAL="false" +# Use boringtun instead of wireguard-go +BORINGTUN="false" while [[ "$#" -gt 0 ]]; do case $1 in @@ -44,6 +46,7 @@ while [[ "$#" -gt 0 ]]; do fi UNIVERSAL="true" ;; + --boringtun) BORINGTUN="true";; *) log_error "Unknown parameter: $1" exit 1 @@ -74,6 +77,7 @@ fi NPM_PACK_ARGS+=(--host-target-triple "$HOST") + if [[ "$UNIVERSAL" == "true" ]]; then if [[ -n ${TARGETS:-""} ]]; then log_error "'TARGETS' and '--universal' cannot be specified simultaneously." @@ -232,6 +236,12 @@ function build { if [[ -n $specified_target ]]; then cargo_target_arg+=(--target="$specified_target") fi + + local cargo_features=() + if [[ "$BORINGTUN" == "true" ]]; then + cargo_features+=(--features boringtun) + fi + local cargo_crates_to_build=( -p mullvad-daemon --bin mullvad-daemon -p mullvad-cli --bin mullvad @@ -242,7 +252,8 @@ function build { if [[ ("$(uname -s)" == "Linux") ]]; then cargo_crates_to_build+=(-p mullvad-exclude --bin mullvad-exclude) fi - cargo build "${cargo_target_arg[@]}" "${CARGO_ARGS[@]}" "${cargo_crates_to_build[@]}" + + cargo build "${cargo_target_arg[@]}" "${cargo_features[@]}" "${CARGO_ARGS[@]}" "${cargo_crates_to_build[@]}" ################################################################################ # Move binaries to correct locations in dist-assets diff --git a/talpid-wireguard/Cargo.toml b/talpid-wireguard/Cargo.toml index a4f12408b6..9ad5c4e0b7 100644 --- a/talpid-wireguard/Cargo.toml +++ b/talpid-wireguard/Cargo.toml @@ -46,7 +46,7 @@ tokio-stream = { version = "0.1", features = ["io-util"] } optional = true features = ["device", "tun"] git = "https://github.com/mullvad/boringtun" -rev = "ad10b7b1aecc8bbd73925bf6c332f97f27923c77" +rev = "58fda6d4040d59e32034cb214906ccde51a21e5a" [target.'cfg(unix)'.dependencies] nix = { workspace = true, features = ["fs"] } |
