format: code format

This commit is contained in:
Qv2ray-dev 2020-04-28 14:59:32 +08:00
parent 1f5e934f5a
commit c424301924
7 changed files with 17 additions and 12 deletions

View File

@ -1 +1 @@
5338
5339

View File

@ -222,4 +222,4 @@ namespace Qv2ray::components::tcping
rv = rv ? rv : -errno;
return rv;
}
} // namespace Qv2ray::core::tcping
} // namespace Qv2ray::components::tcping

View File

@ -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();

View File

@ -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",

View File

@ -539,7 +539,6 @@ namespace Qv2ray::core::connection
{
bypassBTFilter(root);
}
}
// Let's process some api features.
@ -643,7 +642,9 @@ 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);

View File

@ -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;
}

View File

@ -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;
}