Skip to content

Commit 1d245ab

Browse files
Chocolate4Uarm64v8a
authored andcommitted
Add geo assets provider for Iran
1 parent 95d3a31 commit 1d245ab

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

app/src/main/java/io/nekohasekai/sagernet/ui/AssetsActivity.kt

+3-1
Original file line numberDiff line numberDiff line change
@@ -259,12 +259,14 @@ class AssetsActivity : ThemedActivity() {
259259
} else {
260260
repo = "SagerNet/sing-geosite"
261261
}
262-
} else {
262+
} else if (DataStore.rulesProvider == 1) {
263263
if (file.name == assetNames[0]) {
264264
repo = "soffchen/sing-geoip"
265265
} else {
266266
repo = "soffchen/sing-geosite"
267267
}
268+
} else {
269+
repo = "Chocolate4U/Iran-sing-box-rules"
268270
}
269271

270272
val client = Libcore.newHttpClient().apply {

app/src/main/res/values/arrays.xml

+1
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,7 @@
358358
<string-array name="rules_dat_provider">
359359
<item>@string/route_rules_official</item>
360360
<item>Loyalsoldier (soffchen/sing-geosite)</item>
361+
<item>Chocolate4U/Iran-sing-box-rules</item>
361362
</string-array>
362363

363364
<string-array name="balancer_type">

app/src/main/res/xml/global_preferences.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@
127127
<moe.matsuri.nb4a.ui.SimpleMenuPreference
128128
app:defaultValue="0"
129129
app:entries="@array/rules_dat_provider"
130-
app:entryValues="@array/int_array_2"
130+
app:entryValues="@array/int_array_3"
131131
app:icon="@drawable/ic_baseline_rule_folder_24"
132132
app:key="rulesProvider"
133133
app:title="@string/route_rules_provider"

0 commit comments

Comments
 (0)