mirror of
https://github.com/MetaCubeX/ClashMetaForAndroid.git
synced 2026-05-09 18:11:26 +08:00
Squashed commit of the following:
commit 574fba87ab733332efa17733a6602a1649e62379 Author: Steve Johnson <stevejohnson1438@proton.me> Date: Sun Oct 29 21:31:23 2023 +0800 support importing local geofile commit ec410293f3abe29835645233349d026d3a55acc0 Author: Steve Johnson <stevejohnson1438@proton.me> Date: Sun Oct 29 17:18:52 2023 +0800 release assets at runtime commit 2dfb95bab98ba661a28efe255e2965c35c6580c4 Author: Steve Johnson <stevejohnson1438@proton.me> Date: Sun Oct 29 16:43:41 2023 +0800 remove embedded country.mmdb commit fb245ed4a3c257284685f3b1bee5d9f7333833ce Author: Steve Johnson <stevejohnson1438@proton.me> Date: Sun Oct 29 16:35:14 2023 +0800 simplity gradle commit 2fb75c87a13dea7e5c8f8f4126cc53d2d6926b99 Author: Steve Johnson <stevejohnson1438@proton.me> Date: Sun Oct 29 16:06:17 2023 +0800 add geofiles download
This commit is contained in:
@@ -15,7 +15,7 @@ class MetaFeatureSettingsDesign(
|
||||
configuration: ConfigurationOverride
|
||||
) : Design<MetaFeatureSettingsDesign.Request>(context) {
|
||||
enum class Request {
|
||||
ResetOverride
|
||||
ResetOverride, ImportGeoIp, ImportGeoSite, ImportCountry
|
||||
}
|
||||
|
||||
private val binding = DesignSettingsMetaFeatureBinding
|
||||
@@ -198,6 +198,36 @@ class MetaFeatureSettingsDesign(
|
||||
)
|
||||
|
||||
sniffer.listener?.onChanged()
|
||||
|
||||
category(R.string.geox_files)
|
||||
|
||||
clickable (
|
||||
title = R.string.import_geoip_file,
|
||||
summary = R.string.press_to_import,
|
||||
){
|
||||
clicked {
|
||||
requests.trySend(Request.ImportGeoIp)
|
||||
}
|
||||
}
|
||||
|
||||
clickable (
|
||||
title = R.string.import_geosite_file,
|
||||
summary = R.string.press_to_import,
|
||||
){
|
||||
clicked {
|
||||
requests.trySend(Request.ImportGeoSite)
|
||||
}
|
||||
}
|
||||
|
||||
clickable (
|
||||
title = R.string.import_country_file,
|
||||
summary = R.string.press_to_import,
|
||||
){
|
||||
clicked {
|
||||
requests.trySend(Request.ImportCountry)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
category(R.string.geox_url_setting)
|
||||
|
||||
|
||||
@@ -234,4 +234,9 @@
|
||||
<string name="geox_geoip">GeoIP URL</string>
|
||||
<string name="geox_mmdb">MMDB URL</string>
|
||||
<string name="geox_geosite">Geosite URL</string>
|
||||
<string name="geox_files" >Geo Files</string>
|
||||
<string name="import_geoip_file">Import GeoIP Database</string>
|
||||
<string name="press_to_import">Press to import...</string>
|
||||
<string name="import_geosite_file">Import GeoSite Database</string>
|
||||
<string name="import_country_file">Import Country Database</string>
|
||||
</resources>
|
||||
@@ -234,4 +234,9 @@
|
||||
<string name="geox_geoip">GeoIP Url</string>
|
||||
<string name="geox_mmdb">MMDB Url</string>
|
||||
<string name="geox_geosite">Geosite Url</string>
|
||||
<string name="geox_files" >Geo Files</string>
|
||||
<string name="import_geoip_file">Import GeoIP Database</string>
|
||||
<string name="press_to_import">Press to import...</string>
|
||||
<string name="import_geosite_file">Import GeoSite Database</string>
|
||||
<string name="import_country_file">Import Country Database</string>
|
||||
</resources>
|
||||
@@ -299,4 +299,9 @@
|
||||
<string name="geoip_url" translatable="false">https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/geoip.dat</string>
|
||||
<string name="mmdb_url" translatable="false">https://raw.githubusercontent.com/Loyalsoldier/geoip/release/Country.mmdb</string>
|
||||
<string name="geosite_url" translatable="false">https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/geosite.dat</string>
|
||||
<string name="geox_files" >Geo Files</string>
|
||||
<string name="import_geoip_file">Import GeoIP Database</string>
|
||||
<string name="press_to_import">Press to import...</string>
|
||||
<string name="import_geosite_file">Import GeoSite Database</string>
|
||||
<string name="import_country_file">Import Country Database</string>
|
||||
</resources>
|
||||
|
||||
@@ -231,4 +231,9 @@
|
||||
<string name="geox_geosite">Geosite Url</string>
|
||||
<string name="prefer_h3">Prefer h3</string>
|
||||
<string name="port_whitelist">Port Whitelist</string>
|
||||
<string name="geox_files" >Geo Files</string>
|
||||
<string name="import_geoip_file">Import GeoIP Database</string>
|
||||
<string name="press_to_import">Press to import...</string>
|
||||
<string name="import_geosite_file">Import GeoSite Database</string>
|
||||
<string name="import_country_file">Import Country Database</string>
|
||||
</resources>
|
||||
@@ -231,4 +231,9 @@
|
||||
<string name="geox_geosite">Geosite Url</string>
|
||||
<string name="prefer_h3">Prefer h3</string>
|
||||
<string name="port_whitelist">Port Whitelist</string>
|
||||
<string name="geox_files" >Geo Files</string>
|
||||
<string name="import_geoip_file">Import GeoIP Database</string>
|
||||
<string name="press_to_import">Press to import...</string>
|
||||
<string name="import_geosite_file">Import GeoSite Database</string>
|
||||
<string name="import_country_file">Import Country Database</string>
|
||||
</resources>
|
||||
|
||||
@@ -234,4 +234,9 @@
|
||||
<string name="geox_geosite">Geosite Url</string>
|
||||
<string name="prefer_h3">Prefer h3</string>
|
||||
<string name="port_whitelist">Port Whitelist</string>
|
||||
<string name="geox_files" >Geo Files</string>
|
||||
<string name="import_geoip_file">导入 GeoIP 数据库</string>
|
||||
<string name="press_to_import">Press to import...</string>
|
||||
<string name="import_geosite_file">导入 GeoSite 数据库</string>
|
||||
<string name="import_country_file">导入 Country 数据库</string>
|
||||
</resources>
|
||||
@@ -299,4 +299,9 @@
|
||||
<string name="geoip_url" translatable="false">https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/release/geoip.dat</string>
|
||||
<string name="mmdb_url" translatable="false">https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/release/country.mmdb</string>
|
||||
<string name="geosite_url" translatable="false">https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/release/geosite.dat</string>
|
||||
<string name="geox_files" >Geo Files</string>
|
||||
<string name="import_geoip_file">Import GeoIP Database</string>
|
||||
<string name="press_to_import">Press to import...</string>
|
||||
<string name="import_geosite_file">Import GeoSite Database</string>
|
||||
<string name="import_country_file">Import Country Database</string>
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user