随便把域名“偷走”或“霸占”? 超详细Mac自建DNS教程!

Description
求三连 关注支持🙏谢谢各位
如有错误请指出 后期会推出 Windows 教程!!!

网页macOS(Webintosh)仓库:
https://github.com/mengobs/webintosh
https://github.com/mengobs/webintosh-desktop

全部内容一览:
brew install dnsmasq

dnsmasq.conf位置:
/usr/local/etc/dnsmasq.conf (Intel)
/opt/homebrew/etc/dnsmasq.conf (Apple Silicon)

sudo /usr/local/opt/dnsmasq/sbin/dnsmasq —no-daemon (临时运行)
brew services start dnsmasq (开机自启)
brew services run dnsmasq (开机不启)
brew services stop dnsmasq

刷新DNS缓存
sudo dscacheutil -flushcache
sudo killall -HUP mDNSResponder
sudo killall -HUP mDNSResponderHelper