diff --git a/Cargo.toml b/Cargo.toml index 4b9a53d..f768b72 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ resolver = "2" [workspace.package] edition = "2021" license = "BSL 1.1" -version = "0.3.8" +version = "0.3.9" [workspace.dependencies] anyhow = "1.0" diff --git a/ostp-flutter/pubspec.yaml b/ostp-flutter/pubspec.yaml index 35b8856..5269a02 100644 --- a/ostp-flutter/pubspec.yaml +++ b/ostp-flutter/pubspec.yaml @@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 0.3.8+21 +version: 0.3.9+22 environment: sdk: ^3.11.4 diff --git a/ostp-gui/src-tauri/Cargo.lock b/ostp-gui/src-tauri/Cargo.lock index 4b140bd..f3567b4 100644 --- a/ostp-gui/src-tauri/Cargo.lock +++ b/ostp-gui/src-tauri/Cargo.lock @@ -2665,7 +2665,7 @@ dependencies = [ [[package]] name = "ostp-client" -version = "0.3.8" +version = "0.3.9" dependencies = [ "anyhow", "base64 0.22.1", @@ -2700,7 +2700,7 @@ dependencies = [ [[package]] name = "ostp-core" -version = "0.3.8" +version = "0.3.9" dependencies = [ "anyhow", "byteorder", @@ -2742,7 +2742,7 @@ dependencies = [ [[package]] name = "ostp-tun" -version = "0.3.8" +version = "0.3.9" dependencies = [ "anyhow", "libc", diff --git a/ostp-gui/src-tauri/tauri.conf.json b/ostp-gui/src-tauri/tauri.conf.json index a65c1e4..a8bfde1 100644 --- a/ostp-gui/src-tauri/tauri.conf.json +++ b/ostp-gui/src-tauri/tauri.conf.json @@ -1,7 +1,7 @@ { "$schema": "https://schema.tauri.app/config/2", "productName": "ostp-gui", - "version": "0.3.8", + "version": "0.3.9", "identifier": "com.ospab.ostp", "build": { "frontendDist": "../src" diff --git a/ostp-server/src/config.rs b/ostp-server/src/config.rs index 2d5514a..def883c 100644 --- a/ostp-server/src/config.rs +++ b/ostp-server/src/config.rs @@ -2,7 +2,7 @@ use serde::{Deserialize, Serialize}; use crate::{api::ApiConfig, fallback::FallbackConfig, outbound::OutboundConfig, dns::DnsConfig}; #[derive(Debug, Deserialize, Serialize, Clone)] -#[serde(tag = "type", rename_all = "snake_case")] +#[serde(tag = "protocol", rename_all = "snake_case")] pub enum ServerInbound { Ostp { tag: String, @@ -82,8 +82,9 @@ pub struct TransportConfigRaw { } #[derive(Debug, Deserialize, Serialize, Clone)] -#[serde(tag = "type", rename_all = "snake_case")] +#[serde(tag = "protocol", rename_all = "snake_case")] pub enum ServerOutbound { + #[serde(rename = "socks5")] Socks { tag: String, server: String, diff --git a/ostp/src/main.rs b/ostp/src/main.rs index f229b8d..97e63a4 100644 --- a/ostp/src/main.rs +++ b/ostp/src/main.rs @@ -1407,6 +1407,7 @@ async fn run_app() -> Result<()> { {{ // Primary OSTP protocol listener "protocol": "ostp", + "tag": "ostp-in", "listen": "0.0.0.0", "port": 50000, "users": [ @@ -1425,6 +1426,7 @@ async fn run_app() -> Result<()> { {{ // Web Administration API "protocol": "api", + "tag": "api-in", "listen": "127.0.0.1", "port": 9090, "token": "YOUR_SECRET_TOKEN", @@ -1979,6 +1981,7 @@ fn cmd_migrate(config_path: &std::path::Path) -> Result<()> { let mut ostp_inbound = serde_json::json!({ "protocol": "ostp", + "tag": "ostp-in", "listen": host, "port": port, "users": users @@ -1993,6 +1996,7 @@ fn cmd_migrate(config_path: &std::path::Path) -> Result<()> { if let Some(api) = raw_json.get("api") { let mut api_inbound = api.clone(); api_inbound["protocol"] = serde_json::json!("api"); + api_inbound["tag"] = serde_json::json!("api-in"); let bind = api.get("bind").and_then(|b| b.as_str()).unwrap_or("127.0.0.1:9090"); let parts: Vec<&str> = bind.split(':').collect(); api_inbound["listen"] = serde_json::json!(parts.get(0).unwrap_or(&"127.0.0.1"));