[GH-ISSUE #5817] how can use city-level db? #4041

Closed
opened 2026-10-31 20:36:43 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @hotick on GitHub (Jul 5, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5817

I need need city-level, such as shanghai of china

Originally posted by @hotick in #5754

Originally created by @hotick on GitHub (Jul 5, 2026). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5817 > I need need city-level, such as shanghai of china _Originally posted by @hotick in [#5754](https://github.com/MHSanaei/3x-ui/issues/5754#issuecomment-4885997494)_
bsakaguchi 2026-10-31 20:36:43 +07:00
  • closed this issue
  • added the
    duplicate
    label
Author
Owner

@github-actions[bot] commented on GitHub (Jul 5, 2026):

This is a continuation of #5754, which you opened and which was already answered and closed. For reference, the relevant points from that thread:

  • 3x-ui's routing rules (geoip:<code> / geosite:<code>) are evaluated by Xray-core's router, not by 3x-ui itself. Xray-core only reads its own compiled geo database format (common/geodata/geodat.proto, loaded via common/geodata/geodat_loader.go) — there is no MaxMind .mmdb reader in xray-core's source, so a raw GeoLite2-City.mmdb cannot be loaded directly by the panel or by Xray.
  • Even if .mmdb support were added upstream in xray-core, its geoip: matcher only resolves country-code tags (e.g. geoip:cn), not city-level entries. City-granularity routing (e.g. Shanghai specifically) is not something the current Xray-core routing engine supports, independent of file format.

Because this depends on Xray-core's routing engine rather than on 3x-ui, it isn't something that can be added in this panel alone. Please continue the discussion on #5754 rather than here.

This reply was generated automatically. A maintainer may follow up.

<!-- gh-comment-id:4886039275 --> @github-actions[bot] commented on GitHub (Jul 5, 2026): This is a continuation of #5754, which you opened and which was already answered and closed. For reference, the relevant points from that thread: - 3x-ui's routing rules (`geoip:<code>` / `geosite:<code>`) are evaluated by Xray-core's router, not by 3x-ui itself. Xray-core only reads its own compiled geo database format (`common/geodata/geodat.proto`, loaded via `common/geodata/geodat_loader.go`) — there is no MaxMind `.mmdb` reader in xray-core's source, so a raw `GeoLite2-City.mmdb` cannot be loaded directly by the panel or by Xray. - Even if `.mmdb` support were added upstream in xray-core, its `geoip:` matcher only resolves country-code tags (e.g. `geoip:cn`), not city-level entries. City-granularity routing (e.g. Shanghai specifically) is not something the current Xray-core routing engine supports, independent of file format. Because this depends on Xray-core's routing engine rather than on 3x-ui, it isn't something that can be added in this panel alone. Please continue the discussion on #5754 rather than here. *This reply was generated automatically. A maintainer may follow up.*
Author
Owner

@hotick commented on GitHub (Jul 5, 2026):

I see, thanks

<!-- gh-comment-id:4886375431 --> @hotick commented on GitHub (Jul 5, 2026): I see, thanks
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MHSanaei/3x-ui#4041
No description provided.