From f237e623cfc93b364154a84b8f7d16d15047ca4e Mon Sep 17 00:00:00 2001 From: ymshenyu Date: Thu, 30 Apr 2020 13:31:42 +0800 Subject: [PATCH] fix: remove scheme for windows since it will break some application that get proxy information from system --- src/components/proxy/QvProxyConfigurator.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/proxy/QvProxyConfigurator.cpp b/src/components/proxy/QvProxyConfigurator.cpp index 3cb96544..2c24450b 100644 --- a/src/components/proxy/QvProxyConfigurator.cpp +++ b/src/components/proxy/QvProxyConfigurator.cpp @@ -212,7 +212,8 @@ namespace Qv2ray::components::proxy } #ifdef Q_OS_WIN - QString __a = (hasHTTP ? "http://" : "socks5://") + address + ":" + QSTRN(hasHTTP ? httpPort : socksPort); + const auto scheme = (hasHTTP ? "" : "socks5://"); + QString __a = scheme + address + ":" + QSTRN(hasHTTP ? httpPort : socksPort); LOG(MODULE_PROXY, "Windows proxy string: " + __a) auto proxyStrW = new WCHAR[__a.length() + 1];