// Block google secure DNS to avoid Fake DNS does not work // https://www.txthinking.com/talks/articles/brook-fakedns-en.article // 防止 Fake DNS 不生效 // https://www.txthinking.com/talks/articles/brook-fakedns.article 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 } } } } })