From e5a9eb68106b41473b4b148bdc06399a30539810 Mon Sep 17 00:00:00 2001 From: msxfXF <38368353+msxfXF@users.noreply.github.com> Date: Thu, 29 Sep 2022 11:03:30 +0800 Subject: [PATCH] Update SysProxyHandle.cs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 有些库,比如python的标准库中,会自动补全协议,从而导致代理异常。 如果只写 127.0.0.1:10808 会被解析成 http和https分别走http://127.0.0.1:10808和https://127.0.0.1:10808, 而预期效果是http和https均走http://127.0.0.1:10808,加入协议头后,可以使windows上的python程序正常运行,也符合windows代理规范。 --- v2rayN/v2rayN/Handler/SysProxyHandle.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v2rayN/v2rayN/Handler/SysProxyHandle.cs b/v2rayN/v2rayN/Handler/SysProxyHandle.cs index 815580ae..729692fa 100644 --- a/v2rayN/v2rayN/Handler/SysProxyHandle.cs +++ b/v2rayN/v2rayN/Handler/SysProxyHandle.cs @@ -72,7 +72,7 @@ namespace v2rayN.Handler var strProxy = string.Empty; if (Utils.IsNullOrEmpty(config.systemProxyAdvancedProtocol)) { - strProxy = $"{Global.Loopback}:{port}"; + strProxy = $"http=http://{Global.Loopback}:{port};https=http://{Global.Loopback}:{port}"; } else {