diff --git a/3rdparty/qv2ray/v2/proxy/QvProxyConfigurator.cpp b/3rdparty/qv2ray/v2/proxy/QvProxyConfigurator.cpp index 820dd07..6a8321f 100644 --- a/3rdparty/qv2ray/v2/proxy/QvProxyConfigurator.cpp +++ b/3rdparty/qv2ray/v2/proxy/QvProxyConfigurator.cpp @@ -253,16 +253,14 @@ namespace Qv2ray::components::proxy { #endif #ifdef Q_OS_WIN - if (scheme == "http") scheme = "http://"; - else if (scheme == "socks") scheme = "socks="; - QString str = "{scheme}{ip}:{socks_port}"; - str = str.replace("{scheme}", scheme) - .replace("{ip}", address) - .replace("{socks_port}", Int2String(socksPort)); + if (scheme == "http") scheme = "http://{ip}:{port}"; + else if (scheme == "socks") scheme = "socks={ip}:{port}"; + scheme = scheme.replace("{ip}", address) + .replace("{port}", Int2String(socksPort)); // - LOG("Windows proxy string: " + str); - auto proxyStrW = new WCHAR[str.length() + 1]; - wcscpy(proxyStrW, str.toStdWString().c_str()); + LOG("Windows proxy string: " + scheme); + auto proxyStrW = new WCHAR[scheme.length() + 1]; + wcscpy(proxyStrW, scheme.toStdWString().c_str()); // __QueryProxyOptions(); diff --git a/3rdparty/qv2ray/wrapper.hpp b/3rdparty/qv2ray/wrapper.hpp index 3a2cc38..231f279 100644 --- a/3rdparty/qv2ray/wrapper.hpp +++ b/3rdparty/qv2ray/wrapper.hpp @@ -5,8 +5,8 @@ #include #include -#define LOG(...) Qv2ray::base::log_internal(__VA_ARGS__) -#define DEBUG(...) Qv2ray::base::log_internal(__VA_ARGS__) +#define LOG(...) qDebug() << __VA_ARGS__ +#define DEBUG(...) qDebug() << __VA_ARGS__ namespace Qv2ray { namespace base { template diff --git a/include/global/NekoGui_DataStore.hpp b/include/global/NekoGui_DataStore.hpp index 927831f..a6f3381 100644 --- a/include/global/NekoGui_DataStore.hpp +++ b/include/global/NekoGui_DataStore.hpp @@ -39,7 +39,7 @@ namespace NekoGui { bool need_keep_vpn_off = false; QString appdataDir = ""; QStringList ignoreConnTag = {}; - QString proxy_scheme = "http"; + QString proxy_scheme = "{ip}:{port}"; std::unique_ptr routing; int imported_count = 0; diff --git a/include/ui/setting/dialog_basic_settings.ui b/include/ui/setting/dialog_basic_settings.ui index d88c37f..6956fee 100644 --- a/include/ui/setting/dialog_basic_settings.ui +++ b/include/ui/setting/dialog_basic_settings.ui @@ -111,12 +111,17 @@ - http + {ip}:{port} - socks + http://{ip}:{port} + + + + + socks={ip}:{port}