mosdns icon indicating copy to clipboard operation
mosdns copied to clipboard

[Feature request] 丢弃resp_ip中指定的IP

Open likevi9528 opened this issue 1 year ago • 0 comments

Discussed in https://github.com/IrineSistiana/mosdns/discussions/780

Originally posted by likevi9528 January 2, 2024 现有一个域名,经过国内外DNS解析会获得三个返回IP,但是其中有一个在国内访问不了(通过itdog和本地测出来)。有没有什么方法可以去掉这个IP。 我现在只能使用hosts解决这个问题,有没有什么方法只需要更新blackIpList,就会自动在resp_ip中去除blackIpList中的IP。 我的想法是下面的方式,但会导致返回空的IP,请求添加此功能。

  • tag: black_ipList type: "ip_set" args: files: - "./rules/custom_black_ipList.txt"

  • tag: world_resolve type: "sequence" args:

    • exec: $world_DNS - matches: "resp_ip $black_ipList" exec: drop_resp
    • exec: query_summary world_DNS

likevi9528 avatar Jan 13 '24 05:01 likevi9528