sing-box
sing-box copied to clipboard
Domain rules not honored for domains with CNAME
Operating system
Linux
System version
5
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
If a rule like { "domain_suffix": "bbc.co.uk" } exists, visiting www.bbc.co.uk should have that rule matched. But because www.bbc.co.uk currently ultimately CNAME to bbc.map.fastly.net, a different rule is matched. This makes domain based rules almost unusable:
- Whether a domain matches not only depends on the domain itself, but also if it has CNAME configured which users have no control over.
- I can manually add
bbc.map.fastly.net, but there is no garanteebbc.co.ukalways CNAME to it, and ifabc.comalso CNAME to it, there is no way for the two domains to match different rules.
I wonder if this is by design? Maybe I didn't configure it right? How to solve the "two domains CNAME to the same domain but different rules should be matched" issue?
Thanks.
Reproduction
N/A
Logs
No response
Supporter
- [ ] I am a sponsor
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.