Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request] 希望增加当国内DNS返回某些特定IP的时候 自动把这个域名记录到灰名单用远程DNS来解析 #858

Open
esme518 opened this issue Nov 26, 2024 · 2 comments

Comments

@esme518
Copy link

esme518 commented Nov 26, 2024

希望添加的功能

希望增加当国内DNS返回某些特定IP的时候 例如 江苏电信反诈的“221.228.32.13”
自动把这个域名记录到灰名单用远程DNS来解析

@dukeduffff
Copy link

dukeduffff commented Dec 2, 2024

现在就可以实现呀
- matches: "resp_ip $geoip_cloudflare"
exec: forward udp://127.0.0.1:5153

@yyysuo
Copy link

yyysuo commented Jan 14, 2025

#866

tag: my_outputrule
type: domain_output #新加的插件类型
args:
file_stat: /cus/mosdns/gen/list.txt #输出的域名查询统计
file_rule: /cus/mosdns/gen/rule.txt #生成的分流域名规则
max_entries: 1 #达到1条查询时自动保存到指定目录
dump_interval: 1800 #每半小时自动保存一次上述统计及规则

  • tag: my_rule
    type: domain_set
    args:
    files:
    - "/cus/mosdns/gen/rule.txt"

根据得到的ip输出域名规则文件

  • matches: "resp_ip 221.228.32.13"
    exec: my_outputrule

重启mosdns后生成的规则文件生效
- matches: qname $my_rule
exec: reject 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants