Add Afghanistan region

This commit is contained in:
problematicconsumer
2023-12-28 18:15:59 +03:30
parent f5df3d12da
commit ef4f41a08b
7 changed files with 14 additions and 0 deletions

View File

@@ -140,6 +140,7 @@
"ir": "Iran (ir)",
"cn": "China (cn)",
"ru": "Russia (ru)",
"af": "Afghanistan (af)",
"other": "Other"
},
"themeMode": "Theme Mode",

View File

@@ -140,6 +140,7 @@
"ir": "ایران (ir)",
"cn": "چین (cn)",
"ru": "روسیه (ru)",
"af": "افغانستان (af)",
"other": "سایر"
},
"themeMode": "تم مود",

View File

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

View File

@@ -140,6 +140,7 @@
"ir": "İran (ir)",
"cn": "Çin (cn)",
"ru": "Rusya (ru)",
"af": "Afghanistan (af)",
"other": "Diğer"
},
"themeMode": "Tema Modu",

View File

@@ -140,6 +140,7 @@
"ir": "伊朗 (ir)",
"cn": "中国 (cn)",
"ru": "俄罗斯 (ru)",
"af": "Afghanistan (af)",
"other": "其它"
},
"themeMode": "主题模式",

View File

@@ -4,12 +4,14 @@ enum Region {
ir,
cn,
ru,
af,
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,
af => t.settings.general.regions.af,
other => t.settings.general.regions.other,
};
}

View File

@@ -65,6 +65,13 @@ class ConfigOptionRepositoryImpl
outbound: RuleOutbound.bypass,
),
],
Region.af => [
const SingboxRule(
domains: "domain:.af,geosite:af",
ip: "geoip:af",
outbound: RuleOutbound.bypass,
),
],
_ => <SingboxRule>[],
};