mirror of https://github.com/ospab/ostp.git
Fix DNS Prober real RTT logic, fix Flutter DNS proxy UI, fix ServerInbound struct tags and migrator
This commit is contained in:
parent
0394971791
commit
8820a42359
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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"));
|
||||
|
|
|
|||
Loading…
Reference in New Issue