sing-box icon indicating copy to clipboard operation
sing-box copied to clipboard

invert of geoip-cn is not the same as geoip-!cn

Open read8873 opened this issue 2 years ago • 0 comments

Operating system

Ubuntu 22.04

System version

Ubuntu 22.04

Installation type

Original sing-box Command Line

If you are using a graphical client, please provide the version of the client.

No response

Version

No response

Description

One may need to set rule for ip that is not in china. However, using the invert of geoip-cn is not the same as geoip-!cn. The address may be domain name instead of resovled ip, causing all ip being matched by the invert of geoip-cn.

Is it possible to proive geoip-!cn or a special maching condition like empty-ip or unresolved-domain?

Reproduction

            "rule_set": [
              "geoip-cn"
            ],
            "invert": true
          }
....
  
      {
        "tag": "geoip-cn",
        "type": "remote",
        "format": "binary",
        "url": "https://raw.githubusercontent.com/SagerNet/sing-geoip/rule-set/geoip-cn.srs",
        "download_detour": "PROXY"
      },

Logs

No response

Integrity requirements

  • [X] I confirm that I have read the documentation, understand the meaning of all the configuration items I wrote, and did not pile up seemingly useful options or default values.
  • [X] I confirm that I have provided the server and client configuration files and process that can be reproduced locally, instead of a complicated client configuration file that has been stripped of sensitive data.
  • [X] I confirm that I have provided the simplest configuration that can be used to reproduce the error I reported, instead of depending on remote servers, TUN, graphical interface clients, or other closed-source software.
  • [X] I confirm that I have provided the complete configuration files and logs, rather than just providing parts I think are useful out of confidence in my own intelligence.

read8873 avatar Jan 21 '24 13:01 read8873