发现了一个非常好用的dns转发器-Mosdns,用了下感觉可以替代smartdns,AdGuardHome
本帖最后由 颓废的少年 于 2022-4-11 22:57 编辑mosdns版本更新迭代了很多了,旧版的配置文件到新版可能会用不了,我现在的版本就是openwrt 无 luci界面 版本号3.6。luci界面用自定义配置会出现未运行bug,所以我都没用了,可以用无luci的版本(我会把我编译的固件上传分享),或者openwrt docker运行mosdns也行。新的配置文件会在文章后面更新,以及我用的固件。
新版教程篇
将下载的配置文件和其他两个文件上传到/etc/mosdns文件夹内,然后重启openwrt,用docker也是类似操作。
(2022-4-7修改)
static/image/hrline/4.gifhttps://www.right.com.cn/forum/static/image/hrline/4.gifhttps://www.right.com.cn/forum/static/image/hrline/4.gifhttps://www.right.com.cn/forum/static/image/hrline/4.gifhttps://www.right.com.cn/forum/static/image/hrline/4.gifhttps://www.right.com.cn/forum/static/image/hrline/4.gif
用了一个星期自己感觉Mosdns完全可以替代smartdns和AdGuardHome国内外分流,smartdns用不了多久就会出现问题就很烦。在我网找问题的时候无意间看到有个网友发了个mosdns就去瞅了一眼,感觉还不错,用了一周多了,没出现过啥问题。看论坛里面居然没有人用这个插件,就分享出来吧。
mosdns是可以定制自己想要的dns转发器,想要什么功能直接代码添加就行了,要一点基础
openwrt的ipk也有大神编译出来了,开箱即用,默认已经配置好了
Github链接在下面
https://github.com/IrineSistiana/mosdns
openwrt ipk 文件在这里下载,大神已经编译好的,开箱即用
https://op.supes.top/packages/x86_64/
个人感觉可以拿来养老用,不想折腾的直接安装ipk,然后运行就好,软件会自动设置好打倒美帝和违禁软件p的dns转发。我不知道论坛以前有没有人分享过,第一次发帖紧张刺激:Q
static/image/hrline/5.gifhttps://www.right.com.cn/forum/static/image/hrline/5.gifhttps://www.right.com.cn/forum/static/image/hrline/5.gifhttps://www.right.com.cn/forum/static/image/hrline/5.gifhttps://www.right.com.cn/forum/static/image/hrline/5.gifhttps://www.right.com.cn/forum/static/image/hrline/5.gif
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
发一个简易的openwrt版的教程
第一个方法,直接用openwrt自带的文件传输安装
第二个方法,用winscp把安装包传输到tmp文件夹内,然后用ssh登陆软路由用opkg命令安装
传输好后用ssh登陆软路由,然后输入以下命令安装即可
opkg update
opkg install /tmp/xxx.ipk
安装完成后来到mosdns管理页面按照我的图文操作
ok 教程到此就完成了,如果有什么问题可以评论区交流,我的实力也不是高,比小白高一点点,太复杂的可能要找大神解决了
我自己自用的mosdns配置文件,基于默认配置修改的,直接复制粘贴到mosdns里面即可
配置文件的各种模块功能可以去作者Wiki
log:
level: error
file: ''
plugin:
- tag: main_server
type: server
args:
entry:
- _no_ecs
- lazy_cache
- _prefer_ipv4
- _single_flight
- main_sequence
server:
- protocol: udp
addr: '127.0.0.1:5335'
- protocol: tcp
addr: '127.0.0.1:5335'
- tag: main_sequence
type: sequence
args:
exec:
- if:
- query_is_ad_domain
exec:
- _block_with_nxdomain
- _end
- if:
- query_is_local_domain
- '!_query_is_common'
exec:
- forward_local
- _end
- if:
- query_is_non_local_domain
exec:
- forward_remote
- _end
- primary:
- forward_local
- if:
- '!response_has_local_ip'
exec:
- _drop_response
secondary:
- forward_remote
fast_fallback: 150
always_standby:true
- tag: forward_local
type: fast_forward
args:
upstream:
- addr: 'https://dns.alidns.com/dns-query'
dial_addr: '223.6.6.6:443'
idle_timeout: 8
max_conns: 1
- addr: 'https://doh.pub/dns-query'
dial_addr: '175.24.219.66:443'
idle_timeout: 59
max_conns: 1
- tag: forward_remote
type: fast_forward
args:
upstream:
- addr: 'https://dns.google/dns-query'
dial_addr: '8.8.8.8:443'
idle_timeout: 60
max_conns: 1
- addr: 'https://cloudflare-dns.com/dns-query'
dial_addr: '1.1.1.1:443'
idle_timeout: 9
max_conns: 1
- tag: lazy_cache
type: cache
args:
size: 409600
lazy_cache_ttl: 259200
- tag: query_is_local_domain
type: query_matcher
args:
domain:
- 'ext:./geosite.dat:cn'
- tag: query_is_non_local_domain
type: query_matcher
args:
domain:
- 'ext:./geosite.dat:geolocation-!cn'
- tag: response_has_local_ip
type: response_matcher
args:
ip:
- 'ext:./geoip.dat:cn'
- tag: query_is_ad_domain
type: query_matcher
args:
domain:
- 'ext:./serverlist.txt'
<blockquote>log:
支持支持支持 我用的J1900软路由 esir的固件
安装时提示这个 有点紧张刺激 Limitpea 发表于 2021-12-28 22:37
我用的J1900软路由 esir的固件
安装时提示这个
我是用的 opkg 命令安装的,有个教程给你参考下吧
https://www.vjsun.com/333.html 试试效果看看
谢谢分享,请问有n1的op版在哪里下载
颓废的少年 发表于 2021-12-28 22:47
我是用的 opkg 命令安装的,有个教程给你参考下吧
https://www.vjsun.com/333.html
打不开。。 安装了不会使用,求指导怎么开启使用呀
heimodao7 发表于 2021-12-29 00:21
安装了不会使用,求指导怎么开启使用呀
我会在更新个教程,等会就上传图文 Limitpea 发表于 2021-12-28 23:57
打不开。。
这个呢
https://blog.csdn.net/qq_36288184/article/details/79389721 heimodao7 发表于 2021-12-28 23:18
谢谢分享,请问有n1的op版在哪里下载
我用的x86,arm的不知道有没有人编译,没有的话只有自己编译了 颓废的少年 发表于 2021-12-29 10:09
我用的x86,arm的不知道有没有人编译,没有的话只有自己编译了
和自带的china-dns-NG有啥区别 时光雕刻人生 发表于 2021-12-29 19:37
和自带的china-dns-NG有啥区别
自定义更高吧,可以分流 支持,回去试试看