mirror of
https://github.com/EasyTier/EasyTier.git
synced 2026-05-06 17:59:11 +00:00
update rust to 1.93 (#1865)
This commit is contained in:
@@ -186,7 +186,7 @@ jobs:
|
||||
fi
|
||||
|
||||
if [[ $OS =~ ^ubuntu.*$ && $TARGET =~ ^mips.*$ ]]; then
|
||||
cargo +nightly-2025-09-01 build -r --target $TARGET -Z build-std=std,panic_abort --package=easytier --features=jemalloc
|
||||
cargo +nightly-2026-02-02 build -r --target $TARGET -Z build-std=std,panic_abort --package=easytier --features=jemalloc
|
||||
else
|
||||
if [[ $OS =~ ^windows.*$ ]]; then
|
||||
SUFFIX=.exe
|
||||
@@ -228,8 +228,8 @@ jobs:
|
||||
|
||||
rustup set auto-self-update disable
|
||||
|
||||
rustup install 1.89
|
||||
rustup default 1.89
|
||||
rustup install 1.93
|
||||
rustup default 1.93
|
||||
|
||||
export CC=clang
|
||||
export CXX=clang++
|
||||
|
||||
@@ -31,8 +31,8 @@ fi
|
||||
|
||||
# see https://github.com/rust-lang/rustup/issues/3709
|
||||
rustup set auto-self-update disable
|
||||
rustup install 1.89
|
||||
rustup default 1.89
|
||||
rustup install 1.93
|
||||
rustup default 1.93
|
||||
|
||||
# mips/mipsel cannot add target from rustup, need compile by ourselves
|
||||
if [[ $OS =~ ^ubuntu.*$ && $TARGET =~ ^mips.*$ ]]; then
|
||||
@@ -44,8 +44,8 @@ if [[ $OS =~ ^ubuntu.*$ && $TARGET =~ ^mips.*$ ]]; then
|
||||
ar x libgcc.a _ctzsi2.o _clz.o _bswapsi2.o
|
||||
ar rcs libctz.a _ctzsi2.o _clz.o _bswapsi2.o
|
||||
|
||||
rustup toolchain install nightly-2025-09-01-x86_64-unknown-linux-gnu
|
||||
rustup component add rust-src --toolchain nightly-2025-09-01-x86_64-unknown-linux-gnu
|
||||
rustup toolchain install nightly-2026-02-02-x86_64-unknown-linux-gnu
|
||||
rustup component add rust-src --toolchain nightly-2026-02-02-x86_64-unknown-linux-gnu
|
||||
|
||||
# https://github.com/rust-lang/rust/issues/128808
|
||||
# remove it after Cargo or rustc fix this.
|
||||
|
||||
+3
-3
@@ -26,7 +26,7 @@ Thank you for your interest in contributing to EasyTier! This document provides
|
||||
#### Required Tools
|
||||
- Node.js v21 or higher
|
||||
- pnpm v9 or higher
|
||||
- Rust toolchain (version 1.89)
|
||||
- Rust toolchain (version 1.93)
|
||||
- LLVM and Clang
|
||||
- Protoc (Protocol Buffers compiler)
|
||||
|
||||
@@ -79,8 +79,8 @@ sudo apt install -y bridge-utils
|
||||
2. Install dependencies:
|
||||
```bash
|
||||
# Install Rust toolchain
|
||||
rustup install 1.89
|
||||
rustup default 1.89
|
||||
rustup install 1.93
|
||||
rustup default 1.93
|
||||
|
||||
# Install project dependencies
|
||||
pnpm -r install
|
||||
|
||||
+3
-3
@@ -34,7 +34,7 @@
|
||||
#### 必需工具
|
||||
- Node.js v21 或更高版本
|
||||
- pnpm v9 或更高版本
|
||||
- Rust 工具链(版本 1.89)
|
||||
- Rust 工具链(版本 1.93)
|
||||
- LLVM 和 Clang
|
||||
- Protoc(Protocol Buffers 编译器)
|
||||
|
||||
@@ -87,8 +87,8 @@ sudo apt install -y bridge-utils
|
||||
2. 安装依赖:
|
||||
```bash
|
||||
# 安装 Rust 工具链
|
||||
rustup install 1.89
|
||||
rustup default 1.89
|
||||
rustup install 1.93
|
||||
rustup default 1.93
|
||||
|
||||
# 安装项目依赖
|
||||
pnpm -r install
|
||||
|
||||
@@ -8,7 +8,7 @@ repository = "https://github.com/EasyTier/EasyTier"
|
||||
authors = ["kkrainbow"]
|
||||
keywords = ["vpn", "p2p", "network", "easytier"]
|
||||
categories = ["network-programming", "command-line-utilities"]
|
||||
rust-version = "1.89.0"
|
||||
rust-version = "1.93.0"
|
||||
license-file = "LICENSE"
|
||||
readme = "README.md"
|
||||
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ edition = "2021"
|
||||
authors = ["kkrainbow"]
|
||||
keywords = ["vpn", "p2p", "network", "easytier"]
|
||||
categories = ["network-programming", "command-line-utilities"]
|
||||
rust-version = "1.89.0"
|
||||
rust-version = "1.93.0"
|
||||
license-file = "LICENSE"
|
||||
readme = "README.md"
|
||||
|
||||
|
||||
@@ -636,12 +636,13 @@ impl ConfigLoader for TomlConfigLoader {
|
||||
|
||||
fn get_id(&self) -> uuid::Uuid {
|
||||
let mut locked_config = self.config.lock().unwrap();
|
||||
if locked_config.instance_id.is_none() {
|
||||
match locked_config.instance_id {
|
||||
Some(id) => id,
|
||||
None => {
|
||||
let id = uuid::Uuid::new_v4();
|
||||
locked_config.instance_id = Some(id);
|
||||
id
|
||||
} else {
|
||||
*locked_config.instance_id.as_ref().unwrap()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -484,18 +484,14 @@ impl StunNatTypeDetectResult {
|
||||
if self.public_ips().len() != 1
|
||||
|| self.usable_stun_resp_count() <= 1
|
||||
|| self.max_port() - self.min_port() > 15
|
||||
|| self.extra_bind_test.is_none()
|
||||
|| self
|
||||
.extra_bind_test
|
||||
.as_ref()
|
||||
.unwrap()
|
||||
.mapped_socket_addr
|
||||
.is_none()
|
||||
{
|
||||
NatType::Symmetric
|
||||
} else {
|
||||
let extra_bind_test = self.extra_bind_test.as_ref().unwrap();
|
||||
let extra_port = extra_bind_test.mapped_socket_addr.unwrap().port();
|
||||
} else if let Some(extra_bind_mapped) = self
|
||||
.extra_bind_test
|
||||
.as_ref()
|
||||
.and_then(|extra| extra.mapped_socket_addr)
|
||||
{
|
||||
let extra_port = extra_bind_mapped.port();
|
||||
|
||||
let max_port_diff = extra_port.saturating_sub(self.max_port());
|
||||
let min_port_diff = self.min_port().saturating_sub(extra_port);
|
||||
@@ -506,6 +502,8 @@ impl StunNatTypeDetectResult {
|
||||
} else {
|
||||
NatType::Symmetric
|
||||
}
|
||||
} else {
|
||||
NatType::Symmetric
|
||||
}
|
||||
} else {
|
||||
NatType::Unknown
|
||||
|
||||
@@ -1377,12 +1377,9 @@ impl PeerManager {
|
||||
.config
|
||||
.get_proxy_cidrs()
|
||||
.into_iter()
|
||||
.map(|x| {
|
||||
if x.mapped_cidr.is_none() {
|
||||
x.cidr.to_string()
|
||||
} else {
|
||||
format!("{}->{}", x.cidr, x.mapped_cidr.unwrap())
|
||||
}
|
||||
.map(|x| match x.mapped_cidr {
|
||||
None => x.cidr.to_string(),
|
||||
Some(mapped) => format!("{}->{}", x.cidr, mapped),
|
||||
})
|
||||
.collect(),
|
||||
hostname: self.global_ctx.get_hostname(),
|
||||
|
||||
@@ -2214,7 +2214,8 @@ impl PeerRouteServiceImpl {
|
||||
ret, sync_route_info_req, session, self.global_ctx.network, next_last_sync_succ_timestamp
|
||||
);
|
||||
|
||||
if let Err(e) = &ret {
|
||||
match ret.as_ref() {
|
||||
Err(e) => {
|
||||
tracing::error!(
|
||||
?ret,
|
||||
?my_peer_id,
|
||||
@@ -2225,10 +2226,9 @@ impl PeerRouteServiceImpl {
|
||||
session
|
||||
.need_sync_initiator_info
|
||||
.store(true, Ordering::Relaxed);
|
||||
} else {
|
||||
let resp = ret.as_ref().unwrap();
|
||||
if resp.error.is_some() {
|
||||
let err = resp.error.unwrap();
|
||||
}
|
||||
Ok(resp) => {
|
||||
if let Some(err) = resp.error {
|
||||
if err == Error::DuplicatePeerId as i32 {
|
||||
if !self.global_ctx.get_feature_flags().is_public_server {
|
||||
panic!("duplicate peer id");
|
||||
@@ -2252,18 +2252,19 @@ impl PeerRouteServiceImpl {
|
||||
session.update_dst_saved_peer_info_version(peer_infos, dst_peer_id);
|
||||
}
|
||||
|
||||
// Update session saved versions based on the connection info format used
|
||||
if let Some(conn_info) = &conn_info {
|
||||
session.update_dst_saved_conn_info_version(conn_info, dst_peer_id);
|
||||
}
|
||||
|
||||
if let Some(foreign_network) = &foreign_network {
|
||||
session.update_dst_saved_foreign_network_version(foreign_network, dst_peer_id);
|
||||
session
|
||||
.update_dst_saved_foreign_network_version(foreign_network, dst_peer_id);
|
||||
}
|
||||
|
||||
session.update_last_sync_succ_timestamp(next_last_sync_succ_timestamp);
|
||||
}
|
||||
}
|
||||
}
|
||||
false
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
allowUnfree = true;
|
||||
};
|
||||
};
|
||||
rustVersion = "1.89.0";
|
||||
rustVersion = "1.93.0";
|
||||
makeRust =
|
||||
features:
|
||||
let
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#![allow(dead_code)]
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Debug, Deserialize, Serialize)]
|
||||
|
||||
Reference in New Issue
Block a user