Skip to content

Commit

Permalink
Add geo assets provider for Iran
Browse files Browse the repository at this point in the history
  • Loading branch information
Chocolate4U authored and arm64v8a committed Sep 13, 2023
1 parent 95d3a31 commit 1d245ab
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -259,12 +259,14 @@ class AssetsActivity : ThemedActivity() {
} else {
repo = "SagerNet/sing-geosite"
}
} else {
} else if (DataStore.rulesProvider == 1) {
if (file.name == assetNames[0]) {
repo = "soffchen/sing-geoip"
} else {
repo = "soffchen/sing-geosite"
}
} else {
repo = "Chocolate4U/Iran-sing-box-rules"
}

val client = Libcore.newHttpClient().apply {
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/arrays.xml
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,7 @@
<string-array name="rules_dat_provider">
<item>@string/route_rules_official</item>
<item>Loyalsoldier (soffchen/sing-geosite)</item>
<item>Chocolate4U/Iran-sing-box-rules</item>
</string-array>

<string-array name="balancer_type">
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/xml/global_preferences.xml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
<moe.matsuri.nb4a.ui.SimpleMenuPreference
app:defaultValue="0"
app:entries="@array/rules_dat_provider"
app:entryValues="@array/int_array_2"
app:entryValues="@array/int_array_3"
app:icon="@drawable/ic_baseline_rule_folder_24"
app:key="rulesProvider"
app:title="@string/route_rules_provider"
Expand Down

0 comments on commit 1d245ab

Please sign in to comment.