diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 47dd54a7..00305e1a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -158,14 +158,6 @@ jobs: https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat & curl -fL -sS --retry 3 -o geosite.dat \ https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat & - curl -fL -sS --retry 3 -o geoip_IR.dat \ - https://github.com/chocolate4u/Iran-v2ray-rules/releases/latest/download/geoip.dat & - curl -fL -sS --retry 3 -o geosite_IR.dat \ - https://github.com/chocolate4u/Iran-v2ray-rules/releases/latest/download/geosite.dat & - curl -fL -sS --retry 3 -o geoip_RU.dat \ - https://github.com/runetfreedom/russia-v2ray-rules-dat/releases/latest/download/geoip.dat & - curl -fL -sS --retry 3 -o geosite_RU.dat \ - https://github.com/runetfreedom/russia-v2ray-rules-dat/releases/latest/download/geosite.dat & FAILED=0 for job in $(jobs -p); do wait "$job" || FAILED=1; done if [ "$FAILED" -eq 1 ]; then @@ -336,10 +328,6 @@ jobs: # Remove-Item geoip.dat, geosite.dat -ErrorAction SilentlyContinue # Invoke-WebRequest -Uri "https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat" -OutFile "geoip.dat" # Invoke-WebRequest -Uri "https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat" -OutFile "geosite.dat" - # Invoke-WebRequest -Uri "https://github.com/chocolate4u/Iran-v2ray-rules/releases/latest/download/geoip.dat" -OutFile "geoip_IR.dat" - # Invoke-WebRequest -Uri "https://github.com/chocolate4u/Iran-v2ray-rules/releases/latest/download/geosite.dat" -OutFile "geosite_IR.dat" - # Invoke-WebRequest -Uri "https://github.com/runetfreedom/russia-v2ray-rules-dat/releases/latest/download/geoip.dat" -OutFile "geoip_RU.dat" - # Invoke-WebRequest -Uri "https://github.com/runetfreedom/russia-v2ray-rules-dat/releases/latest/download/geosite.dat" -OutFile "geosite_RU.dat" # Rename-Item xray.exe xray-windows-amd64.exe # cd .. # Copy-Item -Path ..\windows_files\* -Destination . -Recurse diff --git a/DockerInit.sh b/DockerInit.sh index a8e87a9e..409c539e 100755 --- a/DockerInit.sh +++ b/DockerInit.sh @@ -33,8 +33,4 @@ rm -f "Xray-linux-${ARCH}.zip" geoip.dat geosite.dat mv xray "xray-linux-${FNAME}" curl -sfLRO https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat curl -sfLRO https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat -curl -sfLRo geoip_IR.dat https://github.com/chocolate4u/Iran-v2ray-rules/releases/latest/download/geoip.dat -curl -sfLRo geosite_IR.dat https://github.com/chocolate4u/Iran-v2ray-rules/releases/latest/download/geosite.dat -curl -sfLRo geoip_RU.dat https://github.com/runetfreedom/russia-v2ray-rules-dat/releases/latest/download/geoip.dat -curl -sfLRo geosite_RU.dat https://github.com/runetfreedom/russia-v2ray-rules-dat/releases/latest/download/geosite.dat cd ../../ \ No newline at end of file diff --git a/README.ar_EG.md b/README.ar_EG.md index 83a0b38d..e8a51b29 100644 --- a/README.ar_EG.md +++ b/README.ar_EG.md @@ -36,9 +36,6 @@ bash <(curl -Ls https://raw.githubusercontent.com/Sora39831/3x-ui/master/install ## الاعتراف -- [Iran v2ray rules](https://github.com/chocolate4u/Iran-v2ray-rules) (الترخيص: **GPL-3.0**): _قواعد توجيه v2ray/xray و v2ray/xray-clients المحسنة مع النطاقات الإيرانية المدمجة وتركيز على الأمان وحظر الإعلانات._ -- [Russia v2ray rules](https://github.com/runetfreedom/russia-v2ray-rules-dat) (الترخيص: **GPL-3.0**): _يحتوي هذا المستودع على قواعد توجيه V2Ray محدثة تلقائيًا بناءً على بيانات النطاقات والعناوين المحظورة في روسيا._ - ## دعم المشروع **إذا كان هذا المشروع مفيدًا لك، فقد ترغب في إعطائه**:star2: diff --git a/README.es_ES.md b/README.es_ES.md index 5958c0ed..89adc473 100644 --- a/README.es_ES.md +++ b/README.es_ES.md @@ -36,9 +36,6 @@ Para documentación completa, visita la [Wiki del proyecto](https://github.com/S ## Reconocimientos -- [Iran v2ray rules](https://github.com/chocolate4u/Iran-v2ray-rules) (Licencia: **GPL-3.0**): _Reglas de enrutamiento mejoradas para v2ray/xray y v2ray/xray-clients con dominios iraníes incorporados y un enfoque en seguridad y bloqueo de anuncios._ -- [Russia v2ray rules](https://github.com/runetfreedom/russia-v2ray-rules-dat) (Licencia: **GPL-3.0**): _Este repositorio contiene reglas de enrutamiento V2Ray actualizadas automáticamente basadas en datos de dominios y direcciones bloqueadas en Rusia._ - ## Apoyar el Proyecto **Si este proyecto te es útil, puedes darle una**:star2: diff --git a/README.fa_IR.md b/README.fa_IR.md index 592165f1..5f93cc2a 100644 --- a/README.fa_IR.md +++ b/README.fa_IR.md @@ -36,9 +36,6 @@ bash <(curl -Ls https://raw.githubusercontent.com/Sora39831/3x-ui/master/install ## قدردانی -- [Iran v2ray rules](https://github.com/chocolate4u/Iran-v2ray-rules) (مجوز: **GPL-3.0**): _قوانین مسیریابی بهبود یافته v2ray/xray و v2ray/xray-clients با دامنه‌های ایرانی داخلی و تمرکز بر امنیت و مسدود کردن تبلیغات._ -- [Russia v2ray rules](https://github.com/runetfreedom/russia-v2ray-rules-dat) (مجوز: **GPL-3.0**): _این مخزن شامل قوانین مسیریابی V2Ray به‌روزرسانی شده خودکار بر اساس داده‌های دامنه‌ها و آدرس‌های مسدود شده در روسیه است._ - ## پشتیبانی از پروژه **اگر این پروژه برای شما مفید است، می‌توانید به آن یک**:star2: بدهید diff --git a/README.md b/README.md index cbf919ec..bde5ca23 100644 --- a/README.md +++ b/README.md @@ -55,9 +55,6 @@ Production builds embed files from `web/public/assets` and `web/public/assets-ma ## Acknowledgment -- [Iran v2ray rules](https://github.com/chocolate4u/Iran-v2ray-rules) (License: **GPL-3.0**): _Enhanced v2ray/xray and v2ray/xray-clients routing rules with built-in Iranian domains and a focus on security and adblocking._ -- [Russia v2ray rules](https://github.com/runetfreedom/russia-v2ray-rules-dat) (License: **GPL-3.0**): _This repository contains automatically updated V2Ray routing rules based on data on blocked domains and addresses in Russia._ - ## Support project **If this project is helpful to you, you may wish to give it a**:star2: diff --git a/README.ru_RU.md b/README.ru_RU.md index e5772fab..25f611c1 100644 --- a/README.ru_RU.md +++ b/README.ru_RU.md @@ -36,9 +36,6 @@ bash <(curl -Ls https://raw.githubusercontent.com/Sora39831/3x-ui/master/install ## Благодарности -- [Iran v2ray rules](https://github.com/chocolate4u/Iran-v2ray-rules) (Лицензия: **GPL-3.0**): _Улучшенные правила маршрутизации для v2ray/xray и v2ray/xray-clients со встроенными иранскими доменами и фокусом на безопасность и блокировку рекламы._ -- [Russia v2ray rules](https://github.com/runetfreedom/russia-v2ray-rules-dat) (Лицензия: **GPL-3.0**): _Этот репозиторий содержит автоматически обновляемые правила маршрутизации V2Ray на основе данных о заблокированных доменах и адресах в России._ - ## Поддержка проекта **Если этот проект полезен для вас, вы можете поставить ему**:star2: diff --git a/README.zh_CN.md b/README.zh_CN.md index a9a0521d..e5de5160 100644 --- a/README.zh_CN.md +++ b/README.zh_CN.md @@ -44,9 +44,6 @@ bash <(curl -Ls https://raw.githubusercontent.com/Sora39831/3x-ui/master/install ## 致谢 -- [Iran v2ray rules](https://github.com/chocolate4u/Iran-v2ray-rules) (许可证: **GPL-3.0**): _增强的 v2ray/xray 和 v2ray/xray-clients 路由规则,内置伊朗域名,专注于安全性和广告拦截。_ -- [Russia v2ray rules](https://github.com/runetfreedom/russia-v2ray-rules-dat) (许可证: **GPL-3.0**): _此仓库包含基于俄罗斯被阻止域名和地址数据自动更新的 V2Ray 路由规则。_ - ## 支持项目 **如果这个项目对您有帮助,您可以给它一个**:star2: diff --git a/config/version b/config/version index f819c546..53cc14cd 100644 --- a/config/version +++ b/config/version @@ -1 +1 @@ -v1.8.0.9 +v1.8.1.0 diff --git a/docs/Tasktracking/2026-04-27-remove-ir-ru-geofiles.md b/docs/Tasktracking/2026-04-27-remove-ir-ru-geofiles.md new file mode 100644 index 00000000..b67c6dfa --- /dev/null +++ b/docs/Tasktracking/2026-04-27-remove-ir-ru-geofiles.md @@ -0,0 +1,34 @@ +# Task Record + +Date: 2026-04-27 +Related Module: web/service, web/html, x-ui.sh, .github, DockerInit, README +Change Type: Refactor + +## Background +IR and RU regional geofile datasets (geoip_IR.dat, geosite_IR.dat, geoip_RU.dat, geosite_RU.dat from chocolate4u/Iran-v2ray-rules and runetfreedom/russia-v2ray-rules-dat) were removed from the project. Only the main Loyalsoldier/v2ray-rules-dat dataset (geoip.dat, geosite.dat) remains. + +## Changes +- `web/service/server.go`: Removed 4 IR/RU entries from `geofileAllowlist`, keeping only `geoip.dat` and `geosite.dat` +- `web/html/index.html`: Removed IR/RU file names from the Geofiles UI file list +- `web/service/server_test.go`: Removed IR/RU file names from `TestIsValidGeofileName_Valid` +- `web/html/xray.html`: Removed all `ext:geoip_IR.dat`, `ext:geosite_IR.dat`, `ext:geosite_RU.dat` routing rule presets from IPsOptions, DomainsOptions, and BlockDomainsOptions. Kept `regexp:` entries for .ir, .ru, .su, .рф domains which do not depend on the .dat files. +- `x-ui.sh`: Removed IR and RU cases from `update_geofiles()`, `update_all_geofiles()`, and `update_geo()` menu +- `.github/workflows/release.yml`: Removed IR/RU download steps from build pipeline +- `DockerInit.sh`: Removed IR/RU download lines +- `README.md` / `README.zh_CN.md` / `README.ru_RU.md` / `README.fa_IR.md` / `README.es_ES.md` / `README.ar_EG.md`: Removed Iran/Russia v2ray rules acknowledgment lines + +## Impact +- Geofile allowlist reduced from 6 to 2 files +- Geofile update/sync now only downloads geoip.dat and geosite.dat +- Routing rule UI no longer offers ext: prefixed IR/RU options +- Shell install script and CI no longer download IR/RU files +- No database schema changes, no API endpoint changes + +## Verification +- `gofmt -l -w .` passed with no changes +- `go vet ./...` passed with no errors +- All IR/RU references confirmed removed from 12 files + +## Risks And Follow-Up +- Users with existing Xray routing rules referencing `ext:geoip_IR.dat`, `ext:geosite_IR.dat`, or `ext:geosite_RU.dat` will need to update their configurations +- Existing .dat files on disk are not automatically deleted; users may manually remove them from the bin/ directory diff --git a/web/html/index.html b/web/html/index.html index 3eebb40a..cecfa3f4 100644 --- a/web/html/index.html +++ b/web/html/index.html @@ -330,7 +330,7 @@ + v-for="file, index in ['geosite.dat', 'geoip.dat']"> [[ file ]] diff --git a/web/html/xray.html b/web/html/xray.html index 4de6676c..2622b54f 100644 --- a/web/html/xray.html +++ b/web/html/xray.html @@ -325,9 +325,7 @@ }, IPsOptions: [ { label: 'Private IPs', value: 'geoip:private' }, - { label: '🇮🇷 Iran', value: 'ext:geoip_IR.dat:ir' }, { label: '🇨🇳 China', value: 'geoip:cn' }, - { label: '🇷🇺 Russia', value: 'ext:geoip_RU.dat:ru' }, { label: '🇻🇳 Vietnam', value: 'geoip:vn' }, { label: '🇪🇸 Spain', value: 'geoip:es' }, { label: '🇮🇩 Indonesia', value: 'geoip:id' }, @@ -336,12 +334,10 @@ { label: '🇧🇷 Brazil', value: 'geoip:br' }, ], DomainsOptions: [ - { label: '🇮🇷 Iran', value: 'ext:geosite_IR.dat:ir' }, { label: '🇮🇷 .ir', value: 'regexp:.*\\.ir$' }, { label: '🇮🇷 .ایران', value: 'regexp:.*\\.xn--mgba3a4f16a$' }, { label: '🇨🇳 China', value: 'geosite:cn' }, { label: '🇨🇳 .cn', value: 'regexp:.*\\.cn$' }, - { label: '🇷🇺 Russia', value: 'ext:geosite_RU.dat:ru-available-only-inside' }, { label: '🇷🇺 .ru', value: 'regexp:.*\\.ru$' }, { label: '🇷🇺 .su', value: 'regexp:.*\\.su$' }, { label: '🇷🇺 .рф', value: 'regexp:.*\\.xn--p1ai$' }, @@ -349,18 +345,11 @@ ], BlockDomainsOptions: [ { label: 'Ads All', value: 'geosite:category-ads-all' }, - { label: 'Ads IR 🇮🇷', value: 'ext:geosite_IR.dat:category-ads-all' }, - { label: 'Ads RU 🇷🇺', value: 'ext:geosite_RU.dat:category-ads-all' }, - { label: 'Malware 🇮🇷', value: 'ext:geosite_IR.dat:malware' }, - { label: 'Phishing 🇮🇷', value: 'ext:geosite_IR.dat:phishing' }, - { label: 'Cryptominers 🇮🇷', value: 'ext:geosite_IR.dat:cryptominers' }, { label: 'Adult +18', value: 'geosite:category-porn' }, - { label: '🇮🇷 Iran', value: 'ext:geosite_IR.dat:ir' }, { label: '🇮🇷 .ir', value: 'regexp:.*\\.ir$' }, { label: '🇮🇷 .ایران', value: 'regexp:.*\\.xn--mgba3a4f16a$' }, { label: '🇨🇳 China', value: 'geosite:cn' }, { label: '🇨🇳 .cn', value: 'regexp:.*\\.cn$' }, - { label: '🇷🇺 Russia', value: 'ext:geosite_RU.dat:ru-available-only-inside' }, { label: '🇷🇺 .ru', value: 'regexp:.*\\.ru$' }, { label: '🇷🇺 .su', value: 'regexp:.*\\.su$' }, { label: '🇷🇺 .рф', value: 'regexp:.*\\.xn--p1ai$' }, diff --git a/web/service/server.go b/web/service/server.go index 8cb895a3..dca560af 100644 --- a/web/service/server.go +++ b/web/service/server.go @@ -1069,12 +1069,8 @@ func (s *ServerService) UpdateGeofile(fileName string) error { FileName string } geofileAllowlist := map[string]geofileEntry{ - "geoip.dat": {"https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat", "geoip.dat"}, - "geosite.dat": {"https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat", "geosite.dat"}, - "geoip_IR.dat": {"https://github.com/chocolate4u/Iran-v2ray-rules/releases/latest/download/geoip.dat", "geoip_IR.dat"}, - "geosite_IR.dat": {"https://github.com/chocolate4u/Iran-v2ray-rules/releases/latest/download/geosite.dat", "geosite_IR.dat"}, - "geoip_RU.dat": {"https://github.com/runetfreedom/russia-v2ray-rules-dat/releases/latest/download/geoip.dat", "geoip_RU.dat"}, - "geosite_RU.dat": {"https://github.com/runetfreedom/russia-v2ray-rules-dat/releases/latest/download/geosite.dat", "geosite_RU.dat"}, + "geoip.dat": {"https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat", "geoip.dat"}, + "geosite.dat": {"https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat", "geosite.dat"}, } // Strict allowlist check to avoid writing uncontrolled files diff --git a/web/service/server_test.go b/web/service/server_test.go index a04b5e89..e6fa5d55 100644 --- a/web/service/server_test.go +++ b/web/service/server_test.go @@ -9,9 +9,6 @@ func TestIsValidGeofileName_Valid(t *testing.T) { valid := []string{ "geoip.dat", "geosite.dat", - "geoip_IR.dat", - "geoip_RU.dat", - "geosite_IR.dat", "custom-file_v2.dat", } for _, name := range valid { diff --git a/x-ui.sh b/x-ui.sh index 7d93e607..8262b8e8 100644 --- a/x-ui.sh +++ b/x-ui.sh @@ -1078,15 +1078,11 @@ delete_ports() { update_all_geofiles() { update_geofiles "main" - update_geofiles "IR" - update_geofiles "RU" } update_geofiles() { case "${1}" in "main") dat_files=(geoip geosite); dat_source="Loyalsoldier/v2ray-rules-dat";; - "IR") dat_files=(geoip_IR geosite_IR); dat_source="chocolate4u/Iran-v2ray-rules" ;; - "RU") dat_files=(geoip_RU geosite_RU); dat_source="runetfreedom/russia-v2ray-rules-dat";; esac for dat in "${dat_files[@]}"; do # 移除后缀获取远程文件名(例如 geoip_IR -> geoip) @@ -1098,9 +1094,6 @@ update_geofiles() { update_geo() { echo -e "${green}\t1.${plain} Loyalsoldier (geoip.dat, geosite.dat)" - echo -e "${green}\t2.${plain} chocolate4u (geoip_IR.dat, geosite_IR.dat)" - echo -e "${green}\t3.${plain} runetfreedom (geoip_RU.dat, geosite_RU.dat)" - echo -e "${green}\t4.${plain} 全部更新" echo -e "${green}\t0.${plain} 返回主菜单" read -rp "请选择:" choice @@ -1113,21 +1106,6 @@ update_geo() { echo -e "${green}Loyalsoldier 数据集更新成功!${plain}" restart ;; - 2) - update_geofiles "IR" - echo -e "${green}chocolate4u 数据集更新成功!${plain}" - restart - ;; - 3) - update_geofiles "RU" - echo -e "${green}runetfreedom 数据集更新成功!${plain}" - restart - ;; - 4) - update_all_geofiles - echo -e "${green}所有 geo 文件更新成功!${plain}" - restart - ;; *) echo -e "${red}无效选项,请选择有效数字。${plain}\n" update_geo