* 🐞 fix: 修复 1.80 nightly 编译错误错误

TODO: need fork boringtun and publish to crates.io before publishing easytier 

issues: https://github.com/KKRainbow/EasyTier/issues/74
This commit is contained in:
m1m1sha 2024-05-05 11:46:10 +08:00 committed by GitHub
parent 714667fdce
commit 0af32526f7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 17 additions and 21 deletions

17
Cargo.lock generated
View File

@ -387,8 +387,7 @@ dependencies = [
[[package]] [[package]]
name = "boringtun" name = "boringtun"
version = "0.6.0" version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "git+https://github.com/cloudflare/boringtun.git#f672bb6c1e1e371240a8d151f15854687eb740bb"
checksum = "751787b019c674b9ac353f4eaa285e6711c21badb421cd8c199bf2c83b727f29"
dependencies = [ dependencies = [
"aead", "aead",
"base64 0.13.1", "base64 0.13.1",
@ -402,7 +401,7 @@ dependencies = [
"nix 0.25.1", "nix 0.25.1",
"parking_lot", "parking_lot",
"rand_core 0.6.4", "rand_core 0.6.4",
"ring 0.16.20", "ring 0.17.8",
"tracing", "tracing",
"untrusted 0.9.0", "untrusted 0.9.0",
"x25519-dalek", "x25519-dalek",
@ -978,9 +977,9 @@ checksum = "b365fabc795046672053e29c954733ec3b05e4be654ab130fe8f1f94d7051f35"
[[package]] [[package]]
name = "curve25519-dalek" name = "curve25519-dalek"
version = "4.0.0-rc.3" version = "4.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "436ace70fc06e06f7f689d2624dc4e2f0ea666efb5aa704215f7249ae6e047a7" checksum = "0a677b8922c94e01bdbb12126b0bc852f00447528dee1782229af9c720c3f348"
dependencies = [ dependencies = [
"cfg-if", "cfg-if",
"cpufeatures", "cpufeatures",
@ -1449,9 +1448,9 @@ dependencies = [
[[package]] [[package]]
name = "fiat-crypto" name = "fiat-crypto"
version = "0.1.20" version = "0.2.8"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e825f6987101665dea6ec934c09ec6d721de7bc1bf92248e1d5810c8cd636b77" checksum = "38793c55593b33412e3ae40c2c9781ffaa6f438f6f8c10f24e71846fbd7ae01e"
[[package]] [[package]]
name = "field-offset" name = "field-offset"
@ -6399,9 +6398,9 @@ dependencies = [
[[package]] [[package]]
name = "x25519-dalek" name = "x25519-dalek"
version = "2.0.0-rc.3" version = "2.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec7fae07da688e17059d5886712c933bb0520f15eff2e09cfa18e30968f4e63a" checksum = "c7e468321c81fb07fa7f4c636c3972b9100f0346e5b6a9f2bd0603a52f7ed277"
dependencies = [ dependencies = [
"curve25519-dalek", "curve25519-dalek",
"rand_core 0.6.4", "rand_core 0.6.4",

View File

@ -125,7 +125,7 @@ network-interface = "1.1.1"
pathfinding = "4.9.1" pathfinding = "4.9.1"
# for encryption # for encryption
boringtun = { version = "0.6.0", optional = true } boringtun = { git = "https://github.com/cloudflare/boringtun.git", optional = true }
ring = { version = "0.16", optional = true } ring = { version = "0.16", optional = true }
bitflags = "2.5" bitflags = "2.5"
aes-gcm = { version = "0.10.3", optional = true } aes-gcm = { version = "0.10.3", optional = true }

View File

@ -392,17 +392,14 @@ impl WgPeer {
let data = WgPeerData { let data = WgPeerData {
udp: self.udp.clone(), udp: self.udp.clone(),
endpoint: self.endpoint, endpoint: self.endpoint,
tunn: Arc::new(Mutex::new( tunn: Arc::new(Mutex::new(Tunn::new(
Tunn::new(
self.config.my_secret_key.clone(), self.config.my_secret_key.clone(),
self.config.peer_public_key.clone(), self.config.peer_public_key.clone(),
None, None,
None, None,
rand::thread_rng().next_u32(), rand::thread_rng().next_u32(),
None, None,
) ))),
.unwrap(),
)),
wg_type: self.config.wg_type.clone(), wg_type: self.config.wg_type.clone(),
stopped: Arc::new(AtomicBool::new(false)), stopped: Arc::new(AtomicBool::new(false)),
}; };