mirror of
https://github.com/gSpotx2f/ruantiblock_openwrt.git
synced 2026-05-14 06:30:59 +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"
|
OWRT_VERSION="current"
|
||||||
RUAB_VERSION="0.9.7-1"
|
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"
|
RUAB_LUCI_APP_VERSION="0.9.7-0"
|
||||||
BASE_URL="https://raw.githubusercontent.com/gSpotx2f/packages-openwrt/master"
|
BASE_URL="https://raw.githubusercontent.com/gSpotx2f/packages-openwrt/master"
|
||||||
PKG_DIR="/tmp"
|
PKG_DIR="/tmp"
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
|
|||||||
|
|
||||||
PKG_NAME:=ruantiblock-mod-lua
|
PKG_NAME:=ruantiblock-mod-lua
|
||||||
PKG_VERSION:=1.3
|
PKG_VERSION:=1.3
|
||||||
PKG_RELEASE:=0
|
PKG_RELEASE:=1
|
||||||
PKG_MAINTAINER:=gSpot <https://github.com/gSpotx2f/ruantiblock_openwrt>
|
PKG_MAINTAINER:=gSpot <https://github.com/gSpotx2f/ruantiblock_openwrt>
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|||||||
@@ -535,14 +535,14 @@ end
|
|||||||
|
|
||||||
local Rbl = Class(BlackListParser, {
|
local Rbl = Class(BlackListParser, {
|
||||||
url = Config.RBL_ALL_URL,
|
url = Config.RBL_ALL_URL,
|
||||||
records_separator = '%{"authority": ',
|
records_separator = '%{"appearDate": ',
|
||||||
ips_separator = ", ",
|
ips_separator = ", ",
|
||||||
})
|
})
|
||||||
|
|
||||||
function Rbl:sink()
|
function Rbl:sink()
|
||||||
return function(chunk)
|
return function(chunk)
|
||||||
if chunk and chunk ~= "" then
|
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)
|
fqdn_sink_func(self, ip_str, fqdn_str)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
|
|||||||
|
|
||||||
PKG_NAME:=ruantiblock-mod-py
|
PKG_NAME:=ruantiblock-mod-py
|
||||||
PKG_VERSION:=1.3
|
PKG_VERSION:=1.3
|
||||||
PKG_RELEASE:=0
|
PKG_RELEASE:=1
|
||||||
PKG_MAINTAINER:=gSpot <https://github.com/gSpotx2f/ruantiblock_openwrt>
|
PKG_MAINTAINER:=gSpot <https://github.com/gSpotx2f/ruantiblock_openwrt>
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|||||||
@@ -380,7 +380,7 @@ class RblFQDN(BlackListParser):
|
|||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
self.url = self.RBL_ALL_URL
|
self.url = self.RBL_ALL_URL
|
||||||
self.records_separator = '{"authority": '
|
self.records_separator = '{"appearDate": '
|
||||||
self.ips_separator = ", "
|
self.ips_separator = ", "
|
||||||
|
|
||||||
def parser_func(self):
|
def parser_func(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user