Remove Reality/XTLS from all UI components and TSX pages (Dashboard, Settings, Tools)

This commit is contained in:
ospab 2026-06-13 02:19:53 +03:00
parent 8fc61f986f
commit 2a24ac34d0
3 changed files with 10 additions and 45 deletions

View File

@ -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 # 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 # 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. # of the product and file versions while build-number is used as the build suffix.
version: 0.2.87+2 version: 0.2.90+5
environment: environment:
sdk: ^3.11.4 sdk: ^3.11.4

View File

@ -1,7 +1,7 @@
{ {
"$schema": "https://schema.tauri.app/config/2", "$schema": "https://schema.tauri.app/config/2",
"productName": "ostp-gui", "productName": "ostp-gui",
"version": "0.2.87", "version": "0.2.90",
"identifier": "com.ospab.ostp", "identifier": "com.ospab.ostp",
"build": { "build": {
"frontendDist": "../src" "frontendDist": "../src"

View File

@ -625,11 +625,9 @@ fn run_setup_wizard(config_path: &std::path::Path) -> Result<()> {
// Try import from link first // Try import from link first
let use_link = wizard_yn("Do you have a share link (ostp://...)?", false); let use_link = wizard_yn("Do you have a share link (ostp://...)?", false);
let (server, access_key, sni, transport_mode) = if use_link { let (server, access_key, sni, transport_mode) = if use_link {
let link = wizard_prompt("Paste link", "");
let url = url::Url::parse(&link).unwrap();
let mut p = url.query_pairs(); let mut p = url.query_pairs();
let sni = p.find(|(k, _)| k == "sni").map(|(_, v)| v.to_string()).unwrap_or_default(); let sni = p.find(|(k, _)| k == "sni").map(|(_, v): (&str, std::borrow::Cow<str>)| v.to_string()).unwrap_or_default();
let tm = p.find(|(k, _)| k == "type").map(|(_, v)| v.to_string()).unwrap_or("udp".to_string()); let tm = p.find(|(k, _)| k == "type").map(|(_, v): (&str, std::borrow::Cow<str>)| v.to_string()).unwrap_or("udp".to_string());
(url.host_str().unwrap().to_string() + ":" + &url.port().unwrap_or(50000).to_string(), url.username().to_string(), sni, tm) (url.host_str().unwrap().to_string() + ":" + &url.port().unwrap_or(50000).to_string(), url.username().to_string(), sni, tm)
} else { } else {
("127.0.0.1:50000".to_string(), "".to_string(), "".to_string(), "udp".to_string()) ("127.0.0.1:50000".to_string(), "".to_string(), "".to_string(), "udp".to_string())
@ -684,7 +682,7 @@ fn run_setup_wizard(config_path: &std::path::Path) -> Result<()> {
// Build and save config // Build and save config
let key_for_gen = generate_secure_key("hex"); // unused but needed for init template let key_for_gen = generate_secure_key("hex"); // unused but needed for init template
let effective_sni = sni; let effective_sni = sni;
let _ = key_for_gen; let _ = key_for_gen;
let client_json = serde_json::json!({ let client_json = serde_json::json!({
@ -1369,7 +1367,7 @@ async fn run_app() -> Result<()> {
"sessions": 1 "sessions": 1
}}, }},
"debug": false "debug": false
}}"#, key) }}"#, key, pub_key, sid)
}; };
if let Some(parent) = args.config.parent() { if let Some(parent) = args.config.parent() {
if !parent.as_os_str().is_empty() { if !parent.as_os_str().is_empty() {
@ -1388,30 +1386,13 @@ async fn run_app() -> Result<()> {
let mut link = format!("ostp://{}@{}:50000", key.key(), host); let mut link = format!("ostp://{}@{}:50000", key.key(), host);
let mut query_params = Vec::new(); let mut query_params = Vec::new();
query_params.push("type=udp".to_string());
if let Some(t) = &s.transport {
if let Some(mode) = &t.mode {
if mode == "uot" {
query_params.push("type=tcp".to_string());
} else {
query_params.push("type=udp".to_string());
}
}
if let Some(sni) = &t.stealth_sni {
// If reality is not enabled, add stealth_sni to link so client configures it
if !sni.is_empty() {
query_params.push(format!("sni={}", sni));
}
}
} else {
query_params.push("type=udp".to_string());
} }
if !query_params.is_empty() { if !query_params.is_empty() {
link.push('?'); link.push('?');
link.push_str(&query_params.join("&")); link.push_str(&query_params.join("&"));
}
println!("\n Share link for client distribution:"); println!("\n Share link for client distribution:");
println!(" {}", link); println!(" {}", link);
} }
@ -1458,23 +1439,7 @@ async fn run_app() -> Result<()> {
let mut link = format!("ostp://{}@{}:{}", key.key(), host, port); let mut link = format!("ostp://{}@{}:{}", key.key(), host, port);
let mut query_params = Vec::new(); let mut query_params = Vec::new();
query_params.push("type=udp".to_string());
if let Some(t) = &server_cfg.transport {
if let Some(mode) = &t.mode {
if mode == "uot" {
query_params.push("type=tcp".to_string());
} else {
query_params.push("type=udp".to_string());
}
}
if let Some(sni) = &t.stealth_sni {
if !sni.is_empty() {
query_params.push(format!("sni={}", sni));
}
}
} else {
query_params.push("type=udp".to_string());
} }
@ -1482,7 +1447,7 @@ async fn run_app() -> Result<()> {
if !query_params.is_empty() { if !query_params.is_empty() {
link.push('?'); link.push('?');
link.push_str(&query_params.join("&")); link.push_str(&query_params.join("&"));
}
println!(" [{}] {}", idx + 1, link); println!(" [{}] {}", idx + 1, link);
} }
return Ok(()); return Ok(());