mirror of
https://github.com/MatsuriDayo/NekoBoxForAndroid.git
synced 2025-12-19 14:40:06 +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
|
||||
if (enableDnsRouting) {
|
||||
if (domainListDNSRemote.isNotEmpty() || uidListDNSRemote.isNotEmpty()) {
|
||||
if (uidListDNSRemote.isNotEmpty()) {
|
||||
dns.rules.add(
|
||||
DNSRule_DefaultOptions().apply {
|
||||
makeSingBoxRule(domainListDNSRemote.toHashSet().toList())
|
||||
user_id = uidListDNSRemote.toHashSet().toList()
|
||||
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(
|
||||
DNSRule_DefaultOptions().apply {
|
||||
makeSingBoxRule(domainListDNSDirect.toHashSet().toList())
|
||||
user_id = uidListDNSDirect.toHashSet().toList()
|
||||
server = "dns-direct"
|
||||
}
|
||||
)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user