Revert "chore: change default port to 7897"
This reverts commit 4ec73ef1c3.
This commit is contained in:
@@ -27,7 +27,7 @@ impl IClashTemp {
|
||||
map.insert(
|
||||
"mixed-port".into(),
|
||||
match cfg!(feature = "default-meta") {
|
||||
false => 7897.into(),
|
||||
false => 7890.into(),
|
||||
true => 7898.into(),
|
||||
},
|
||||
);
|
||||
@@ -37,7 +37,7 @@ impl IClashTemp {
|
||||
map.insert(
|
||||
"external-controller".into(),
|
||||
match cfg!(feature = "default-meta") {
|
||||
false => "127.0.0.1:9097".into(),
|
||||
false => "127.0.0.1:9090".into(),
|
||||
true => "127.0.0.1:9098".into(),
|
||||
},
|
||||
);
|
||||
@@ -101,9 +101,9 @@ impl IClashTemp {
|
||||
Value::Number(val_num) => val_num.as_u64().map(|u| u as u16),
|
||||
_ => None,
|
||||
})
|
||||
.unwrap_or(7897);
|
||||
.unwrap_or(7890);
|
||||
if port == 0 {
|
||||
port = 7897;
|
||||
port = 7890;
|
||||
}
|
||||
port
|
||||
}
|
||||
@@ -126,7 +126,7 @@ impl IClashTemp {
|
||||
}
|
||||
None => None,
|
||||
})
|
||||
.unwrap_or("127.0.0.1:9097".into())
|
||||
.unwrap_or("127.0.0.1:9090".into())
|
||||
}
|
||||
|
||||
pub fn guard_client_ctrl(config: &Mapping) -> String {
|
||||
@@ -138,7 +138,7 @@ impl IClashTemp {
|
||||
}
|
||||
socket.to_string()
|
||||
}
|
||||
Err(_) => "127.0.0.1:9097".into(),
|
||||
Err(_) => "127.0.0.1:9090".into(),
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -173,12 +173,12 @@ fn test_clash_info() {
|
||||
|
||||
assert_eq!(
|
||||
IClashTemp(IClashTemp::guard(Mapping::new())).get_client_info(),
|
||||
get_result(7897, "127.0.0.1:9097")
|
||||
get_result(7890, "127.0.0.1:9090")
|
||||
);
|
||||
|
||||
assert_eq!(get_case("", ""), get_result(7897, "127.0.0.1:9097"));
|
||||
assert_eq!(get_case("", ""), get_result(7890, "127.0.0.1:9090"));
|
||||
|
||||
assert_eq!(get_case(65537, ""), get_result(1, "127.0.0.1:9097"));
|
||||
assert_eq!(get_case(65537, ""), get_result(1, "127.0.0.1:9090"));
|
||||
|
||||
assert_eq!(
|
||||
get_case(8888, "127.0.0.1:8888"),
|
||||
@@ -187,7 +187,7 @@ fn test_clash_info() {
|
||||
|
||||
assert_eq!(
|
||||
get_case(8888, " :98888 "),
|
||||
get_result(8888, "127.0.0.1:9097")
|
||||
get_result(8888, "127.0.0.1:9090")
|
||||
);
|
||||
|
||||
assert_eq!(
|
||||
@@ -212,7 +212,7 @@ fn test_clash_info() {
|
||||
|
||||
assert_eq!(
|
||||
get_case(8888, "192.168.1.1:80800"),
|
||||
get_result(8888, "127.0.0.1:9097")
|
||||
get_result(8888, "127.0.0.1:9090")
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -146,7 +146,7 @@ impl IVerge {
|
||||
enable_silent_start: Some(false),
|
||||
enable_system_proxy: Some(false),
|
||||
enable_random_port: Some(false),
|
||||
verge_mixed_port: Some(7897),
|
||||
verge_mixed_port: Some(7890),
|
||||
enable_proxy_guard: Some(false),
|
||||
proxy_guard_duration: Some(30),
|
||||
auto_close_connection: Some(true),
|
||||
|
||||
@@ -338,7 +338,7 @@ async fn update_core_config() -> Result<()> {
|
||||
|
||||
/// copy env variable
|
||||
pub fn copy_clash_env(app_handle: &AppHandle, option: &str) {
|
||||
let port = { Config::verge().latest().verge_mixed_port.unwrap_or(7897) };
|
||||
let port = { Config::verge().latest().verge_mixed_port.unwrap_or(7890) };
|
||||
let http_proxy = format!("http://127.0.0.1:{}", port);
|
||||
let socks5_proxy = format!("socks5://127.0.0.1:{}", port);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user