mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 19:11:53 +07:00
[PR #5357] [CLOSED] Restore the Custom Geo Manager #5855
Labels
No labels
backlog
bug
clarification needed
documentation
duplicate
enhancement
github_actions
good first issue
invalid
javascript
New Feature
PR welcomed
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MHSanaei/3x-ui#5855
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/MHSanaei/3x-ui/pull/5357
Author: @mixa2130
Created: 6/15/2026
Status: ❌ Closed
Base:
main← Head:main📝 Commits (4)
38a7a43feat(custom-geo): restore Custom Geo manager with cronb931f51fix(custom-geo): repair three CI failures from feat commitd759240Merge branch 'develop' into main4151214Merge branch 'main' into main📊 Changes
36 files changed (+2837 additions, -780 deletions)
View changed files
📝
Dockerfile(+1 -1)📝
frontend/package-lock.json(+0 -30)📝
frontend/public/openapi.json(+392 -0)📝
frontend/src/generated/examples.ts(+2 -0)📝
frontend/src/generated/schemas.ts(+10 -0)📝
frontend/src/generated/types.ts(+2 -0)📝
frontend/src/generated/zod.ts(+2 -0)📝
frontend/src/pages/api-docs/endpoints.ts(+74 -0)➕
frontend/src/pages/index/CustomGeoFormModal.tsx(+114 -0)➕
frontend/src/pages/index/CustomGeoSection.css(+77 -0)➕
frontend/src/pages/index/CustomGeoSection.tsx(+339 -0)📝
frontend/src/pages/index/VersionModal.tsx(+6 -0)📝
frontend/src/schemas/xray.ts(+22 -0)📝
internal/database/db.go(+1 -0)📝
internal/database/migrate_data.go(+1 -0)📝
internal/database/model/model.go(+12 -0)📝
internal/web/controller/api.go(+7 -3)📝
internal/web/controller/api_docs_test.go(+2 -0)➕
internal/web/controller/custom_geo.go(+205 -0)📝
internal/web/entity/entity.go(+3 -0)...and 16 more files
📄 Description
Summary
Restores the Custom Geo Manager as a new tab in the Xray Updates modal, allowing users
to define custom geoip/geosite sources with user-supplied URLs and aliases. Adds
cron-based auto-update scheduling for all custom sources. Also fixes three CI failures
that were introduced in the same commit (missing i18n keys, undocumented API routes,
stale generated files).
Why
The Custom Geo Manager was previously removed, which eliminated the ability to use
user-defined geodata files referenced in routing rules as ext:geoip_alias.dat:tag.
Users who rely on custom IP/domain lists for routing had no way to manage them from the
panel.
Type of change
Areas affected
How was this tested?
Backend:
verifies all 9 new /panel/api/custom-geo/* routes are documented
Frontend:
previously broken by missing i18n keys
after npm run gen
Manual:
Open the panel → Xray Updates modal → Custom Geo tab
Add a new resource (type: geoip, alias:
roscomvpn, URL:https://github.com/hydraponique/roscomvpn-geoip/releases/latest/download/geoip.dat)Click save — file fetches successfully
Set a cron schedule (e.g. 0 3 * * *) — verified it persists across panel restarts
without requiring a restart
Delete a resource — file is removed from disk
Click Update All — all custom resources update in one shot
Reference the alias in a routing rule as ext:geoip_mylist.dat:tag
Screenshots / recordings
Breaking changes
None. The feature adds a new database table (custom_geo_resources) via auto-migration.
No existing schema is modified.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.