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];