diff --git a/autoinstall/autoinstall.sh b/autoinstall/autoinstall.sh index 6be8e03..df1d378 100755 --- a/autoinstall/autoinstall.sh +++ b/autoinstall/autoinstall.sh @@ -9,9 +9,9 @@ LUA_MODULE=1 LUCI_APP=1 OWRT_VERSION="current" -RUAB_VERSION="0.9.1-1" -RUAB_MOD_LUA_VERSION="0.9.1-1" -RUAB_LUCI_APP_VERSION="0.9.1-1" +RUAB_VERSION="0.9.1-2" +RUAB_MOD_LUA_VERSION="0.9.1-2" +RUAB_LUCI_APP_VERSION="0.9.1-2" BASE_URL="https://github.com/gSpotx2f/packages-openwrt/raw/master" PKG_DIR="/tmp" @@ -211,17 +211,11 @@ TorrcSettings() { } InstallTorConfig() { - local _if_lan InstallPackages "tor" "tor-geoip" BackupFile "$FILE_TORRC" DlFile "$URL_TORRC" "$FILE_TORRC" TorrcSettings $UCI_CMD set ruantiblock.config.proxy_mode="1" - _if_lan=`$UCI_CMD get network.lan.ifname` - if [ -z "$_if_lan" ]; then - _if_lan="eth0" - fi - $UCI_CMD set ruantiblock.config.if_lan="$_if_lan" # dnsmasq rebind protection $UCI_CMD set dhcp.@dnsmasq[0].rebind_localhost='1' $UCI_CMD set dhcp.@dnsmasq[0].rebind_domain='.onion' diff --git a/luci-app-ruantiblock/Makefile b/luci-app-ruantiblock/Makefile index 5144860..d56a270 100644 --- a/luci-app-ruantiblock/Makefile +++ b/luci-app-ruantiblock/Makefile @@ -4,7 +4,7 @@ include $(TOPDIR)/rules.mk -PKG_VERSION:=0.9.1-1 +PKG_VERSION:=0.9.1-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/settings.js b/luci-app-ruantiblock/htdocs/luci-static/resources/view/ruantiblock/settings.js index e7a060f..14a322a 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 @@ -62,7 +62,6 @@ return view.extend({ }; this.appStatusCode = data[0].code; let p_dir_arr = data[1]; - let lan_iface = uci.get('network', 'lan', 'ifname') || 'eth0'; let vpn_iface = uci.get('network', 'VPN', 'ifname') || 'tun0'; if(p_dir_arr) { @@ -162,8 +161,7 @@ return view.extend({ _('LAN interface')); o.multiple = false; o.noaliases = true; - o.rmempty = false; - o.default = lan_iface; + o.optional = true; // TOR_TRANS_PORT o = s.taboption('tor_settings', form.Value, 'tor_trans_port', diff --git a/ruantiblock-mod-lua/Makefile b/ruantiblock-mod-lua/Makefile index ee54d8e..0a866d1 100644 --- a/ruantiblock-mod-lua/Makefile +++ b/ruantiblock-mod-lua/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ruantiblock-mod-lua PKG_VERSION:=0.9.1 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_MAINTAINER:=gSpot include $(INCLUDE_DIR)/package.mk diff --git a/ruantiblock-mod-py/Makefile b/ruantiblock-mod-py/Makefile index 02ab551..484eee0 100644 --- a/ruantiblock-mod-py/Makefile +++ b/ruantiblock-mod-py/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ruantiblock-mod-py PKG_VERSION:=0.9.1 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_MAINTAINER:=gSpot include $(INCLUDE_DIR)/package.mk diff --git a/ruantiblock/Makefile b/ruantiblock/Makefile index ca904d9..fb8d5d6 100644 --- a/ruantiblock/Makefile +++ b/ruantiblock/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ruantiblock PKG_VERSION:=0.9.1 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_MAINTAINER:=gSpot include $(INCLUDE_DIR)/package.mk diff --git a/ruantiblock/files/etc/config/ruantiblock b/ruantiblock/files/etc/config/ruantiblock index be037a9..81537cd 100644 --- a/ruantiblock/files/etc/config/ruantiblock +++ b/ruantiblock/files/etc/config/ruantiblock @@ -3,7 +3,6 @@ config main 'config' option proxy_mode '1' option proxy_local_clients '1' option ipset_clear_sets '0' - option if_lan 'eth0' option if_vpn 'tun0' option tor_trans_port '9040' option onion_dns_addr '127.0.0.1#9053' diff --git a/ruantiblock/files/etc/ruantiblock/fqdn_filter b/ruantiblock/files/etc/ruantiblock/fqdn_filter index b5d72b9..2ba4ca6 100644 --- a/ruantiblock/files/etc/ruantiblock/fqdn_filter +++ b/ruantiblock/files/etc/ruantiblock/fqdn_filter @@ -1,4 +1,3 @@ -^youtube[.]com parimatch paripartners marathon diff --git a/ruantiblock/files/etc/ruantiblock/ruantiblock.conf b/ruantiblock/files/etc/ruantiblock/ruantiblock.conf index d4435f9..765da1d 100644 --- a/ruantiblock/files/etc/ruantiblock/ruantiblock.conf +++ b/ruantiblock/files/etc/ruantiblock/ruantiblock.conf @@ -17,7 +17,7 @@ PROXY_LOCAL_CLIENTS=1 ### Удаление записей из основных сетов перед началом заполнения временных сетов при обновлении (для освобождения оперативной памяти перед заполнением сетов) (0 - off, 1 - on) IPSET_CLEAR_SETS=0 ### Входящий сетевой интерфейс для правил iptables -IF_LAN="eth0" +IF_LAN="" ### VPN интерфейс для правил маршрутизации IF_VPN="tun0" ### Порт транспарентного proxy Tor (параметр TransPort в torrc) diff --git a/ruantiblock/files/etc/ruantiblock/scripts/ipt_functions b/ruantiblock/files/etc/ruantiblock/scripts/ipt_functions index af00493..aa3d0ab 100644 --- a/ruantiblock/files/etc/ruantiblock/scripts/ipt_functions +++ b/ruantiblock/files/etc/ruantiblock/scripts/ipt_functions @@ -7,7 +7,11 @@ VPN_ROUTE_TABLE=99 ### Tor IPT_TABLE="nat" -IPT_FIRST_CHAIN_RULE="-i ${IF_LAN} -j ${IPT_CHAIN}" +if [ -n "$IF_LAN" ]; then + IPT_FIRST_CHAIN_RULE="-i ${IF_LAN} -j ${IPT_CHAIN}" +else + IPT_FIRST_CHAIN_RULE="-j ${IPT_CHAIN}" +fi IPT_IPSET_TARGET="dst -p tcp -j REDIRECT --to-ports ${TOR_TRANS_PORT}" IPT_IPSETS="${IPSET_ONION} ${IPSET_CIDR} ${IPSET_IP} ${IPSET_DNSMASQ}" diff --git a/ruantiblock/files/usr/bin/ruantiblock b/ruantiblock/files/usr/bin/ruantiblock index 0ac25cd..ec2069b 100755 --- a/ruantiblock/files/usr/bin/ruantiblock +++ b/ruantiblock/files/usr/bin/ruantiblock @@ -32,7 +32,7 @@ export PROXY_LOCAL_CLIENTS=1 ### Удаление записей из основных сетов перед началом заполнения временных сетов при обновлении (для освобождения оперативной памяти перед заполнением сетов) (0 - off, 1 - on) export IPSET_CLEAR_SETS=0 ### Входящий сетевой интерфейс для правил iptables -export IF_LAN="eth0" +export IF_LAN="" ### VPN интерфейс для правил iptables export IF_VPN="tun0" ### Порт транспарентного proxy Tor (параметр TransPort в torrc)