{"id":5848,"date":"2022-01-09T15:16:51","date_gmt":"2022-01-09T23:16:51","guid":{"rendered":"https:\/\/www.xh86.me\/?p=5848"},"modified":"2022-01-09T15:16:51","modified_gmt":"2022-01-09T23:16:51","slug":"%e4%bd%bf%e7%94%a8overture%e6%9b%bf%e6%8d%a2dnsmasq%e5%81%9a%e5%9f%9f%e5%90%8d%e5%88%86%e6%b5%81%e8%a7%a3%e6%9e%90","status":"publish","type":"post","link":"https:\/\/www.xh86.me\/?p=5848","title":{"rendered":"\u4f7f\u7528overture\u66ff\u6362dnsmasq\u505a\u57df\u540d\u5206\u6d41\u89e3\u6790"},"content":{"rendered":"<p>\u4e4b\u524d\u5206\u4eab\u8fc7\u4f7f\u7528dnsmasq\u57fa\u4e8e\u5927\u9646\u57df\u540d\u767d\u540d\u5355\u5206\u6d41\u89e3\u6790\u57df\u540d\uff0c\u8fd9\u79cd\u529e\u6cd5\u53d7\u9650\u4e8e\u767d\u540d\u5355\u5217\u8868\u7684\u66f4\u65b0\uff0c\u5217\u8868\u603b\u662f\u6ede\u540e\u4e8e\u7f51\u7ad9\u5b9e\u9645\u4f7f\u7528\u7684\u57df\u540d\uff0c\u9020\u6210\u4e00\u4e9b\u5883\u5185\u7f51\u7ad9cdn\u89e3\u6790\u5230\u4e86\u5883\u5916\uff0c\u5f71\u54cd\u5883\u5185\u7f51\u7ad9\u6253\u5f00\u901f\u5ea6\u3002<br \/>\n\u7531\u4e8egfw\u7684dns\u6c61\u67d3\u53ea\u4f1a\u4f7f\u7528\u5883\u5916\u5730\u5740\u548c\u79c1\u6709\u5730\u5740\uff0c\u53ef\u4ee5\u5229\u7528\u8fd9\u4e2a\u7279\u6027\u505adns\u5206\u6d41\u89e3\u6790\uff1a\u6240\u6709\u57df\u540d\u7528\u5883\u5185dns\u670d\u52a1\u5668\u89e3\u6790\uff0c\u5982\u679c\u57df\u540d\u89e3\u6790\u5f97\u5230\u5883\u5185ip\u5219\u76f4\u63a5\u91c7\u7528\uff0c\u5982\u679c\u5f97\u5230\u5883\u5916ip\u5219\u4f7f\u7528\u5883\u5916dns\u670d\u52a1\u5668\u89e3\u6790\u3002<br \/>\n\u5f00\u6e90\u8f6f\u4ef6<a href=\"https:\/\/github.com\/shawn1m\/overture\">overture<\/a>\u5c31\u53ef\u4ee5\u5b9e\u73b0\u8fd9\u4e2a\u529f\u80fd\u3002overture\u6709AB\u4e24\u7ec4dns\u670d\u52a1\u5668\uff0cAB\u7ec4\u5404\u6709\u4e00\u4e2aIP\u5217\u8868\u548c\u57df\u540d\u5217\u8868\uff0c\u5047\u8bbeA\u7ec4\u4e3a\u5883\u5185dns\u670d\u52a1\u5668\uff0cA\u7684ip\u5217\u8868\u662f\u5927\u9646IP\u5217\u8868\uff0cA\u7684\u57df\u540d\u5217\u8868\u662f\u5883\u5185\u57df\u540d\u767d\u540d\u5355\uff0cB\u7684\u57df\u540d\u5217\u8868\u662f\u88ab\u5899\u7684\u57df\u540dgfwlist\u3002<\/p>\n<p>\u4e0b\u9762\u662foverture\u7684\u5b89\u88c5\u53ca\u914d\u7f6e\u6b65\u9aa4<br \/>\n\u5b89\u88c5\u811a\u672coverture_install.sh<\/p>\n<pre><code>#! \/bin\/bash\r\napt update &amp;&amp; apt install curl wget unzip\r\nwget -q https:\/\/github.com\/shawn1m\/overture\/releases\/download\/v1.7\/overture-linux-amd64.zip\r\nunzip overture-linux-amd64.zip  \"overture-linux-amd64\"\r\nmv overture-linux-amd64 \/sbin\/overture\r\ncat &lt;&lt; EOF &gt; \/lib\/systemd\/system\/overture.service\r\n[Unit]\r\nDescription=overture-dns-server\r\nAfter=syslog.target network-online.target\r\n[Service]\r\nExecStart=\/sbin\/overture -c \/etc\/overture\/config.yml\r\nStandardOutput=syslog\r\nRestart=on-abnormal\r\n[Install]\r\nWantedBy=multi-user.target\r\nEOF\r\nmkdir \/etc\/overture\r\ncat &lt;&lt; EOF &gt; \/etc\/overture\/config.yml\r\nbindAddress: :53\r\ndebugHTTPAddress:\r\ndohEnabled: false\r\nprimaryDNS:\r\n  - name: dns1\r\n    address: 114.114.114.114:53\r\n    protocol: udp\r\n    socks5Address:\r\n    timeout: 2\r\n    ednsClientSubnet:\r\n      policy: disable\r\n      externalIP:\r\n      noCookie: true\r\n  - name: dns2\r\n    address: 223.5.5.5:53\r\n    protocol: udp\r\n    socks5Address:\r\n    timeout: 2\r\n    ednsClientSubnet:\r\n      policy: disable\r\n      externalIP:\r\n      noCookie: true\r\nalternativeDNS:\r\n  - name: google8888\r\n    address: 8.8.8.8:53\r\n    protocol: udp\r\n    socks5Address:\r\n    timeout: 3\r\n    ednsClientSubnet:\r\n      policy: disable\r\n      externalIP:\r\n      noCookie: true\r\n  - name: google8844\r\n    address: 8.8.4.4:53\r\n    protocol: udp\r\n    socks5Address:\r\n    timeout: 3\r\n    ednsClientSubnet:\r\n      policy: disable\r\n      externalIP:\r\n      noCookie: true\r\nonlyPrimaryDNS: false\r\nipv6UseAlternativeDNS: false\r\nalternativeDNSConcurrent: true\r\nwhenPrimaryDNSAnswerNoneUse: alternativeDNS\r\nipNetworkFile:\r\n  primary: \/etc\/overture\/china_ip_list.txt\r\n  alternative: \/etc\/overture\/china_ip_list.txt\r\ndomainFile:\r\n  primary: \/etc\/overture\/china_list.txt\r\n  alternative: \/etc\/overture\/gfw_list.txt\r\n  matcher: suffix-tree\r\nhostsFile:\r\n  hostsFile:\r\n  finder: full-map\r\nminimumTTL: 0\r\ndomainTTLFile:\r\ncacheSize: 0\r\ncacheRedisUrl:\r\ncacheRedisConnectionPoolSize:\r\nrejectQType:\r\n  - 255\r\nEOF\r\nsystemctl enable overture\r\n<\/code><\/pre>\n<p>\u5217\u8868\u66f4\u65b0\u811a\u672c overture_update_fliters.sh\uff0c\u9996\u6b21\u8fd0\u884coverture\u524d\u9700\u8981\u6267\u884c\u6b64\u811a\u672c\u3002<\/p>\n<pre><code>#! \/bin\/bash\r\ncd \/etc\/overture\r\nrm china_list.txt gfw_list.txt china_ip_list.txt\r\ncurl -s https:\/\/raw.githubusercontent.com\/17mon\/china_ip_list\/master\/china_ip_list.txt &gt; china_ip_list.txt\r\ncurl -s https:\/\/raw.githubusercontent.com\/felixonmars\/dnsmasq-china-list\/master\/accelerated-domains.china.conf  | sed 's\/server=\\\/\/\/g;s\/\\\/114.114.114.114\/\/g' &gt; china_list1.txt\r\ncurl -s https:\/\/raw.githubusercontent.com\/hq450\/fancyss\/master\/rules\/WhiteList_new.txt  | sed 's\/Server=\\\/\/\/g;s\/\\\/\/\/g' &gt; china_list2.txt\r\ncat china_list1.txt china_list2.txt | sort -u &gt; china_list.txt\r\nrm china_list1.txt china_list2.txt\r\ncurl -s https:\/\/raw.githubusercontent.com\/Loukky\/gfwlist-by-loukky\/master\/gfwlist.txt | base64 -d | sort -u | sed '\/^$\\|@@\/d'| sed 's#!.\\+##; s#|##g; s#@##g; s#http:\\\/\\\/##; s#https:\\\/\\\/##;' | sed '\/\\*\/d; \/apple\\.com\/d; \/sina\\.cn\/d; \/sina\\.com\\.cn\/d; \/baidu\\.com\/d; \/qq\\.com\/d' | sed '\/^[0-9]\\+\\.[0-9]\\+\\.[0-9]\\+\\.[0-9]\\+$\/d' | grep '^[0-9a-zA-Z\\.-]\\+$' | grep '\\.' | sed 's#^\\.\\+##' | sort -u &gt; gfwlist.txt\r\ncurl -s https:\/\/raw.githubusercontent.com\/hq450\/fancyss\/master\/rules\/gfwlist.conf | sed 's\/ipset=\\\/\\.\/\/g; s\/\\\/gfwlist\/\/g; \/^server\/d' &gt; koolshare.txt\r\ncat gfwlist.txt koolshare.txt | sort -u &gt; gfw_list.txt\r\nrm gfwlist.txt  koolshare.txt\r\nsystemctl restart overture\r\n<\/code><\/pre>\n<p>\u914d\u7f6e\u5b9a\u65f6\u4efb\u52a1\u5b9a\u671f\u66f4\u65b0overture\u7684\u57df\u540d\u548cIP\u5217\u8868<\/p>\n<pre><code>0 3 * * 1 \/root\/overture_update_fliters.sh<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u4e4b\u524d\u5206\u4eab\u8fc7\u4f7f\u7528dnsmasq\u57fa\u4e8e\u5927\u9646\u57df\u540d\u767d\u540d\u5355\u5206\u6d41\u89e3\u6790\u57df\u540d\uff0c\u8fd9\u79cd\u529e\u6cd5\u53d7\u9650\u4e8e\u767d\u540d\u5355\u5217\u8868\u7684\u66f4\u65b0\uff0c\u5217\u8868\u603b\u662f\u6ede\u540e\u4e8e\u7f51\u7ad9 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[],"class_list":["post-5848","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.xh86.me\/index.php?rest_route=\/wp\/v2\/posts\/5848","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xh86.me\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xh86.me\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xh86.me\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xh86.me\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5848"}],"version-history":[{"count":1,"href":"https:\/\/www.xh86.me\/index.php?rest_route=\/wp\/v2\/posts\/5848\/revisions"}],"predecessor-version":[{"id":5849,"href":"https:\/\/www.xh86.me\/index.php?rest_route=\/wp\/v2\/posts\/5848\/revisions\/5849"}],"wp:attachment":[{"href":"https:\/\/www.xh86.me\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5848"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xh86.me\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5848"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xh86.me\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5848"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}