From 0fa08879b5fdfd01990a8115b40d9f4729cbb90d Mon Sep 17 00:00:00 2001 From: Thomas Yau Date: Mon, 31 Mar 2025 14:51:15 +0800 Subject: [PATCH 1/4] workspace: bump wolfssl to support build x86_64 tvOS --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index efeb6fa3..d976410f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2830,7 +2830,7 @@ dependencies = [ [[package]] name = "wolfssl" version = "3.0.0" -source = "git+https://github.com/expressvpn/wolfssl-rs#77cd052a8dec0f9b9adecb91045cdce84aed3a53" +source = "git+https://github.com/expressvpn/wolfssl-rs#c7dad3f0df4b46de1477bc4863e5ce33406d6f96" dependencies = [ "bytes", "log", @@ -2841,7 +2841,7 @@ dependencies = [ [[package]] name = "wolfssl-sys" version = "2.0.0" -source = "git+https://github.com/expressvpn/wolfssl-rs#77cd052a8dec0f9b9adecb91045cdce84aed3a53" +source = "git+https://github.com/expressvpn/wolfssl-rs#c7dad3f0df4b46de1477bc4863e5ce33406d6f96" dependencies = [ "autotools", "bindgen", From 5c2b16397c1ca1c69a11815f6342c98b112cdf95 Mon Sep 17 00:00:00 2001 From: Thomas Yau Date: Thu, 27 Mar 2025 15:41:00 +0800 Subject: [PATCH 2/4] app-utils: use patched fs-mistrust to support tvOS Note: Gitlab can only make reference to commits on the main branch only, so we are using the commit hash for the merge request on main https://gitlab.torproject.org/tpo/core/arti/-/commit/0f13b7a0e19b3fae163e76c8ade6499244abf834 --- Cargo.lock | 3 +-- deny.toml | 1 + lightway-app-utils/Cargo.toml | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d976410f..9d1a625b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -807,8 +807,7 @@ checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" [[package]] name = "fs-mistrust" version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24bebe6ec0d7bd8eab0ea285dcf5dd9bcb7c334e47259a6a7c486bfdf0e0f1dd" +source = "git+https://gitlab.torproject.org/tpo/core/arti.git?rev=0f13b7a0e19b3fae163e76c8ade6499244abf834#0f13b7a0e19b3fae163e76c8ade6499244abf834" dependencies = [ "derive_builder_fork_arti", "libc", diff --git a/deny.toml b/deny.toml index ccbf24db..f5964b86 100644 --- a/deny.toml +++ b/deny.toml @@ -65,6 +65,7 @@ unknown-git = "deny" allow-registry = ["https://github.com/rust-lang/crates.io-index"] allow-git = [ "https://github.com/expressvpn/wolfssl-rs", + "https://gitlab.torproject.org/tpo/core/arti" ] # See https://github.com/briansmith/ring/blob/main/LICENSE Ring diff --git a/lightway-app-utils/Cargo.toml b/lightway-app-utils/Cargo.toml index 2eef997b..0b21b4e3 100644 --- a/lightway-app-utils/Cargo.toml +++ b/lightway-app-utils/Cargo.toml @@ -21,7 +21,9 @@ workspace = true anyhow.workspace = true bytes.workspace = true clap.workspace = true -fs-mistrust = { version = "0.9.0", default-features = false } +# Gitlab can only make reference to commits on the main branch only, so we are using the commit hash for the merge request on main +# https://gitlab.torproject.org/tpo/core/arti/-/commit/0f13b7a0e19b3fae163e76c8ade6499244abf834 +fs-mistrust = { git = "https://gitlab.torproject.org/tpo/core/arti.git", rev = "0f13b7a0e19b3fae163e76c8ade6499244abf834", default-features = false } humantime = "2.1.0" io-uring = { version = "0.7.0", optional = true } ipnet.workspace = true From 50dd7f2310e1d44b22d38c2270676bb851b7a82a Mon Sep 17 00:00:00 2001 From: Thomas Yau Date: Mon, 31 Mar 2025 11:34:30 +0800 Subject: [PATCH 3/4] app-utils: update rust-tun to support tvOS --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9d1a625b..b7571eee 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2515,9 +2515,9 @@ dependencies = [ [[package]] name = "tun" -version = "0.7.13" +version = "0.7.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9298ac5c7f0076908d7a168c634bf4867b4a7d5725eb6356863f8640c6c35ef1" +checksum = "528d712da3fafc9bf7ab8795244cb0197e4bfaa506e26280810f9ae327e20d6a" dependencies = [ "bytes", "cfg-if", From 96ba54240c393d20ef849e92a98fbd6e2fcb9e64 Mon Sep 17 00:00:00 2001 From: Thomas Yau Date: Mon, 31 Mar 2025 12:06:46 +0800 Subject: [PATCH 4/4] workspace: use PR#128 from ctrlc to support tvOS Use https://github.com/Detegr/rust-ctrlc/pull/128 to support building or compiling on tvOS. --- Cargo.lock | 3 +-- Cargo.toml | 3 ++- deny.toml | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b7571eee..3ad57f5a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -509,8 +509,7 @@ dependencies = [ [[package]] name = "ctrlc" version = "3.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90eeab0aa92f3f9b4e87f258c72b139c207d251f9cbc1080a0086b86a8870dd3" +source = "git+https://github.com/Detegr/rust-ctrlc.git?rev=refs%2Fpull%2F128%2Fhead#45d21ff2778075dfef46fd37821d1a8fdc239638" dependencies = [ "nix", "windows-sys 0.59.0", diff --git a/Cargo.toml b/Cargo.toml index 8822df5c..e7be3d83 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -37,7 +37,8 @@ async-trait = "0.1.77" bytes = "1.5.0" bytesize = { version = "1.3.0", features = ["serde"] } clap = { version = "4.4.7", features = ["derive"] } -ctrlc = { version = "3.4.2", features = ["termination"] } +# ctrlc = { version = "3.4.2", features = ["termination"] } +ctrlc = { git = "https://github.com/Detegr/rust-ctrlc.git", rev = "refs/pull/128/head"} delegate = "0.12.0" educe = { version = "0.6.0", default-features = false, features = ["Debug"] } ipnet = { version = "2.8.0", features = ["serde"]} diff --git a/deny.toml b/deny.toml index f5964b86..5ba1ebbb 100644 --- a/deny.toml +++ b/deny.toml @@ -65,7 +65,8 @@ unknown-git = "deny" allow-registry = ["https://github.com/rust-lang/crates.io-index"] allow-git = [ "https://github.com/expressvpn/wolfssl-rs", - "https://gitlab.torproject.org/tpo/core/arti" + "https://gitlab.torproject.org/tpo/core/arti", + "https://github.com/Detegr/rust-ctrlc" ] # See https://github.com/briansmith/ring/blob/main/LICENSE Ring