Mac OS X安装Dnsmasq来加速网络

$ brew install dnsmasq

$ cp /usr/local/opt/dnsmasq/dnsmasq.conf.example /usr/local/etc/dnsmasq.conf

$ vi /usr/local/etc/resolv.dnsmasq.conf

# Google DNS

nameserver 8.8.8.8

nameserver 8.8.4.4

# OpenDNS

nameserver 208.67.222.222

nameserver 208.67.220.220

$ vi /usr/local/etc/dnsmasq.conf

resolv-file=/usr/local/etc/resolv.dnsmasq.conf

strict-order

listen-address=127.0.0.1 # 多个IP用逗号隔开

no-hosts

cache-size=32768

address=/bitbucket.org/131.103.20.167

address=/google.com/173.194.38.128

address=/ggpht.com/173.194.38.128

address=/googleapis.com/173.194.38.128

address=/googleusercontent.com/173.194.38.128

address=/gstatic.com/173.194.38.128

address=/youtube.com/173.194.38.128

address=/gmail.com/173.194.38.128

address=/googlesource.com/173.194.38.128

address=/googlelabs.com/173.194.38.128

address=/googlecode.com/173.194.38.128

address=/goo.gl/173.194.38.128

address=/google.cn/203.208.46.210

address=/google.com.hk/203.208.46.210

address=/flickr.com/66.196.66.157

address=/up.flickr.com/119.161.24.27

address=/api.flickr.com/208.71.44.31

address=/farm1.staticflickr.com/72.30.196.151

address=/farm2.staticflickr.com/72.30.196.152

address=/farm3.staticflickr.com/98.137.205.236

address=/farm4.staticflickr.com/98.137.204.89

address=/farm5.staticflickr.com/68.142.227.95

address=/farm6.staticflickr.com/98.139.21.45

address=/farm7.staticflickr.com/98.139.235.135

address=/farm8.staticflickr.com/72.30.198.116

address=/farm9.staticflickr.com/72.30.198.117

address=/github.global.ssl.fastly.net/185.31.17.184

$ sudo cp -fv /usr/local/opt/dnsmasq/*.plist /Library/LaunchDaemons

$ sudo launchctl load /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist

原文链接:http://nick.txtcc.com/index.php/linux/1228

原创文章,作者:优速盾-小U,如若转载,请注明出处:https://www.cdnb.net/bbs/archives/22944

(0)
上一篇 2023年12月25日
下一篇 2023年12月25日

相关推荐

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注

优速盾注册领取大礼包www.cdnb.net
/sitemap.xml