注意:部分文章发布时间较长,可能存在未知因素,购买时建议在本站搜索商家名称,先充分了解商家动态。
交流:唯一投稿邮箱:hostvps@88.com。
网友 Cont**bute 说:
利用mosdns的response_matcher和blackhole两个内置插件实现
以下配置文件适用于mosdns v4版*
下载地址: https://github.com/I**neSistiana/mosdns/releases
运行:./mosdns start -c config.yaml
log:
l***l: debug
file: &*uot;&*uot;
plugins:
– tag: forward_remote
type: fast_forward
args:
upstream:
– addr: https://dns.alidns.com/dns-*uery
dial_addr: &*uot;223.5.5.5:443&*uot;
– tag: response_has_cloudflare_ip
type: response_matcher
args:
ip:
– &*uot;173.245.48.0/20&*uot;
– &*uot;103.21.244.0/22&*uot;
– &*uot;103.22.200.0/22&*uot;
– &*uot;103.31.4.0/22&*uot;
– &*uot;141.101.**.0/18&*uot;
– &*uot;108.162.192.0/18&*uot;
– &*uot;190.93.240.0/20&*uot;
– &*uot;188.114.**.0/20&*uot;
– &*uot;197.234.240.0/22&*uot;
– &*uot;198.41.128.0/17&*uot;
– &*uot;162.158.0.0/15&*uot;
– &*uot;104.16.0.0/13&*uot;
– &*uot;104.24.0.0/14&*uot;
– &*uot;172.**.0.0/13&*uot;
– &*uot;131.0.72.0/22&*uot;
– &*uot;2400:cb00::/32&*uot;
– &*uot;2606:4700::/32&*uot;
– &*uot;2803:f800::/32&*uot;
– &*uot;2405:b500::/32&*uot;
– &*uot;2405:8100::/32&*uot;
– &*uot;2a06:98c0::/29&*uot;
– &*uot;2c0f:f248::/32&*uot;
– tag: replace_cloudflare_ip
type: blackhole
args:
rcode: 0
ipv4: &*uot;${优选IPv4}&*uot;
ipv6: &*uot;${优选IPv6}&*uot;
– tag: main_se*uence
type: se*uence
args:
exec:
– forward_remote
– if: response_has_cloudflare_ip
exec:
– replace_cloudflare_ip
– _ret**n
– _ret**n
******s:
– exec: main_se*uence
listeners:
– p**tocol: udp
addr: 127.0.0.1:53
网友 法外狂徒张三 说:
可惜了,路由器拉了
网友 wuyishan 说:
有没有不是V4的配置问题的
我整的V4这个配置运行不起来
不知道什么缘故
贝壳主机网

