[PR #3980] [MERGED] Add custom geosite/geoip URL sources #5574

Closed
opened 2026-10-31 20:47:55 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/MHSanaei/3x-ui/pull/3980
Author: @MrRefactoring
Created: 3/30/2026
Status: ✅ Merged
Merged: 4/19/2026
Merged by: @MHSanaei

Base: main ← Head: feature/custom-geo-sources


📝 Commits (2)

📊 Changes

30 files changed (+1974 additions, -14 deletions)

View changed files

📝 README.ar_EG.md (+8 -0)
📝 README.es_ES.md (+8 -0)
📝 README.fa_IR.md (+8 -0)
📝 README.md (+8 -0)
📝 README.ru_RU.md (+8 -0)
📝 README.zh_CN.md (+8 -0)
📝 database/db.go (+2 -2)
📝 database/model/model.go (+12 -0)
📝 web/assets/css/custom.min.css (+1 -1)
📝 web/controller/api.go (+5 -3)
➕ web/controller/custom_geo.go (+174 -0)
📝 web/controller/util.go (+11 -2)
📝 web/html/index.html (+220 -2)
📝 web/html/xray.html (+27 -0)
➕ web/service/custom_geo.go (+603 -0)
➕ web/service/custom_geo_test.go (+330 -0)
📝 web/translation/translate.ar_EG.toml (+41 -0)
📝 web/translation/translate.en_US.toml (+41 -0)
📝 web/translation/translate.es_ES.toml (+41 -0)
📝 web/translation/translate.fa_IR.toml (+41 -0)

...and 10 more files

📄 Description

What is the pull request?

Adds support for custom GeoSite and GeoIP .dat sources configured from URLs in the panel. Admins can register aliases, download or refresh files into bin/ (as geosite_<alias>.dat / geoip_<alias>.dat), list and manage entries, and use them in routing via Xray’s ext: form (e.g. ext:geosite_myalias.dat:tag). Includes REST API under /panel/api/custom-geo/, UI on the index page, Xray rule presets that load user aliases, README updates, and unit tests for the download/service logic. Translations were added for the new strings across supported locales.

Closes #3331
Closes #3047

Which part of the application is affected by the change?

  • Frontend
  • Backend

Type of Changes

  • Bug fix
  • New feature
  • Refactoring
  • Other

Screenshots

Before After
telegram-cloud-document-2-5355248954487379143 telegram-cloud-document-2-5352540539520589930
telegram-cloud-document-2-5355248954487379144 telegram-cloud-document-2-5352540539520589929

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/MHSanaei/3x-ui/pull/3980 **Author:** [@MrRefactoring](https://github.com/MrRefactoring) **Created:** 3/30/2026 **Status:** ✅ Merged **Merged:** 4/19/2026 **Merged by:** [@MHSanaei](https://github.com/MHSanaei) **Base:** `main` ← **Head:** `feature/custom-geo-sources` --- ### 📝 Commits (2) - [`0b45732`](https://github.com/MHSanaei/3x-ui/commit/0b45732422d685f8442dcfe6f2805db98f4a3e0b) feat: add custom geosite/geoip URL sources - [`96f3768`](https://github.com/MHSanaei/3x-ui/commit/96f3768d53d942493694bd942b8a44cf593c0cb1) fix ### 📊 Changes **30 files changed** (+1974 additions, -14 deletions) <details> <summary>View changed files</summary> 📝 `README.ar_EG.md` (+8 -0) 📝 `README.es_ES.md` (+8 -0) 📝 `README.fa_IR.md` (+8 -0) 📝 `README.md` (+8 -0) 📝 `README.ru_RU.md` (+8 -0) 📝 `README.zh_CN.md` (+8 -0) 📝 `database/db.go` (+2 -2) 📝 `database/model/model.go` (+12 -0) 📝 `web/assets/css/custom.min.css` (+1 -1) 📝 `web/controller/api.go` (+5 -3) ➕ `web/controller/custom_geo.go` (+174 -0) 📝 `web/controller/util.go` (+11 -2) 📝 `web/html/index.html` (+220 -2) 📝 `web/html/xray.html` (+27 -0) ➕ `web/service/custom_geo.go` (+603 -0) ➕ `web/service/custom_geo_test.go` (+330 -0) 📝 `web/translation/translate.ar_EG.toml` (+41 -0) 📝 `web/translation/translate.en_US.toml` (+41 -0) 📝 `web/translation/translate.es_ES.toml` (+41 -0) 📝 `web/translation/translate.fa_IR.toml` (+41 -0) _...and 10 more files_ </details> ### 📄 Description ## What is the pull request? Adds support for **custom GeoSite and GeoIP `.dat` sources** configured from URLs in the panel. Admins can register aliases, download or refresh files into `bin/` (as `geosite_<alias>.dat` / `geoip_<alias>.dat`), list and manage entries, and use them in routing via Xray’s `ext:` form (e.g. `ext:geosite_myalias.dat:tag`). Includes REST API under `/panel/api/custom-geo/`, UI on the index page, Xray rule presets that load user aliases, README updates, and unit tests for the download/service logic. Translations were added for the new strings across supported locales. **Closes #3331** **Closes #3047** ## Which part of the application is affected by the change? - [x] Frontend - [x] Backend ## Type of Changes - [ ] Bug fix - [x] New feature - [ ] Refactoring - [ ] Other ## Screenshots | Before | After | |------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | <img width="3456" height="2142" alt="telegram-cloud-document-2-5355248954487379143" src="https://github.com/user-attachments/assets/8b988e90-a944-4da4-b64c-cdf708a6a720" /> | <img width="3456" height="2142" alt="telegram-cloud-document-2-5352540539520589930" src="https://github.com/user-attachments/assets/6c389124-effe-4110-81ea-74f020175353" /> | | <img width="3456" height="1992" alt="telegram-cloud-document-2-5355248954487379144" src="https://github.com/user-attachments/assets/0a42ffff-ab31-4c7f-aa3d-30d8285081a6" /> | <img width="3456" height="1992" alt="telegram-cloud-document-2-5352540539520589929" src="https://github.com/user-attachments/assets/02c806f6-e148-409e-9281-f74559d2894b" /> | --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 20:47:55 +07:00
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#5574
No description provided.