mirror of
https://github.com/Mahdi-zarei/nekoray.git
synced 2026-01-06 21:36:02 +08:00
fix: Add cn_SITE to bypass chinese and sort rule-set suggestions in routing section
This commit is contained in:
parent
17484cddcd
commit
d447a6dceb
@ -442,7 +442,7 @@ namespace NekoGui {
|
||||
|
||||
auto rule1 = std::make_shared<RouteRule>();
|
||||
rule1->name = "Bypass Chinese IPs and Domains";
|
||||
rule1->rule_set << QString("cn_IP") << QString("geolocation-cn_SITE");
|
||||
rule1->rule_set << QString("cn_IP") << QString("geolocation-cn_SITE") << QString("cn_SITE");
|
||||
rule1->outboundID = -2;
|
||||
chain->Rules << rule1;
|
||||
|
||||
|
||||
@ -345,6 +345,11 @@ void RouteItem::updateHelperItems(const QString& base) {
|
||||
for (const auto& item: geo_items) {
|
||||
if (item.contains(base)) current_helper_items << item;
|
||||
}
|
||||
for (int i=0;i<current_helper_items.size();i++) {
|
||||
for (int j=i+1;j<current_helper_items.size();j++) {
|
||||
if (current_helper_items[i].length() > current_helper_items[j].length()) current_helper_items.swapItemsAt(i, j);
|
||||
}
|
||||
}
|
||||
helperModel->setStringList(current_helper_items);
|
||||
ui->rule_set_helper->setModel(helperModel);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user