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)", "ir": "Iran (ir)",
"cn": "China (cn)", "cn": "China (cn)",
"ru": "Russia (ru)", "ru": "Russia (ru)",
"af": "Afghanistan (af)",
"other": "Other" "other": "Other"
}, },
"themeMode": "Theme Mode", "themeMode": "Theme Mode",

View File

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

View File

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

View File

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

View File

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

View File

@@ -4,12 +4,14 @@ enum Region {
ir, ir,
cn, cn,
ru, ru,
af,
other; other;
String present(TranslationsEn t) => switch (this) { String present(TranslationsEn t) => switch (this) {
ir => t.settings.general.regions.ir, ir => t.settings.general.regions.ir,
cn => t.settings.general.regions.cn, cn => t.settings.general.regions.cn,
ru => t.settings.general.regions.ru, ru => t.settings.general.regions.ru,
af => t.settings.general.regions.af,
other => t.settings.general.regions.other, other => t.settings.general.regions.other,
}; };
} }

View File

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