全球主机交流论坛
标题:
使用mosdns让全部使用cloudflare cdn的网站走优选IP
[打印本页]
作者:
Contribute
时间:
2022-7-2 09:06
标题:
使用mosdns让全部使用cloudflare cdn的网站走优选IP
利用mosdns的response_matcher和blackhole两个内置插件实现
以下配置文件适用于mosdns v4版本
下载地址: https://github.com/IrineSistiana/mosdns/releases
运行:./mosdns start -c config.yaml
log:
level: debug
file: ""
plugins:
- tag: forward_remote
type: fast_forward
args:
upstream:
- addr: https://dns.alidns.com/dns-query
dial_addr: "223.5.5.5:443"
- tag: response_has_cloudflare_ip
type: response_matcher
args:
ip:
- "173.245.48.0/20"
- "103.21.244.0/22"
- "103.22.200.0/22"
- "103.31.4.0/22"
- "141.101.64.0/18"
- "108.162.192.0/18"
- "190.93.240.0/20"
- "188.114.96.0/20"
- "197.234.240.0/22"
- "198.41.128.0/17"
- "162.158.0.0/15"
- "104.16.0.0/13"
- "104.24.0.0/14"
- "172.64.0.0/13"
- "131.0.72.0/22"
- "2400:cb00::/32"
- "2606:4700::/32"
- "2803:f800::/32"
- "2405:b500::/32"
- "2405:8100::/32"
- "2a06:98c0::/29"
- "2c0f:f248::/32"
- tag: replace_cloudflare_ip
type: blackhole
args:
rcode: 0
ipv4: "${优选IPv4}"
ipv6: "${优选IPv6}"
- tag: main_sequence
type: sequence
args:
exec:
- forward_remote
- if: response_has_cloudflare_ip
exec:
- replace_cloudflare_ip
- _return
- _return
servers:
- exec: main_sequence
listeners:
- protocol: udp
addr: 127.0.0.1:53
复制代码
作者:
法外狂徒张三
时间:
2022-7-2 09:09
可惜了,路由器拉了
作者:
wuyishan
时间:
2022-7-9 01:34
有没有不是V4的配置问题的
我整的V4这个配置运行不起来
不知道什么缘故
作者:
温柔尝尽了吗
时间:
2022-7-9 11:01
虽然我国外的全部梯子代理了,但是还是赞一个,大佬nb
欢迎光临 全球主机交流论坛 (https://loc.442266.xyz/)
Powered by Discuz! X3.4