fix: make port change set to system proxy immediately (#256)

This commit is contained in:
Lai Zn
2024-01-18 09:37:46 +08:00
committed by GitHub
parent 8142e1be49
commit 69ae86aba8
2 changed files with 8 additions and 1 deletions

View File

@@ -123,6 +123,12 @@ impl Sysopt {
sysproxy.enable = enable;
sysproxy.bypass = bypass.unwrap_or(DEFAULT_BYPASS.into());
let port = Config::verge()
.latest()
.verge_mixed_port
.unwrap_or(Config::clash().data().get_mixed_port());
sysproxy.port = port;
if registry_mode {
#[cfg(windows)]
sysproxy.set_system_proxy_with_registry()?;