mirror of
https://github.com/MetaCubeX/ClashMetaForAndroid.git
synced 2024-11-16 04:22:18 +08:00
support set fake-ip-filter-mode
This commit is contained in:
parent
fb1c6a2cc3
commit
c6810bc441
|
@ -109,6 +109,9 @@ data class ConfigurationOverride(
|
|||
@SerialName("fake-ip-filter")
|
||||
var fakeIpFilter: List<String>? = null,
|
||||
|
||||
@SerialName("fake-ip-filter-mode")
|
||||
var fakeIPFilterMode: FilterMode? = null,
|
||||
|
||||
@SerialName("fallback-filter")
|
||||
val fallbackFilter: DnsFallbackFilter = DnsFallbackFilter(),
|
||||
|
||||
|
@ -159,6 +162,14 @@ data class ConfigurationOverride(
|
|||
@SerialName("fake-ip")
|
||||
FakeIp,
|
||||
}
|
||||
@Serializable
|
||||
enum class FilterMode {
|
||||
@SerialName("blacklist")
|
||||
BlackList,
|
||||
|
||||
@SerialName("whitelist")
|
||||
WhiteList,
|
||||
}
|
||||
|
||||
@Serializable
|
||||
data class Sniffer(
|
||||
|
|
|
@ -333,6 +333,22 @@ class OverrideSettingsDesign(
|
|||
configure = dnsDependencies::add,
|
||||
)
|
||||
|
||||
selectableList(
|
||||
value = configuration.dns::fakeIPFilterMode,
|
||||
values = arrayOf(
|
||||
null,
|
||||
ConfigurationOverride.FilterMode.BlackList,
|
||||
ConfigurationOverride.FilterMode.WhiteList
|
||||
),
|
||||
valuesText = arrayOf(
|
||||
R.string.dont_modify,
|
||||
R.string.blacklist,
|
||||
R.string.whitelist
|
||||
),
|
||||
title = R.string.fakeip_filter_mode,
|
||||
configure = dnsDependencies::add,
|
||||
)
|
||||
|
||||
selectableList(
|
||||
value = configuration.dns.fallbackFilter::geoIp,
|
||||
values = booleanValues,
|
||||
|
|
|
@ -127,11 +127,14 @@
|
|||
<string name="fallback">Fallback Name Server</string>
|
||||
<string name="default_name_server">Default Name Server</string>
|
||||
<string name="fakeip_filter">FakeIP 过滤器</string>
|
||||
<string name="fakeip_filter_mode">FakeIP 过滤器模式</string>
|
||||
<string name="geoip_fallback">GeoIP Fallback</string>
|
||||
<string name="ipcidr_fallback">IPCIDR Fallback</string>
|
||||
<string name="use_built_in">使用内置</string>
|
||||
<string name="mapping">Real-IP 至 域名映射</string>
|
||||
<string name="fakeip">Fake-IP 至 域名映射</string>
|
||||
<string name="blacklist">黑名单</string>
|
||||
<string name="whitelist">白名单</string>
|
||||
<string name="off">OFF</string>
|
||||
<string name="strict">Strict</string>
|
||||
<string name="always">Always</string>
|
||||
|
|
|
@ -162,6 +162,7 @@
|
|||
<string name="fallback">Fallback Name Server</string>
|
||||
<string name="default_name_server">Default Name Server</string>
|
||||
<string name="fakeip_filter">Fake-IP Filter</string>
|
||||
<string name="fakeip_filter_mode">Fake-IP Filter Mode</string>
|
||||
<string name="geoip_fallback">GeoIP Fallback</string>
|
||||
<string name="geoip_fallback_code">GeoIP Fallback Code</string>
|
||||
<string name="ipcidr_fallback">IPCIDR Fallback</string>
|
||||
|
@ -184,6 +185,9 @@
|
|||
<string name="mapping">Real-IP to domain mapping</string>
|
||||
<string name="fakeip">Fake-IP to domain mapping</string>
|
||||
|
||||
<string name="blacklist">Black List</string>
|
||||
<string name="whitelist">White List</string>
|
||||
|
||||
<string name="off">OFF</string>
|
||||
<string name="strict">Strict</string>
|
||||
<string name="always">Always</string>
|
||||
|
|
Loading…
Reference in New Issue
Block a user