From 0e750f4c2d05c48ea898ca0eeb5916c5ffc39c2d Mon Sep 17 00:00:00 2001 From: StressOzz <131419324+StressOzz@users.noreply.github.com> Date: Fri, 31 Oct 2025 23:38:26 +0500 Subject: [PATCH] =?UTF-8?q?3=20=D0=BF=D1=83=D0=BD=D0=BA=D1=82=20add=20=20?= =?UTF-8?q?=D0=B2=D0=BE=D0=B7=D0=B2=D1=80=D0=B0=D1=82=20hostlist?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Zapret-Manager.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Zapret-Manager.sh b/Zapret-Manager.sh index c27a627..29e454a 100644 --- a/Zapret-Manager.sh +++ b/Zapret-Manager.sh @@ -520,12 +520,24 @@ comeback_def () { if [ -f /opt/zapret/restore-def-cfg.sh ]; then rm -f /opt/zapret/init.d/openwrt/custom.d/50-script.sh [ -f /etc/init.d/zapret ] && /etc/init.d/zapret stop >/dev/null 2>&1 + +echo -e "${GREEN}🔴 ${CYAN}Возвращаем настройки, стратегию и Host list к значениям по умолчанию${NC}" + echo -e "" + + IPSET_DIR="/opt/zapret/ipset" + mkdir -p "$IPSET_DIR" + FILES="zapret-hosts-google.txt zapret-hosts-user-exclude.txt" + URL_BASE="https://raw.githubusercontent.com/remittor/zapret-openwrt/master/zapret/ipset" + for f in $FILES; do + curl -fsSLo "$IPSET_DIR/$f" "$URL_BASE/$f" + done + chmod +x /opt/zapret/restore-def-cfg.sh /opt/zapret/restore-def-cfg.sh chmod +x /opt/zapret/sync_config.sh /opt/zapret/sync_config.sh [ -f /etc/init.d/zapret ] && /etc/init.d/zapret restart >/dev/null 2>&1 - echo -e "${BLUE}🔴 ${GREEN}Настройки возвращены, сервис перезапущен !${NC}" + echo -e "${BLUE}🔴 ${GREEN}Настройки по умолчанию возвращены !${NC}" else echo -e "${RED}Zapret не установлен !${NC}" fi