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