mirror of
https://github.com/Qv2ray/Qv2ray.git
synced 2025-05-18 18:00:25 +08:00
format: code format
This commit is contained in:
parent
1f5e934f5a
commit
c424301924
@ -1 +1 @@
|
||||
5338
|
||||
5339
|
@ -222,4 +222,4 @@ namespace Qv2ray::components::tcping
|
||||
rv = rv ? rv : -errno;
|
||||
return rv;
|
||||
}
|
||||
} // namespace Qv2ray::core::tcping
|
||||
} // namespace Qv2ray::components::tcping
|
||||
|
@ -67,7 +67,8 @@ namespace Qv2ray::components::plugins::Toolbar
|
||||
{
|
||||
bool result = server->waitForNewConnection(5000, &timeOut);
|
||||
DEBUG(MODULE_PLUGINHOST, "Plugin thread listening failed: " + server->errorString())
|
||||
DEBUG(MODULE_PLUGINHOST, "waitForNewConnection: " + QString(result ? "true" : "false") + ", " + QString(timeOut ? "true" : "false"))
|
||||
DEBUG(MODULE_PLUGINHOST,
|
||||
"waitForNewConnection: " + QString(result ? "true" : "false") + ", " + QString(timeOut ? "true" : "false"))
|
||||
}
|
||||
|
||||
server->close();
|
||||
|
@ -141,9 +141,9 @@ namespace Qv2ray::components::route::presets::v2rayN
|
||||
"domain:samsungdm.com" };
|
||||
|
||||
const inline QList<QString> DomainsBlock{ "geosite:category-ads-all" };
|
||||
const inline QList<QString> DomainsProxy{ "geosite:google", "geosite:github", "geosite:netflix", "geosite:steam",
|
||||
"geosite:telegram", "geosite:tumblr", "domain:naver.com", "geosite:bbc",
|
||||
"domain:gvt1.com", "domain:textnow.com", "domain:twitch.tv", "domain:wikileaks.org" };
|
||||
const inline QList<QString> DomainsProxy{ "geosite:google", "geosite:github", "geosite:netflix", "geosite:steam",
|
||||
"geosite:telegram", "geosite:tumblr", "domain:naver.com", "geosite:bbc",
|
||||
"domain:gvt1.com", "domain:textnow.com", "domain:twitch.tv", "domain:wikileaks.org" };
|
||||
|
||||
const inline QList<QString> IPsProxy{
|
||||
"91.108.4.0/22", "91.108.8.0/22", "91.108.12.0/22", "91.108.20.0/22", "91.108.36.0/23",
|
||||
|
@ -539,7 +539,6 @@ namespace Qv2ray::core::connection
|
||||
{
|
||||
bypassBTFilter(root);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Let's process some api features.
|
||||
@ -643,12 +642,14 @@ namespace Qv2ray::core::connection
|
||||
|
||||
void bypassBTFilter(CONFIGROOT &root)
|
||||
{
|
||||
QJsonObject bypassBTRuleObj{ { "protocol", QJsonArray::fromStringList(QStringList{ "bittorrent" }) },{ "outboundTag", OUTBOUND_TAG_DIRECT }, { "type", "field" } };
|
||||
QJsonObject bypassBTRuleObj{ { "protocol", QJsonArray::fromStringList(QStringList{ "bittorrent" }) },
|
||||
{ "outboundTag", OUTBOUND_TAG_DIRECT },
|
||||
{ "type", "field" } };
|
||||
ROUTING routing(root["routing"].toObject());
|
||||
QJsonArray _rules(routing["rules"].toArray());
|
||||
_rules.insert(0, bypassBTRuleObj);
|
||||
routing["rules"] = _rules;
|
||||
root["routing"] = routing;
|
||||
root["routing"] = routing;
|
||||
}
|
||||
|
||||
} // namespace Generation
|
||||
|
@ -106,7 +106,8 @@ namespace Qv2ray::core::connection
|
||||
}
|
||||
|
||||
// Explicitly don't support v1 vmess links.
|
||||
if (!vmessConf.contains("v")) {
|
||||
if (!vmessConf.contains("v"))
|
||||
{
|
||||
*errMessage = QObject::tr("seems like a v1 vmess, we don't support it");
|
||||
return default;
|
||||
}
|
||||
|
@ -643,7 +643,9 @@ void PreferencesWindow::on_bypassBTCb_stateChanged(int arg1)
|
||||
NEEDRESTART
|
||||
if (arg1 == Qt::Checked)
|
||||
{
|
||||
QvMessageBoxInfo(this, tr("Note"), tr("To recognize the protocol of a connection, one must enable sniffing option in inbound proxy.") + NEWLINE+tr("tproxy inbound's sniffing is enabled by default."));
|
||||
QvMessageBoxInfo(this, tr("Note"),
|
||||
tr("To recognize the protocol of a connection, one must enable sniffing option in inbound proxy.") + NEWLINE +
|
||||
tr("tproxy inbound's sniffing is enabled by default."));
|
||||
}
|
||||
CurrentConfig.connectionConfig.bypassBT = arg1 == Qt::Checked;
|
||||
}
|
||||
@ -1327,4 +1329,4 @@ void PreferencesWindow::on_socksSniffingCB_stateChanged(int arg1)
|
||||
{
|
||||
NEEDRESTART
|
||||
CurrentConfig.inboundConfig.socksSniffing = arg1 == Qt::Checked;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user