mirror of
https://github.com/Qv2ray/Qv2ray.git
synced 2025-05-19 02:10:28 +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;
|
rv = rv ? rv : -errno;
|
||||||
return rv;
|
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);
|
bool result = server->waitForNewConnection(5000, &timeOut);
|
||||||
DEBUG(MODULE_PLUGINHOST, "Plugin thread listening failed: " + server->errorString())
|
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();
|
server->close();
|
||||||
|
@ -141,9 +141,9 @@ namespace Qv2ray::components::route::presets::v2rayN
|
|||||||
"domain:samsungdm.com" };
|
"domain:samsungdm.com" };
|
||||||
|
|
||||||
const inline QList<QString> DomainsBlock{ "geosite:category-ads-all" };
|
const inline QList<QString> DomainsBlock{ "geosite:category-ads-all" };
|
||||||
const inline QList<QString> DomainsProxy{ "geosite:google", "geosite:github", "geosite:netflix", "geosite:steam",
|
const inline QList<QString> DomainsProxy{ "geosite:google", "geosite:github", "geosite:netflix", "geosite:steam",
|
||||||
"geosite:telegram", "geosite:tumblr", "domain:naver.com", "geosite:bbc",
|
"geosite:telegram", "geosite:tumblr", "domain:naver.com", "geosite:bbc",
|
||||||
"domain:gvt1.com", "domain:textnow.com", "domain:twitch.tv", "domain:wikileaks.org" };
|
"domain:gvt1.com", "domain:textnow.com", "domain:twitch.tv", "domain:wikileaks.org" };
|
||||||
|
|
||||||
const inline QList<QString> IPsProxy{
|
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",
|
"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);
|
bypassBTFilter(root);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Let's process some api features.
|
// Let's process some api features.
|
||||||
@ -643,7 +642,9 @@ namespace Qv2ray::core::connection
|
|||||||
|
|
||||||
void bypassBTFilter(CONFIGROOT &root)
|
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());
|
ROUTING routing(root["routing"].toObject());
|
||||||
QJsonArray _rules(routing["rules"].toArray());
|
QJsonArray _rules(routing["rules"].toArray());
|
||||||
_rules.insert(0, bypassBTRuleObj);
|
_rules.insert(0, bypassBTRuleObj);
|
||||||
|
@ -106,7 +106,8 @@ namespace Qv2ray::core::connection
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Explicitly don't support v1 vmess links.
|
// 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");
|
*errMessage = QObject::tr("seems like a v1 vmess, we don't support it");
|
||||||
return default;
|
return default;
|
||||||
}
|
}
|
||||||
|
@ -643,7 +643,9 @@ void PreferencesWindow::on_bypassBTCb_stateChanged(int arg1)
|
|||||||
NEEDRESTART
|
NEEDRESTART
|
||||||
if (arg1 == Qt::Checked)
|
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;
|
CurrentConfig.connectionConfig.bypassBT = arg1 == Qt::Checked;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user