diff --git a/clashN/clashN/Handler/DownloadHandle.cs b/clashN/clashN/Handler/DownloadHandle.cs index d150a59..68ee082 100644 --- a/clashN/clashN/Handler/DownloadHandle.cs +++ b/clashN/clashN/Handler/DownloadHandle.cs @@ -75,9 +75,11 @@ public void DownloadFileAsync(string url, bool blProxy, int downloadTimeout) try { Utils.SetSecurityProtocol(LazyConfig.Instance.Config.EnableSecurityProtocolTls13); + var webProxy = GetWebProxy(blProxy); var client = new HttpClient(new SocketsHttpHandler() { - Proxy = GetWebProxy(blProxy) + Proxy = webProxy, + UseProxy = webProxy != null }); if (string.IsNullOrEmpty(userAgent)) diff --git a/clashN/clashN/Handler/UpdateHandle.cs b/clashN/clashN/Handler/UpdateHandle.cs index ce5f8ce..8a6e335 100644 --- a/clashN/clashN/Handler/UpdateHandle.cs +++ b/clashN/clashN/Handler/UpdateHandle.cs @@ -173,14 +173,14 @@ public void UpdateSubscriptionProcess(Config config, bool blProxy, List { //Turn off system proxy - bool bSysProxyType = false; - if (!blProxy && config.SysProxyType == SysProxyType.ForcedChange) - { - bSysProxyType = true; - config.SysProxyType = SysProxyType.ForcedClear; - SysProxyHandle.UpdateSysProxy(config, false); - Thread.Sleep(3000); - } + //bool bSysProxyType = false; + //if (!blProxy && config.SysProxyType == SysProxyType.ForcedChange) + //{ + // bSysProxyType = true; + // config.SysProxyType = SysProxyType.ForcedClear; + // SysProxyHandle.UpdateSysProxy(config, false); + // Thread.Sleep(3000); + //} if (profileItems == null) { @@ -280,11 +280,11 @@ public void UpdateSubscriptionProcess(Config config, bool blProxy, List - + - +