fix: remove unused redir-port and tproxy-port on Windows (#3969)

Directly remove redir-port and tproxy-port configurations on Windows platform
This commit is contained in:
rebecca554owen
2025-07-04 12:27:59 +08:00
committed by GitHub
Unverified
parent 7d808ed798
commit 941921904c

View File

@@ -214,6 +214,12 @@ pub async fn enhance() -> (Mapping, Vec<String>, HashMap<String, ResultLog>) {
config.remove("port");
continue;
}
#[cfg(target_os = "windows")]
{
if key.as_str() == Some("redir-port") || key.as_str() == Some("tproxy-port") {
continue;
}
}
#[cfg(not(target_os = "windows"))]
{
if key.as_str() == Some("redir-port") && !redir_enabled {