mirror of
https://github.com/gSpotx2f/ruantiblock_openwrt.git
synced 2026-05-14 22:50:58 +00:00
ruantiblock-mod-lua, ruantiblock-mod-py: fixed rublacklist
This commit is contained in:
@@ -10,7 +10,7 @@ LUCI_APP=1
|
||||
|
||||
OWRT_VERSION="current"
|
||||
RUAB_VERSION="0.9.7-1"
|
||||
RUAB_MOD_LUA_VERSION="0.9.7-0"
|
||||
RUAB_MOD_LUA_VERSION="0.9.7-1"
|
||||
RUAB_LUCI_APP_VERSION="0.9.7-0"
|
||||
BASE_URL="https://raw.githubusercontent.com/gSpotx2f/packages-openwrt/master"
|
||||
PKG_DIR="/tmp"
|
||||
|
||||
@@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=ruantiblock-mod-lua
|
||||
PKG_VERSION:=0.9.7
|
||||
PKG_RELEASE:=0
|
||||
PKG_RELEASE:=1
|
||||
PKG_MAINTAINER:=gSpot <https://github.com/gSpotx2f/ruantiblock_openwrt>
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
@@ -513,14 +513,14 @@ end
|
||||
|
||||
local Rbl = Class(BlackListParser, {
|
||||
url = Config.RBL_ALL_URL,
|
||||
records_separator = '%{"authority": ',
|
||||
records_separator = '%{"appearDate": ',
|
||||
ips_separator = ", ",
|
||||
})
|
||||
|
||||
function Rbl:sink()
|
||||
return function(chunk)
|
||||
if chunk and chunk ~= "" then
|
||||
for fqdn_str, ip_str in chunk:gmatch('"domains": %["?(.-)"?%].-"ips": %[([a-f0-9/.:", ]*)%].-' .. self.records_separator .. "?") do
|
||||
for fqdn_str, ip_str in chunk:gmatch('"domains": %["?(.-)"?%].-"ips": %[([a-f0-9/.:", ]*)%].-') do
|
||||
fqdn_sink_func(self, ip_str, fqdn_str)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=ruantiblock-mod-py
|
||||
PKG_VERSION:=0.9.7
|
||||
PKG_RELEASE:=0
|
||||
PKG_RELEASE:=1
|
||||
PKG_MAINTAINER:=gSpot <https://github.com/gSpotx2f/ruantiblock_openwrt>
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
@@ -376,7 +376,7 @@ class RblFQDN(BlackListParser):
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
self.url = self.RBL_ALL_URL
|
||||
self.records_separator = '{"authority": '
|
||||
self.records_separator = '{"appearDate": '
|
||||
self.ips_separator = ", "
|
||||
|
||||
def parser_func(self):
|
||||
|
||||
Reference in New Issue
Block a user