嘟嘟社区

[经验] smartdns,配置文件快速替换-复制-粘贴,停止运行再启动即可!


接着上一篇的教程:https://hostloc.com/thread-963680-1-1.html

双软路由,最费时的工程就在这个smartdns里,我帮你们省下至少20分钟的工程,直接找到下面路径,复制-粘贴,Web界面,停止运行,再启动即可,今天放出的是中国电信的相关公共DNS,空的时候再做移动和联通的,这是我自己和亲戚们的软路由上常用公共DNS配置方式,你们可以自己修改,ISP默认的的建议修改成自己本地区的,其它不建议修改了,已经满了,再添加,你就无法运行了。

路径在:/overlay/upper/etc/config/smartdns

  1. config smartdns
  2.         option dualstack_ip_selection ‘1’
  3.         option prefetch_domain ‘1’
  4.         option serve_expired ‘1’
  5.         option coredump ‘0’
  6.         option port ‘6053’
  7.         option seconddns_port ‘5335’
  8.         option seconddns_enabled ‘1’
  9.         option seconddns_no_rule_nameserver ‘0’
  10.         option seconddns_no_rule_ipset ‘0’
  11.         option seconddns_no_rule_soa ‘0’
  12.         option cache_size ‘20000’
  13.         option rr_ttl ‘3600’
  14.         option rr_ttl_min ‘5’
  15.         option enabled ‘1’
  16.         option server_name ‘cn’
  17.         option ipv6_server ‘1’
  18.         option redirect ‘none’
  19.         option force_aaaa_soa ‘0’
  20.         option seconddns_server_group ‘gw’
  21.         option seconddns_no_speed_check ‘1’
  22.         option seconddns_no_rule_addr ‘1’
  23.         option seconddns_no_dualstack_selection ‘1’
  24.         option seconddns_no_cache ‘1’
  25.         option tcp_server ‘1’
  26.         option seconddns_tcp_server ‘1’
  27.         list old_redirect ‘none’
  28.         list old_port ‘6053’
  29.         list old_enabled ‘1’
  30. config server
  31.         option enabled ‘1’
  32.         option type ‘udp’
  33.         option name ‘114dns’
  34.         option ip ‘114.114.114.114’
  35.         option server_group ‘cn’
  36.         option blacklist_ip ‘0’
  37. config server
  38.         option enabled ‘1’
  39.         option name ‘Google’
  40.         option ip ‘dns.google/dns-query’
  41.         option type ‘https’
  42.         option server_group ‘gw’
  43.         option blacklist_ip ‘0’
  44. config server
  45.         option enabled ‘1’
  46.         option name ‘NextDNS’
  47.         option ip ‘xxxxx.dns.nextdns.io/dns-query’
  48.         option type ‘https’
  49.         option server_group ‘gw’
  50.         option blacklist_ip ‘0’
  51. config server
  52.         option enabled ‘1’
  53.         option name ‘Quad9’
  54.         option ip ‘dns11.quad9.net/dns-query’
  55.         option type ‘https’
  56.         option server_group ‘gw’
  57.         option blacklist_ip ‘0’
  58. config server
  59.         option enabled ‘1’
  60.         option name ‘AGguard-DNS’
  61.         option ip ‘dns-unfiltered.adguard.com/dns-query’
  62.         option type ‘https’
  63.         option server_group ‘gw’
  64.         option blacklist_ip ‘0’
  65. config server
  66.         option enabled ‘1’
  67.         option name ‘iQDNS’
  68.         option ip ‘a.passcloud.xyz/dns-query’
  69.         option type ‘https’
  70.         option server_group ‘gw’
  71.         option blacklist_ip ‘0’
  72. config server
  73.         option enabled ‘1’
  74.         option name ‘DNS-SB’
  75.         option ip ‘doh.dns.sb/dns-query’
  76.         option type ‘https’
  77.         option server_group ‘gw’
  78.         option blacklist_ip ‘0’
  79. config server
  80.         option enabled ‘1’
  81.         option name ‘Google-TLS’
  82.         option ip ‘dns.google’
  83.         option type ‘tls’
  84.         option server_group ‘gw’
  85.         option blacklist_ip ‘0’
  86. config server
  87.         option enabled ‘1’
  88.         option name ‘360DNS’
  89.         option ip ‘doh.360.cn/dns-query’
  90.         option type ‘https’
  91.         option server_group ‘cn’
  92.         option blacklist_ip ‘0’
  93. config server
  94.         option enabled ‘1’
  95.         option type ‘udp’
  96.         option name ‘CNNIC DNS’
  97.         option ip ‘1.2.4.8’
  98.         option server_group ‘cn’
  99.         option blacklist_ip ‘0’
  100. config server
  101.         option enabled ‘1’
  102.         option type ‘udp’
  103.         option name ‘DNS派’
  104.         option ip ‘101.226.4.6’
  105.         option server_group ‘cn’
  106.         option blacklist_ip ‘0’
  107. config server
  108.         option enabled ‘1’
  109.         option type ‘udp’
  110.         option name ‘OneDNS’
  111.         option ip ‘52.80.52.52’
  112.         option server_group ‘cn’
  113.         option blacklist_ip ‘0’
  114. config server
  115.         option enabled ‘1’
  116.         option type ‘udp’
  117.         option name ‘百度’
  118.         option ip ‘180.76.76.76’
  119.         option server_group ‘cn’
  120.         option blacklist_ip ‘0’
  121. config server
  122.         option enabled ‘1’
  123.         option name ‘腾讯’
  124.         option ip ‘dns.pub/dns-query’
  125.         option type ‘https’
  126.         option server_group ‘cn’
  127.         option blacklist_ip ‘0’
  128. config server
  129.         option enabled ‘1’
  130.         option name ‘阿里’
  131.         option ip ‘dns.alidns.com/dns-query’
  132.         option type ‘https’
  133.         option server_group ‘cn’
  134.         option blacklist_ip ‘0’
  135. config server
  136.         option enabled ‘1’
  137.         option name ‘CloudFlare’
  138.         option ip ‘1.1.1.1/dns-query’
  139.         option type ‘tls’
  140.         option server_group ‘gw’
  141.         option blacklist_ip ‘0’
  142. config server
  143.         option enabled ‘1’
  144.         option type ‘udp’
  145.         option name ‘百度IPV6’
  146.         option ip ‘2400:da00::6666’
  147.         option server_group ‘cn’
  148.         option blacklist_ip ‘0’
  149. config server
  150.         option enabled ‘1’
  151.         option type ‘udp’
  152.         option name ‘阿里IPV6’
  153.         option ip ‘2400:3200::1’
  154.         option server_group ‘cn’
  155.         option blacklist_ip ‘0’
  156. config server
  157.         option enabled ‘1’
  158.         option type ‘udp’
  159.         option name ‘CFIEC(天地互连) DNS-IPV6’
  160.         option ip ‘240c::6666’
  161.         option server_group ‘cn’
  162.         option blacklist_ip ‘0’
  163. config server
  164.         option enabled ‘1’
  165.         option name ‘IPV6DNS’
  166.         option ip ‘dns.ipv6dns.com/dns-query’
  167.         option type ‘https’
  168.         option server_group ‘cn’
  169.         option blacklist_ip ‘0’
  170. config server
  171.         option enabled ‘1’
  172.         option type ‘udp’
  173.         option name ‘中国电信IPS默认自动获取(主)’
  174.         option ip ‘61.130.254.34’
  175.         option server_group ‘cn’
  176.         option blacklist_ip ‘0’
  177. config server
  178.         option enabled ‘1’
  179.         option type ‘udp’
  180.         option name ‘中国电信IPS默认自动获取(备)’
  181.         option ip ‘61.130.254.35’
  182.         option server_group ‘cn’
  183.         option blacklist_ip ‘0’
  184. config server
  185.         option enabled ‘1’
  186.         option type ‘udp’
  187.         option name ‘PandaDNS’
  188.         option ip ‘115.159.157.26’
  189.         option server_group ‘cn’
  190.         option blacklist_ip ‘0’
  191. config server
  192.         option enabled ‘1’
  193.         option type ‘udp’
  194.         option name ‘思科OpenDNS’
  195.         option ip ‘208.67.222.222’
  196.         option server_group ‘gw’
  197.         option blacklist_ip ‘0’
  198. config server
  199.         option enabled ‘1’
  200.         option type ‘udp’
  201.         option name ‘中科大防污染DNS’
  202.         option ip ‘202.141.162.123’
  203.         option server_group ‘cn’
  204.         option blacklist_ip ‘0’
  205. config server
  206.         option enabled ‘1’
  207.         option type ‘udp’
  208.         option name ‘中国台湾中华电信 HiNet DNS’
  209.         option ip ‘168.95.1.1’
  210.         option server_group ‘gw’
  211.         option blacklist_ip ‘0’
  212. config server
  213.         option enabled ‘1’
  214.         option type ‘udp’
  215.         option name ‘Xsico DNS’
  216.         option ip ‘115.159.157.26’
  217.         option server_group ‘cn’
  218.         option blacklist_ip ‘0’
  219. config server
  220.         option enabled ‘1’
  221.         option type ‘udp’
  222.         option name ‘微软DNS’
  223.         option ip ‘4.2.2.2’
  224.         option server_group ‘gw’
  225.         option blacklist_ip ‘0’
  226. config server
  227.         option enabled ‘1’
  228.         option type ‘udp’
  229.         option name ‘香港宽频DNS’
  230.         option ip ‘203.80.96.10’
  231.         option server_group ‘gw’
  232.         option blacklist_ip ‘0’
  233. config server
  234.         option enabled ‘1’
  235.         option type ‘udp’
  236.         option name ‘Comodo Secure’
  237.         option ip ‘8.26.56.26’
  238.         option server_group ‘gw’
  239.         option blacklist_ip ‘0’
  240. config server
  241.         option enabled ‘1’
  242.         option type ‘udp’
  243.         option name ‘UltraDNS’
  244.         option ip ‘156.154.70.1’
  245.         option server_group ‘cn’
  246.         option blacklist_ip ‘0’
  247. config server
  248.         option enabled ‘1’
  249.         option type ‘udp’
  250.         option name ‘Norton ConnectSafe’
  251.         option ip ‘199.85.126.10’
  252.         option server_group ‘cn’
  253.         option blacklist_ip ‘0’
  254. config server
  255.         option enabled ‘1’
  256.         option type ‘udp’
  257.         option name ‘威瑞信公共 DNS’
  258.         option ip ‘64.6.64.6’
  259.         option server_group ‘cn’
  260.         option blacklist_ip ‘0’
  261. config server
  262.         option enabled ‘1’
  263.         option type ‘udp’
  264.         option name ‘Dyn DNS’
  265.         option ip ‘216.146.35.35’
  266.         option server_group ‘gw’
  267.         option blacklist_ip ‘0’
  268. config server
  269.         option enabled ‘1’
  270.         option type ‘udp’
  271.         option name ‘Freenom World DNS’
  272.         option ip ‘80.80.80.80’
  273.         option server_group ‘gw’
  274.         option blacklist_ip ‘0’

复制代码

我的评价是不如mosdns

r1172464137 发表于 2022-4-24 16:07
我的评价是不如mosdns

同样Golang写的程序,性能上无本质区别,mosdns侧重的方向是更多的集成一些其它功能,smartdns应该更纯粹一点,只作为一个简单并发请求DNS解析程序,这也是我需要的功能,其它反向代理这种我用不到。

有几个特性你没用上

一个是测速,一个是双栈优选

另外上游dns大概有10个左右就够了,你这太多了

还有,这玩意儿最好配合chinadns ng一起用啊