Skip to content

Commit

Permalink
Add Afghanistan region
Browse files Browse the repository at this point in the history
  • Loading branch information
problematicconsumer committed Dec 28, 2023
1 parent f5df3d1 commit ef4f41a
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions assets/translations/strings_en.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@
"ir": "Iran (ir)",
"cn": "China (cn)",
"ru": "Russia (ru)",
"af": "Afghanistan (af)",
"other": "Other"
},
"themeMode": "Theme Mode",
Expand Down
1 change: 1 addition & 0 deletions assets/translations/strings_fa.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@
"ir": "ایران (ir)",
"cn": "چین (cn)",
"ru": "روسیه (ru)",
"af": "افغانستان (af)",
"other": "سایر"
},
"themeMode": "تم مود",
Expand Down
1 change: 1 addition & 0 deletions assets/translations/strings_ru.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@
"ir": "Иран (ir)",
"cn": "Китай (cn)",
"ru": "Россия (ru)",
"af": "Afghanistan (af)",
"other": "Другой"
},
"themeMode": "Оформление",
Expand Down
1 change: 1 addition & 0 deletions assets/translations/strings_tr.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@
"ir": "İran (ir)",
"cn": "Çin (cn)",
"ru": "Rusya (ru)",
"af": "Afghanistan (af)",
"other": "Diğer"
},
"themeMode": "Tema Modu",
Expand Down
1 change: 1 addition & 0 deletions assets/translations/strings_zh-CN.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@
"ir": "伊朗 (ir)",
"cn": "中国 (cn)",
"ru": "俄罗斯 (ru)",
"af": "Afghanistan (af)",
"other": "其它"
},
"themeMode": "主题模式",
Expand Down
2 changes: 2 additions & 0 deletions lib/core/model/region.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
}
7 changes: 7 additions & 0 deletions lib/features/config_option/data/config_option_repository.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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>[],
};

Expand Down

0 comments on commit ef4f41a

Please sign in to comment.