diff --git a/autoinstall/autoinstall.sh b/autoinstall/autoinstall.sh index d7fbf72..0afb0ce 100755 --- a/autoinstall/autoinstall.sh +++ b/autoinstall/autoinstall.sh @@ -8,9 +8,9 @@ LUA_MODULE=1 LUCI_APP=1 OWRT_VERSION="current" -RUAB_VERSION="0.9.3-0" -RUAB_MOD_LUA_VERSION="0.9.3-0" -RUAB_LUCI_APP_VERSION="0.9.3-0" +RUAB_VERSION="0.9.4-0" +RUAB_MOD_LUA_VERSION="0.9.4-0" +RUAB_LUCI_APP_VERSION="0.9.4-0" 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 f213a48..8714490 100644 --- a/luci-app-ruantiblock/Makefile +++ b/luci-app-ruantiblock/Makefile @@ -4,7 +4,7 @@ include $(TOPDIR)/rules.mk -PKG_VERSION:=0.9.3-0 +PKG_VERSION:=0.9.4-0 LUCI_TITLE:=LuCI support for ruantiblock LUCI_DEPENDS:=+ruantiblock LUCI_PKGARCH:=all diff --git a/luci-app-ruantiblock/htdocs/luci-static/resources/view/ruantiblock/info.js b/luci-app-ruantiblock/htdocs/luci-static/resources/view/ruantiblock/info.js index 68ed896..6a45372 100644 --- a/luci-app-ruantiblock/htdocs/luci-static/resources/view/ruantiblock/info.js +++ b/luci-app-ruantiblock/htdocs/luci-static/resources/view/ruantiblock/info.js @@ -113,18 +113,18 @@ return view.extend({ 'id': 'last_blacklist_update.date' }, data.last_blacklist_update.date), ]), - E('tr', { 'class': 'tr' }, [ - E('td', { 'class': 'td left' }, 'IP:'), - E('td', { 'class': 'td left', - 'id': 'last_blacklist_update.ip' }, - data.last_blacklist_update.ip), - ]), E('tr', { 'class': 'tr' }, [ E('td', { 'class': 'td left' }, 'CIDR:'), E('td', { 'class': 'td left', 'id': 'last_blacklist_update.cidr' }, data.last_blacklist_update.cidr), ]), + E('tr', { 'class': 'tr' }, [ + E('td', { 'class': 'td left' }, 'IP:'), + E('td', { 'class': 'td left', + 'id': 'last_blacklist_update.ip' }, + data.last_blacklist_update.ip), + ]), E('tr', { 'class': 'tr' }, [ E('td', { 'class': 'td left' }, 'FQDN:'), E('td', { 'class': 'td left', diff --git a/ruantiblock-mod-lua/Makefile b/ruantiblock-mod-lua/Makefile index b348da9..ee9bc96 100644 --- a/ruantiblock-mod-lua/Makefile +++ b/ruantiblock-mod-lua/Makefile @@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ruantiblock-mod-lua -PKG_VERSION:=0.9.3 +PKG_VERSION:=0.9.4 PKG_RELEASE:=0 PKG_MAINTAINER:=gSpot diff --git a/ruantiblock-mod-lua/files/usr/libexec/ruantiblock/ruab_parser.lua b/ruantiblock-mod-lua/files/usr/libexec/ruantiblock/ruab_parser.lua index dfd014d..d9be23b 100755 --- a/ruantiblock-mod-lua/files/usr/libexec/ruantiblock/ruab_parser.lua +++ b/ruantiblock-mod-lua/files/usr/libexec/ruantiblock/ruab_parser.lua @@ -412,7 +412,7 @@ end function BlackListParser:write_update_status() local file_handler = assert(io.open(self.UPDATE_STATUS_FILE, "w"), "Could not open 'update_status' file") - file_handler:write(string.format("%d %d %d", self.ip_records_count, self.cidr_count, self.fqdn_records_count)) + file_handler:write(string.format("%d %d %d", self.cidr_count, self.ip_records_count, self.fqdn_records_count)) file_handler:close() end diff --git a/ruantiblock-mod-py/Makefile b/ruantiblock-mod-py/Makefile index 6fe0b05..d301b19 100644 --- a/ruantiblock-mod-py/Makefile +++ b/ruantiblock-mod-py/Makefile @@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ruantiblock-mod-py -PKG_VERSION:=0.9.3 +PKG_VERSION:=0.9.4 PKG_RELEASE:=0 PKG_MAINTAINER:=gSpot diff --git a/ruantiblock-mod-py/files/usr/libexec/ruantiblock/ruab_parser.py b/ruantiblock-mod-py/files/usr/libexec/ruantiblock/ruab_parser.py index 065a058..9ef77fd 100755 --- a/ruantiblock-mod-py/files/usr/libexec/ruantiblock/ruab_parser.py +++ b/ruantiblock-mod-py/files/usr/libexec/ruantiblock/ruab_parser.py @@ -503,7 +503,7 @@ class WriteConfigFiles(Config): def write_update_status_file(self, ip_count, cidr_count, output_fqdn_count): with open(self.UPDATE_STATUS_FILE, "wt") as file_handler: file_handler.write( - f"{ip_count} {cidr_count} {output_fqdn_count}") + f"{cidr_count} {ip_count} {output_fqdn_count}") if __name__ == "__main__": diff --git a/ruantiblock/Makefile b/ruantiblock/Makefile index 99625dc..68b266f 100644 --- a/ruantiblock/Makefile +++ b/ruantiblock/Makefile @@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ruantiblock -PKG_VERSION:=0.9.3 +PKG_VERSION:=0.9.4 PKG_RELEASE:=0 PKG_MAINTAINER:=gSpot diff --git a/ruantiblock/files/etc/ruantiblock/scripts/info_output b/ruantiblock/files/etc/ruantiblock/scripts/info_output index dc51e9f..cfd4e74 100644 --- a/ruantiblock/files/etc/ruantiblock/scripts/info_output +++ b/ruantiblock/files/etc/ruantiblock/scripts/info_output @@ -7,7 +7,7 @@ Info() { if(NF < 4) print "\"status\":false"; else - print "\"status\":true,\"date\":\""$4"\",\"ip\":\""$1"\",\"cidr\":\""$2"\",\"fqdn\":\""$3"\""; + print "\"status\":true,\"date\":\""$4"\",\"cidr\":\""$1"\",\"ip\":\""$2"\",\"fqdn\":\""$3"\""; }' "$UPDATE_STATUS_FILE" else printf "\"status\":false" @@ -25,7 +25,7 @@ Info() { printf "\"_dummy\":false},"; }' printf "\"ipset\":{"; - for _set in "$IPSET_ALLOWED_HOSTS" "$IPSET_CIDR_TMP" "$IPSET_CIDR" "$IPSET_IP_TMP" "$IPSET_IP" "$IPSET_DNSMASQ" "$IPSET_ONION" + for _set in "$IPSET_ALLOWED_HOSTS" "$IPSET_ONION" "$IPSET_CIDR_TMP" "$IPSET_CIDR" "$IPSET_IP_TMP" "$IPSET_IP" "$IPSET_DNSMASQ" do $IPSET_CMD list "$_set" -terse | $AWK_CMD -F ": " ' { diff --git a/ruantiblock/files/usr/bin/ruantiblock b/ruantiblock/files/usr/bin/ruantiblock index 13014c6..55c7523 100755 --- a/ruantiblock/files/usr/bin/ruantiblock +++ b/ruantiblock/files/usr/bin/ruantiblock @@ -185,13 +185,13 @@ if [ $ENABLE_LOGGING = "1" -a $? -ne 0 ]; then fi LOGGER_PARAMS="-t `basename $0` -p user.notice" export IP_DATA_FILE="${DATA_DIR}/${NAME}.ip" -export IPSET_ALLOWED_HOSTS="${NAME}_allowed_ip" -export IPSET_IP="${NAME}_ip" -export IPSET_IP_TMP="${IPSET_IP}_tmp" -export IPSET_CIDR="${NAME}_cidr" -export IPSET_CIDR_TMP="${IPSET_CIDR}_tmp" -export IPSET_DNSMASQ="${NAME}_dnsmasq" -export IPSET_ONION="${NAME}_onion" +export IPSET_ALLOWED_HOSTS="r_allowed_ip" +export IPSET_ONION="r_onion" +export IPSET_CIDR="rc" +export IPSET_CIDR_TMP="${IPSET_CIDR}t" +export IPSET_IP="ri" +export IPSET_IP_TMP="${IPSET_IP}t" +export IPSET_DNSMASQ="rd" export UPDATE_STATUS_FILE="${DATA_DIR}/update_status" UPDATE_PID_FILE="/var/run/${NAME}_update.pid" START_PID_FILE="/var/run/${NAME}_start.pid" @@ -422,7 +422,7 @@ GetDataFiles() { AddUserEntries if [ $_return_code -eq 0 ]; then _update_string=`$AWK_CMD '{ - printf "Received entries: %s\n", (NF < 3) ? "No data" : "IP: "$1", CIDR: "$2", FQDN: "$3; + printf "Received entries: %s\n", (NF < 3) ? "No data" : "CIDR: "$1", IP: "$2", FQDN: "$3; exit; }' "$UPDATE_STATUS_FILE"` ### STDOUT @@ -564,7 +564,7 @@ Status() { printf "\n \033[1m${NAME} status\033[m: \033[1;32mEnabled\033[m\n\n PROXY_MODE: ${PROXY_MODE}\n PROXY_LOCAL_CLIENTS: ${PROXY_LOCAL_CLIENTS}\n BLLIST_MODULE: ${BLLIST_MODULE}\n" if [ -f "$UPDATE_STATUS_FILE" ]; then $AWK_CMD '{ - update_string=(NF < 4) ? "No data" : $4" (IP: "$1" | CIDR: "$2" | FQDN: "$3")"; + update_string=(NF < 4) ? "No data" : $4" (CIDR: "$1" | IP: "$2" | FQDN: "$3")"; printf "\n Last blacklist update: %s\n", update_string; }' "$UPDATE_STATUS_FILE" else @@ -581,7 +581,7 @@ Status() { }; }' printf " \033[4mIp sets\033[m:\n\n" - for _set in "$IPSET_ALLOWED_HOSTS" "$IPSET_CIDR_TMP" "$IPSET_CIDR" "$IPSET_IP_TMP" "$IPSET_IP" "$IPSET_DNSMASQ" "$IPSET_ONION" + for _set in "$IPSET_ALLOWED_HOSTS" "$IPSET_ONION" "$IPSET_CIDR_TMP" "$IPSET_CIDR" "$IPSET_IP_TMP" "$IPSET_IP" "$IPSET_DNSMASQ" do $IPSET_CMD list "$_set" -terse | $AWK_CMD -F ":" ' { diff --git a/screenshots/06.jpg b/screenshots/06.jpg index 83e080e..7f40d5f 100644 Binary files a/screenshots/06.jpg and b/screenshots/06.jpg differ