From a23fa962cfc9748739dc09f11f12fe9cb90ae5ba Mon Sep 17 00:00:00 2001 From: fgsfds <4870330+fgsfds@users.noreply.github.com> Date: Thu, 6 Nov 2025 21:23:15 +0500 Subject: [PATCH] cleanup --- x-ui.sh | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/x-ui.sh b/x-ui.sh index bafe8a80..4b0989eb 100644 --- a/x-ui.sh +++ b/x-ui.sh @@ -864,10 +864,22 @@ delete_ports() { } update_all_geofiles() { + update_main_geofiles + update_ir_geofiles + update_ru_geofiles +} + +update_main_geofiles() { wget -O geoip.dat https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat wget -O geosite.dat https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat +} + +update_ir_geofiles() { wget -O geoip_IR.dat https://github.com/chocolate4u/Iran-v2ray-rules/releases/latest/download/geoip.dat wget -O geosite_IR.dat https://github.com/chocolate4u/Iran-v2ray-rules/releases/latest/download/geosite.dat +} + +update_ru_geofiles() { wget -O geoip_RU.dat https://github.com/runetfreedom/russia-v2ray-rules-dat/releases/latest/download/geoip.dat wget -O geosite_RU.dat https://github.com/runetfreedom/russia-v2ray-rules-dat/releases/latest/download/geosite.dat } @@ -887,29 +899,22 @@ update_geo() { show_menu ;; 1) - wget -O geoip.dat https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat - wget -O geosite.dat https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat - + update_main_geofiles echo -e "${green}Loyalsoldier datasets have been updated successfully!${plain}" restart ;; 2) - wget -O geoip_IR.dat https://github.com/chocolate4u/Iran-v2ray-rules/releases/latest/download/geoip.dat - wget -O geosite_IR.dat https://github.com/chocolate4u/Iran-v2ray-rules/releases/latest/download/geosite.dat - + update_ir_geofiles echo -e "${green}chocolate4u datasets have been updated successfully!${plain}" restart ;; 3) - wget -O geoip_RU.dat https://github.com/runetfreedom/russia-v2ray-rules-dat/releases/latest/download/geoip.dat - wget -O geosite_RU.dat https://github.com/runetfreedom/russia-v2ray-rules-dat/releases/latest/download/geosite.dat - + update_ru_geofiles echo -e "${green}runetfreedom datasets have been updated successfully!${plain}" restart ;; 4) update_all_geofiles - echo -e "${green}All geo files have been updated successfully!${plain}" restart ;;