mirror of
https://github.com/MatsuriDayo/NekoBoxForAndroid.git
synced 2025-12-19 22:50:05 +08:00
fix dns routing rule
This commit is contained in:
parent
506daa853a
commit
2ad8b91d7f
@ -691,20 +691,34 @@ fun buildConfig(
|
|||||||
|
|
||||||
// dns object user rules
|
// dns object user rules
|
||||||
if (enableDnsRouting) {
|
if (enableDnsRouting) {
|
||||||
if (domainListDNSRemote.isNotEmpty() || uidListDNSRemote.isNotEmpty()) {
|
if (uidListDNSRemote.isNotEmpty()) {
|
||||||
dns.rules.add(
|
dns.rules.add(
|
||||||
DNSRule_DefaultOptions().apply {
|
DNSRule_DefaultOptions().apply {
|
||||||
makeSingBoxRule(domainListDNSRemote.toHashSet().toList())
|
|
||||||
user_id = uidListDNSRemote.toHashSet().toList()
|
user_id = uidListDNSRemote.toHashSet().toList()
|
||||||
server = "dns-remote"
|
server = "dns-remote"
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
if (domainListDNSDirect.isNotEmpty() || uidListDNSDirect.isNotEmpty()) {
|
if (domainListDNSRemote.isNotEmpty()) {
|
||||||
|
dns.rules.add(
|
||||||
|
DNSRule_DefaultOptions().apply {
|
||||||
|
makeSingBoxRule(domainListDNSRemote.toHashSet().toList())
|
||||||
|
server = "dns-remote"
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
if (uidListDNSDirect.isNotEmpty()) {
|
||||||
|
dns.rules.add(
|
||||||
|
DNSRule_DefaultOptions().apply {
|
||||||
|
user_id = uidListDNSDirect.toHashSet().toList()
|
||||||
|
server = "dns-direct"
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
if (domainListDNSDirect.isNotEmpty()) {
|
||||||
dns.rules.add(
|
dns.rules.add(
|
||||||
DNSRule_DefaultOptions().apply {
|
DNSRule_DefaultOptions().apply {
|
||||||
makeSingBoxRule(domainListDNSDirect.toHashSet().toList())
|
makeSingBoxRule(domainListDNSDirect.toHashSet().toList())
|
||||||
user_id = uidListDNSDirect.toHashSet().toList()
|
|
||||||
server = "dns-direct"
|
server = "dns-direct"
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user