bump version to v2.1.1 (#533)
Some checks failed
EasyTier Core / pre_job (push) Has been cancelled
EasyTier GUI / pre_job (push) Has been cancelled
EasyTier Mobile / pre_job (push) Has been cancelled
EasyTier Test / pre_job (push) Has been cancelled
EasyTier Core / build (freebsd-13.2-x86_64, 13.2, ubuntu-22.04, x86_64-unknown-freebsd) (push) Has been cancelled
EasyTier Core / build (linux-aarch64, ubuntu-22.04, aarch64-unknown-linux-musl) (push) Has been cancelled
EasyTier Core / build (linux-arm, ubuntu-22.04, arm-unknown-linux-musleabi) (push) Has been cancelled
EasyTier Core / build (linux-armhf, ubuntu-22.04, arm-unknown-linux-musleabihf) (push) Has been cancelled
EasyTier Core / build (linux-armv7, ubuntu-22.04, armv7-unknown-linux-musleabi) (push) Has been cancelled
EasyTier Core / build (linux-armv7hf, ubuntu-22.04, armv7-unknown-linux-musleabihf) (push) Has been cancelled
EasyTier Core / build (linux-mips, ubuntu-22.04, mips-unknown-linux-musl) (push) Has been cancelled
EasyTier Core / build (linux-mipsel, ubuntu-22.04, mipsel-unknown-linux-musl) (push) Has been cancelled
EasyTier Core / build (linux-x86_64, ubuntu-22.04, x86_64-unknown-linux-musl) (push) Has been cancelled
EasyTier Core / build (macos-aarch64, macos-latest, aarch64-apple-darwin) (push) Has been cancelled
EasyTier Core / build (macos-x86_64, macos-latest, x86_64-apple-darwin) (push) Has been cancelled
EasyTier Core / build (windows-arm64, windows-latest, aarch64-pc-windows-msvc) (push) Has been cancelled
EasyTier Core / build (windows-x86_64, windows-latest, x86_64-pc-windows-msvc) (push) Has been cancelled
EasyTier Core / core-result (push) Has been cancelled
EasyTier GUI / build-gui (linux-aarch64, aarch64-unknown-linux-gnu, ubuntu-22.04, aarch64-unknown-linux-musl) (push) Has been cancelled
EasyTier GUI / build-gui (linux-x86_64, x86_64-unknown-linux-gnu, ubuntu-22.04, x86_64-unknown-linux-musl) (push) Has been cancelled
EasyTier GUI / build-gui (macos-aarch64, aarch64-apple-darwin, macos-latest, aarch64-apple-darwin) (push) Has been cancelled
EasyTier GUI / build-gui (macos-x86_64, x86_64-apple-darwin, macos-latest, x86_64-apple-darwin) (push) Has been cancelled
EasyTier GUI / build-gui (windows-arm64, aarch64-pc-windows-msvc, windows-latest, aarch64-pc-windows-msvc) (push) Has been cancelled
EasyTier GUI / build-gui (windows-x86_64, x86_64-pc-windows-msvc, windows-latest, x86_64-pc-windows-msvc) (push) Has been cancelled
EasyTier GUI / gui-result (push) Has been cancelled
EasyTier Mobile / build-mobile (android, ubuntu-22.04, android) (push) Has been cancelled
EasyTier Mobile / mobile-result (push) Has been cancelled
EasyTier Test / test (push) Has been cancelled

This commit is contained in:
Sijie.Sun
2024-12-24 10:40:57 -05:00
committed by GitHub
parent 2f4a097787
commit 34e4e907a9
12 changed files with 55 additions and 30 deletions

View File

@@ -21,7 +21,7 @@ on:
version: version:
description: 'Version for this release' description: 'Version for this release'
type: string type: string
default: 'v2.1.0' default: 'v2.1.1'
required: true required: true
make_latest: make_latest:
description: 'Mark this release as latest' description: 'Mark this release as latest'

4
Cargo.lock generated
View File

@@ -1830,7 +1830,7 @@ checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125"
[[package]] [[package]]
name = "easytier" name = "easytier"
version = "2.1.0" version = "2.1.1"
dependencies = [ dependencies = [
"aes-gcm", "aes-gcm",
"anyhow", "anyhow",
@@ -1926,7 +1926,7 @@ dependencies = [
[[package]] [[package]]
name = "easytier-gui" name = "easytier-gui"
version = "2.1.0" version = "2.1.1"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"chrono", "chrono",

View File

@@ -1,7 +1,7 @@
{ {
"name": "easytier-gui", "name": "easytier-gui",
"type": "module", "type": "module",
"version": "2.1.0", "version": "2.1.1",
"private": true, "private": true,
"packageManager": "pnpm@9.12.1+sha512.e5a7e52a4183a02d5931057f7a0dbff9d5e9ce3161e33fa68ae392125b79282a8a8a470a51dfc8a0ed86221442eb2fb57019b0990ed24fab519bf0e1bc5ccfc4", "packageManager": "pnpm@9.12.1+sha512.e5a7e52a4183a02d5931057f7a0dbff9d5e9ce3161e33fa68ae392125b79282a8a8a470a51dfc8a0ed86221442eb2fb57019b0990ed24fab519bf0e1bc5ccfc4",
"scripts": { "scripts": {

View File

@@ -1,6 +1,6 @@
[package] [package]
name = "easytier-gui" name = "easytier-gui"
version = "2.1.0" version = "2.1.1"
description = "EasyTier GUI" description = "EasyTier GUI"
authors = ["you"] authors = ["you"]
edition = "2021" edition = "2021"

View File

@@ -17,7 +17,7 @@
"createUpdaterArtifacts": false "createUpdaterArtifacts": false
}, },
"productName": "easytier-gui", "productName": "easytier-gui",
"version": "2.1.0", "version": "2.1.1",
"identifier": "com.kkrainbow.easytier", "identifier": "com.kkrainbow.easytier",
"plugins": {}, "plugins": {},
"app": { "app": {

View File

@@ -1,14 +1,13 @@
pub mod session; pub mod session;
pub mod storage; pub mod storage;
use std::{collections::BTreeMap, str::FromStr, sync::Arc}; use std::sync::Arc;
use dashmap::DashMap; use dashmap::DashMap;
use easytier::{ use easytier::{
common::scoped_task::ScopedTask, proto::web::HeartbeatRequest, tunnel::TunnelListener, common::scoped_task::ScopedTask, proto::web::HeartbeatRequest, tunnel::TunnelListener,
}; };
use session::Session; use session::Session;
use sqlx::types::chrono;
use storage::{Storage, StorageToken}; use storage::{Storage, StorageToken};
use crate::db::Db; use crate::db::Db;

View File

@@ -4,8 +4,8 @@ pub mod entity;
use entity::user_running_network_configs; use entity::user_running_network_configs;
use sea_orm::{ use sea_orm::{
prelude::Expr, sea_query::OnConflict, ActiveModelTrait, ColumnTrait as _, DatabaseConnection, prelude::Expr, sea_query::OnConflict, ColumnTrait as _, DatabaseConnection, DbErr, EntityTrait,
DbErr, EntityTrait, QueryFilter as _, SqlxSqliteConnector, TransactionTrait as _, QueryFilter as _, SqlxSqliteConnector, TransactionTrait as _,
}; };
use sea_orm_migration::MigratorTrait as _; use sea_orm_migration::MigratorTrait as _;
use sqlx::{migrate::MigrateDatabase as _, types::chrono, Sqlite, SqlitePool}; use sqlx::{migrate::MigrateDatabase as _, types::chrono, Sqlite, SqlitePool};

View File

@@ -1,6 +1,6 @@
use std::sync::Arc; use std::sync::Arc;
use axum::extract::{Path, Query}; use axum::extract::Path;
use axum::http::StatusCode; use axum::http::StatusCode;
use axum::routing::{delete, post}; use axum::routing::{delete, post};
use axum::{extract::State, routing::get, Json, Router}; use axum::{extract::State, routing::get, Json, Router};

View File

@@ -3,7 +3,7 @@ name = "easytier"
description = "A full meshed p2p VPN, connecting all your devices in one network with one command." description = "A full meshed p2p VPN, connecting all your devices in one network with one command."
homepage = "https://github.com/EasyTier/EasyTier" homepage = "https://github.com/EasyTier/EasyTier"
repository = "https://github.com/EasyTier/EasyTier" repository = "https://github.com/EasyTier/EasyTier"
version = "2.1.0" version = "2.1.1"
edition = "2021" edition = "2021"
authors = ["kkrainbow"] authors = ["kkrainbow"]
keywords = ["vpn", "p2p", "network", "easytier"] keywords = ["vpn", "p2p", "network", "easytier"]

View File

@@ -38,24 +38,21 @@ impl<L: TunnelListener + 'static> StandAloneServer<L> {
&self.registry &self.registry
} }
pub async fn serve(&mut self) -> Result<(), Error> { async fn serve_loop(
let tasks = self.tasks.clone(); listener: &mut L,
let mut listener = self.listener.take().unwrap(); inflight: Arc<AtomicU32>,
let registry = self.registry.clone(); registry: Arc<ServiceRegistry>,
tasks: Arc<Mutex<JoinSet<()>>>,
join_joinset_background(tasks.clone(), "standalone server tasks".to_string()); ) -> Result<(), Error> {
listener listener
.listen() .listen()
.await .await
.with_context(|| "failed to listen")?; .with_context(|| "failed to listen")?;
let inflight_server = self.inflight_server.clone(); loop {
let tunnel = listener.accept().await?;
self.tasks.lock().unwrap().spawn(async move {
while let Ok(tunnel) = listener.accept().await {
let registry = registry.clone(); let registry = registry.clone();
let inflight_server = inflight_server.clone(); let inflight_server = inflight.clone();
inflight_server.fetch_add(1, std::sync::atomic::Ordering::Relaxed); inflight_server.fetch_add(1, std::sync::atomic::Ordering::Relaxed);
tasks.lock().unwrap().spawn(async move { tasks.lock().unwrap().spawn(async move {
let server = let server =
@@ -66,7 +63,33 @@ impl<L: TunnelListener + 'static> StandAloneServer<L> {
inflight_server.fetch_sub(1, std::sync::atomic::Ordering::Relaxed); inflight_server.fetch_sub(1, std::sync::atomic::Ordering::Relaxed);
}); });
} }
panic!("standalone server listener exit"); }
pub async fn serve(&mut self) -> Result<(), Error> {
let tasks = self.tasks.clone();
let mut listener = self.listener.take().unwrap();
let registry = self.registry.clone();
join_joinset_background(tasks.clone(), "standalone server tasks".to_string());
let inflight_server = self.inflight_server.clone();
self.tasks.lock().unwrap().spawn(async move {
loop {
let ret = Self::serve_loop(
&mut listener,
inflight_server.clone(),
registry.clone(),
tasks.clone(),
)
.await;
if let Err(e) = ret {
tracing::error!(?e, url = ?listener.local_url(), "serve_loop exit unexpectedly");
println!("standalone serve_loop exit unexpectedly: {:?}", e);
}
tokio::time::sleep(Duration::from_secs(1)).await;
}
}); });
Ok(()) Ok(())

View File

@@ -287,6 +287,8 @@ async fn standalone_rpc_test() {
server.registry().register(service, "test"); server.registry().register(service, "test");
server.serve().await.unwrap(); server.serve().await.unwrap();
tokio::time::sleep(std::time::Duration::from_millis(100)).await;
let mut client = StandAloneClient::new(TcpTunnelConnector::new( let mut client = StandAloneClient::new(TcpTunnelConnector::new(
"tcp://127.0.0.1:33455".parse().unwrap(), "tcp://127.0.0.1:33455".parse().unwrap(),
)); ));

View File

@@ -33,6 +33,7 @@ impl TcpTunnelListener {
#[async_trait] #[async_trait]
impl TunnelListener for TcpTunnelListener { impl TunnelListener for TcpTunnelListener {
async fn listen(&mut self) -> Result<(), TunnelError> { async fn listen(&mut self) -> Result<(), TunnelError> {
self.listener = None;
let addr = check_scheme_and_get_socket_addr::<SocketAddr>(&self.addr, "tcp")?; let addr = check_scheme_and_get_socket_addr::<SocketAddr>(&self.addr, "tcp")?;
let socket2_socket = socket2::Socket::new( let socket2_socket = socket2::Socket::new(