geoip-cn.srs incorrectly classifies Google anycast IPs (142.251.x.x) as China, causing false rejects
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 65/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Domain
- networking
Research direction
Inspect /rule-set/geoip-cn.srs and compare the listed ranges with the issue's dig and whois evidence for 142.251.32.163. Reproduce the routing case with www.gstatic.com/generate_204, then verify that Google anycast addresses are no longer matched by geoip-cn and the request is not rejected.
Written by the indexing model from the issue text.
Description
Problem
The geoip-cn rule set contains Google anycast IP ranges (e.g. 142.251.32.163), which are not Chinese IPs. This causes any domain resolving to these Google IPs to be falsely matched by geoip-cn and rejected.
Affected file
geoip-cn.srs (path: /rule-set/geoip-cn.srs)
Reproduction
Using sing-box with this rule in routing:
{
"action": "reject",
"rule_set": ["geoip-cn", "geosite-cn"]
}
Request https://www.gstatic.com/generate_204 → connection rejected.
sing-box debug log:
dns: lookup succeed for www.gstatic.com: 142.251.32.163 2607:f8b0:4007:805::2003
router: match[4] rule_set=[geoip-cn geosite-cn] => reject
router: connection closed: rejected
Evidence that 142.251.32.163 is a Google (not CN) IP
$ dig www.gstatic.com @1.1.1.1 +short
142.251.32.163
$ curl -4 -I https://www.gstatic.com/generate_204 # direct, works
HTTP/2 204
$ whois 142.251.32.163
NetOrg: GOGL → OrgName: Google LLC
The IP belongs to Google LLC (AS15169), not any Chinese network.
Impact
Any Google domain that resolves to a 142.251.x.x anycast IP (www.gstatic.com, ssl.gstatic.com, etc.) gets rejected when users enable the geoip-cn block rule. Meanwhile other Google domains (e.g. www.google.com) work because they resolve to different IPs not (yet) in the set — making the bug look random/intermittent.
Expected behavior
Google's IP ranges (142.250.0.0/15, 172.217.0.0/16, 142.251.32.163, etc.) should not be part of geoip-cn.
Suggested fix
Exclude Google's global anycast ranges from the CN geoip build, or cross-check against AS15169 before adding IPs to geoip-cn.
Environment
- Rule source:
https://raw.githubusercontent.com/Chocolate4U/Iran-sing-box-rules/rule-set/geoip-cn.srs - sing-box version: hiddify-sing-box 1.13.1 (hiddify-core v4.0.4)
- Hiddify Manager: 12.3.3
- Dominant language
- Python
- Stars
- 9.3k
- Forks
- 1k
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from hiddify/Hiddify-Manager
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
hiddify/Hiddify-Manager#5533 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
hiddify/Hiddify-Manager#5529 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
hiddify/Hiddify-Manager#5498 · 3 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
hiddify/Hiddify-Manager#5495 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
hiddify/Hiddify-Manager#5462 ·
All issues in hiddify/Hiddify-Manager
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100