mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-04-13 05:20:28 +08:00
fix: avoid proxy in website tests when system proxy is off
This commit is contained in:
parent
b21bad334b
commit
0dcef80dc8
@ -120,13 +120,14 @@ pub async fn test_delay(url: String) -> anyhow::Result<u32> {
|
||||
let port = parsed.port().unwrap_or(if is_https { 443 } else { 80 });
|
||||
|
||||
let verge = Config::verge().await.latest_arc();
|
||||
let proxy_port = if verge.enable_tun_mode.unwrap_or(false) {
|
||||
None
|
||||
} else {
|
||||
let proxy_enabled = verge.enable_system_proxy.unwrap_or(false) || verge.enable_tun_mode.unwrap_or(false);
|
||||
let proxy_port = if proxy_enabled {
|
||||
Some(match verge.verge_mixed_port {
|
||||
Some(p) => p,
|
||||
None => Config::clash().await.data_arc().get_mixed_port(),
|
||||
})
|
||||
} else {
|
||||
None
|
||||
};
|
||||
|
||||
tokio::time::timeout(Duration::from_secs(10), async {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user