From a459978ffbc6868a05dd22dec0d661e7f9137a40 Mon Sep 17 00:00:00 2001 From: windfallw <51202308+windfallw@users.noreply.github.com> Date: Sat, 4 Dec 2021 15:08:50 +0800 Subject: [PATCH] fix sysproxy exec arg --- v2rayN/v2rayN/HttpProxyHandler/HttpProxyHandle.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/v2rayN/v2rayN/HttpProxyHandler/HttpProxyHandle.cs b/v2rayN/v2rayN/HttpProxyHandler/HttpProxyHandle.cs index 5372fd79..3871f707 100644 --- a/v2rayN/v2rayN/HttpProxyHandler/HttpProxyHandle.cs +++ b/v2rayN/v2rayN/HttpProxyHandler/HttpProxyHandle.cs @@ -41,7 +41,9 @@ namespace v2rayN.HttpProxyHandler if (type == ListenerType.GlobalHttp) { //ProxySetting.SetProxy($"{Global.Loopback}:{port}", Global.IEProxyExceptions, 2); - SysProxyHandle.SetIEProxy(true, true, $"{Global.Loopback}:{port}"); + string strHttpProxy = $"{Global.httpProtocol}{Global.Loopback}:{port}"; + SysProxyHandle.SetIEProxy(true, $"http={strHttpProxy};https={strHttpProxy};ftp={strHttpProxy}", + config.systemProxyExceptions); } else if (type == ListenerType.HttpOpenAndClear) { @@ -166,7 +168,9 @@ namespace v2rayN.HttpProxyHandler } if (type == ESysProxyType.ForcedChange) { - SysProxyHandle.SetIEProxy(true, $"{Global.Loopback}:{port}", config.systemProxyExceptions); + string strHttpProxy = $"{Global.httpProtocol}{Global.Loopback}:{port}"; + SysProxyHandle.SetIEProxy(true, $"http={strHttpProxy};https={strHttpProxy};ftp={strHttpProxy}", + config.systemProxyExceptions); } else if (type == ESysProxyType.ForcedClear) {