mirror of
https://github.com/bolucat/Archive.git
synced 2025-12-24 13:28:37 +08:00
21 lines
842 B
Plaintext
21 lines
842 B
Plaintext
// Block google secure DNS to avoid Fake DNS does not work
|
|
// 防止 Fake DNS 不生效
|
|
modules = append(modules, {
|
|
dnsquery: func(m) {
|
|
if m.domain == "dns.google" {
|
|
return { block: true }
|
|
}
|
|
},
|
|
address: func(m) {
|
|
if m.ipaddress && (m.ipaddress == "8.8.8.8:853" || m.ipaddress == "8.8.8.8:443" || m.ipaddress == "8.8.4.4:853" || m.ipaddress == "8.8.4.4:443" || m.ipaddress == "[2001:4860:4860::8888]:853" || m.ipaddress == "[2001:4860:4860::8888]:443" || m.ipaddress == "[2001:4860:4860::8844]:853" || m.ipaddress == "[2001:4860:4860::8844]:443") {
|
|
return { block: true }
|
|
}
|
|
if m.domainaddress {
|
|
text := import("text")
|
|
if text.has_prefix(m.domainaddress, "dns.google:") {
|
|
return { block: true }
|
|
}
|
|
}
|
|
}
|
|
})
|