Add russia region

This commit is contained in:
problematicconsumer
2023-10-21 20:28:37 +03:30
parent 3e054df31a
commit 87cf734825
6 changed files with 16 additions and 0 deletions

View File

@@ -123,6 +123,7 @@
"regions": {
"ir": "Iran (ir)",
"cn": "China (cn)",
"ru": "Russia (ru)",
"other": "Other"
},
"themeMode": "Theme Mode",

View File

@@ -123,6 +123,7 @@
"regions": {
"ir": "ایران (ir)",
"cn": "چین (cn)",
"ru": "روسیه (ru)",
"other": "سایر"
},
"themeMode": "تم مود",

View File

@@ -123,6 +123,7 @@
"regions": {
"ir": "Иран (ir)",
"cn": "Китай (cn)",
"ru": "Россия (ru)",
"other": "Другой"
},
"themeMode": "Оформление",

View File

@@ -123,6 +123,7 @@
"regions": {
"ir": "伊朗 (ir)",
"cn": "中国 (cn)",
"ru": "俄罗斯 (ru)",
"other": "其他"
},
"themeMode": "主题模式",

View File

@@ -90,6 +90,16 @@ List<Rule> rules(RulesRef ref) => switch (ref.watch(regionNotifierProvider)) {
outbound: RuleOutbound.bypass,
),
],
Region.ru => [
const Rule(
id: "id",
name: "name",
enabled: true,
domains: "domain:.ru",
ip: "geoip:ru",
outbound: RuleOutbound.bypass,
),
],
_ => [],
};

View File

@@ -61,11 +61,13 @@ enum PerAppProxyMode {
enum Region {
ir,
cn,
ru,
other;
String present(TranslationsEn t) => switch (this) {
ir => t.settings.general.regions.ir,
cn => t.settings.general.regions.cn,
ru => t.settings.general.regions.ru,
other => t.settings.general.regions.other,
};
}