Compare commits

...

2 Commits

Author SHA1 Message Date
2dust
10cc117e81 Merge pull request #1268 from yuhan6665/new-fakedns
New config format
2021-10-30 19:02:26 +08:00
yuhan6665
ce9bed2e1f New config format 2021-10-29 20:37:12 -04:00
2 changed files with 3 additions and 3 deletions

View File

@@ -20,7 +20,7 @@ data class V2rayConfig(
val api: Any? = null,
val transport: Any? = null,
val reverse: Any? = null,
var fakedns: FakednsBean? = null,
var fakedns: Any? = null,
val browserForwarder: Any? = null) {
companion object {
const val DEFAULT_PORT = 443
@@ -370,7 +370,7 @@ data class V2rayConfig(
}
data class DnsBean(var servers: ArrayList<Any>? = null,
var hosts: Map<String, String>? = null,
var hosts: Map<String, Any>? = null,
val clientIp: String? = null,
val disableCache: Boolean? = null,
val queryStrategy: String? = null,

View File

@@ -128,7 +128,7 @@ object V2rayConfigUtil {
private fun fakedns(v2rayConfig: V2rayConfig) {
if (settingsStorage?.decodeBool(AppConfig.PREF_FAKE_DNS_ENABLED) == true) {
v2rayConfig.fakedns = V2rayConfig.FakednsBean()
v2rayConfig.fakedns = listOf(V2rayConfig.FakednsBean())
v2rayConfig.outbounds.filter { it.protocol == "freedom" }.forEach {
it.settings?.domainStrategy = "UseIP"
}