From f1839c938891210fff0e50a65372785b00d20acd Mon Sep 17 00:00:00 2001 From: gSpot Date: Wed, 30 Apr 2025 18:35:48 +0300 Subject: [PATCH] luci-app-ruantiblock: fixed service.js. --- README.md | 12 +++++++++++- autoinstall/2.x/autoinstall.sh | 2 +- luci-app-ruantiblock/Makefile | 2 +- .../resources/view/ruantiblock/service.js | 17 ++++++++++++++++- 4 files changed, 29 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 2dc9878..558a98d 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,17 @@ ## Ruantiblock -Обход блокировок в OpenWrt с помощью Tor или VPN. +Выборочная маршрутизация для обхода блокировок в OpenWrt. + +* Решение построено на стандартных системных службах и утилитах OpenWrt (nftables, dnsmasq). + +* Поддерживаются L3 VPN с маршрутизацией на сетевой интерфейс (OpenVPN, Wireguard, PPTP, Sing-box в режиме tun и пр.), прозрачные прокси с перенаправлением на порт (Sing-box в режиме TProxy, Shadowsock-libev, Redsocks и пр.), Tor. + +* Перенаправление трафика на основе доменов и IP адресов. + +* Гибкие настройки для пользовательских списков, использование нескольких VPN/прокси для разных списков с приоритетами. + +* Интеграция с веб-интерфейсом OpenWrt. Подробно об установке и настройке: [https://github.com/gSpotx2f/ruantiblock_openwrt/wiki](https://github.com/gSpotx2f/ruantiblock_openwrt/wiki) diff --git a/autoinstall/2.x/autoinstall.sh b/autoinstall/2.x/autoinstall.sh index 104c265..d9a4356 100755 --- a/autoinstall/2.x/autoinstall.sh +++ b/autoinstall/2.x/autoinstall.sh @@ -12,7 +12,7 @@ HTTPS_DNS_PROXY=1 OWRT_VERSION="current" RUAB_VERSION="2.1.6-r1" RUAB_MOD_LUA_VERSION="2.1.6-r1" -RUAB_LUCI_APP_VERSION="2.1.6-r1" +RUAB_LUCI_APP_VERSION="2.1.6-r2" BASE_URL="https://raw.githubusercontent.com/gSpotx2f/packages-openwrt/master" PKG_DIR="/tmp" diff --git a/luci-app-ruantiblock/Makefile b/luci-app-ruantiblock/Makefile index daa57f7..fed7c9c 100644 --- a/luci-app-ruantiblock/Makefile +++ b/luci-app-ruantiblock/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-ruantiblock PKG_VERSION:=2.1.6 -PKG_RELEASE:=1 +PKG_RELEASE:=2 LUCI_TITLE:=LuCI support for ruantiblock LUCI_DEPENDS:=+ruantiblock LUCI_PKGARCH:=all diff --git a/luci-app-ruantiblock/htdocs/luci-static/resources/view/ruantiblock/service.js b/luci-app-ruantiblock/htdocs/luci-static/resources/view/ruantiblock/service.js index 4a7cb84..73707bb 100644 --- a/luci-app-ruantiblock/htdocs/luci-static/resources/view/ruantiblock/service.js +++ b/luci-app-ruantiblock/htdocs/luci-static/resources/view/ruantiblock/service.js @@ -32,7 +32,7 @@ return view.extend({ dnsmasqCfgDirsSelect: null, - cancelButton : E('button', { + cancelButton : E('button', { 'id' : 'btn_cancel', 'class': btn_style_neutral, 'click': ui.hideModal, @@ -64,6 +64,21 @@ return view.extend({ }; }; + if(this.currentDnsmasqCfgDir) { + let match = false; + for(let i of available_cfg_dirs) { + if(i[1] == this.currentDnsmasqCfgDir) { + match = true; + break; + }; + }; + if(!match) { + available_cfg_dirs.unshift( + [ `${this.currentDnsmasqCfgDir} [ UCI ]`, this.currentDnsmasqCfgDir ] + ); + }; + }; + this.dnsmasqCfgDirsSelect = E('select', { 'id' : 'dnsmasq_confdirs_list', 'class': "cbi-input-select",