From c1974ecb34363cefe7d45e8448e54fbb9efa0945 Mon Sep 17 00:00:00 2001 From: gSpot Date: Sat, 28 May 2022 20:17:52 +0300 Subject: [PATCH] Fixed autoinstall.sh --- autoinstall/autoinstall.sh | 13 +++++-------- .../resources/view/ruantiblock/settings.js | 2 +- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/autoinstall/autoinstall.sh b/autoinstall/autoinstall.sh index 48b2850..c16c792 100755 --- a/autoinstall/autoinstall.sh +++ b/autoinstall/autoinstall.sh @@ -185,12 +185,8 @@ InstallBaseConfig() { InstallVPNConfig() { local _if_vpn $UCI_CMD set ruantiblock.config.proxy_mode="2" - _if_vpn=`$UCI_CMD get network.VPN.ifname` - if [ -z "$_if_vpn" ]; then - _if_vpn="tun0" - fi - $UCI_CMD set ruantiblock.config.if_vpn="$_if_vpn" - $UCI_CMD commit + $UCI_CMD set ruantiblock.config.if_vpn="tun0" + $UCI_CMD commit ruantiblock } TorrcSettings() { @@ -211,10 +207,11 @@ InstallTorConfig() { DlFile "$URL_TORRC" "$FILE_TORRC" TorrcSettings $UCI_CMD set ruantiblock.config.proxy_mode="1" + $UCI_CMD commit ruantiblock # dnsmasq rebind protection $UCI_CMD set dhcp.@dnsmasq[0].rebind_localhost='1' $UCI_CMD set dhcp.@dnsmasq[0].rebind_domain='.onion' - $UCI_CMD commit + $UCI_CMD commit dhcp } InstallLuaModule() { @@ -224,7 +221,7 @@ InstallLuaModule() { FileExists "$FILE_LUA_IPTOOL" || DlFile "$URL_LUA_IPTOOL" "$FILE_LUA_IPTOOL" FileExists "$FILE_LUA_IDN" || DlFile "$URL_LUA_IDN" "$FILE_LUA_IDN" $UCI_CMD set ruantiblock.config.bllist_module="/usr/libexec/ruantiblock/ruab_parser.lua" - $UCI_CMD commit + $UCI_CMD commit ruantiblock } InstallLuciApp() { diff --git a/luci-app-ruantiblock/htdocs/luci-static/resources/view/ruantiblock/settings.js b/luci-app-ruantiblock/htdocs/luci-static/resources/view/ruantiblock/settings.js index 92c7d5b..f5ef89d 100644 --- a/luci-app-ruantiblock/htdocs/luci-static/resources/view/ruantiblock/settings.js +++ b/luci-app-ruantiblock/htdocs/luci-static/resources/view/ruantiblock/settings.js @@ -143,7 +143,7 @@ return view.extend({ o.value('2', _('All hosts except listed')); o.description = _('Restriction of hosts that are allowed to bypass blocking'); - // ALOWED_HOSTS_LIST + // ALLOWED_HOSTS_LIST o = s.taboption('main_settings', form.DynamicList, 'allowed_hosts_list', _('IP addresses of hosts')); o.datatype = "ip4addr";