Skip to content

Fix geosite:ru rule (Normalization to RU vs lowercase ru)#3971

Merged
MHSanaei merged 3 commits intoMHSanaei:mainfrom
Troodi:fix
Apr 19, 2026
Merged

Fix geosite:ru rule (Normalization to RU vs lowercase ru)#3971
MHSanaei merged 3 commits intoMHSanaei:mainfrom
Troodi:fix

Conversation

@Troodi
Copy link
Copy Markdown
Contributor

@Troodi Troodi commented Mar 26, 2026

What is the pull request?

Fixes a bug where Xray-core fails to start when a geosite:ru routing rule is added. The root cause is a case-sensitivity mismatch: Xray internally normalizes 2-letter country codes to uppercase (RU), but the lookup in geosite.dat is case-sensitive and the file stores tags in lowercase (ru). This results in a code not found in geosite.dat: RU error even though the configuration is correct.

Which part of the application is affected by the change?

  • Frontend
  • Backend

Type of Changes

  • Bug fix
  • New feature
  • Refactoring
  • Other

Steps

Before (Xray fails to start):
Failed to start: main: failed to load config files: [bin/config.json] >
infra/conf: failed to build routing configuration >
infra/conf: invalid field rule >
infra/conf: failed to parse domain rule: geosite:ru >
infra/conf: failed to load geosite: RU >
infra/conf: code not found in geosite.dat: RU

After: Xray starts successfully with geosite:ru routing rules.

@MHSanaei MHSanaei merged commit c2a2a36 into MHSanaei:main Apr 19, 2026
1 check passed
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

Successfully merging this pull request may close these issues.

2 participants