feat: guard the mixed-port and external-controller

This commit is contained in:
GyDi
2022-11-22 14:49:37 +08:00
parent fe8168784f
commit f95ddd594e
6 changed files with 169 additions and 139 deletions

View File

@@ -156,7 +156,7 @@ pub async fn patch_clash(patch: Mapping) -> Result<()> {
if let Some(port) = mixed_port.clone().unwrap().as_u64() {
if !port_scanner::local_port_available(port as u16) {
Config::clash().discard();
bail!("the port not available");
bail!("port already in use");
}
}
}