mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-10-29 17:05:13 +08:00
🍕 Sync 2026-08-07 20:53:59
This commit is contained in:
1 parent
41eaf923aa
commit
6ad26db225
13 files changed
+138
-195
No files matched your search
@@ -12,7 +12,7 @@ PKG_ARCH_LINKEASE:=$(ARCH)
|
||||
PKG_NAME:=linkease-common-bin
|
||||
# use PKG_SOURCE_DATE instead of PKG_VERSION for compitable
|
||||
PKG_SOURCE_DATE:=1.7.5
|
||||
PKG_RELEASE:=3
|
||||
PKG_RELEASE:=4
|
||||
|
||||
ARCH_HEXCODE:=
|
||||
ifeq ($(ARCH),x86_64)
|
||||
@@ -28,7 +28,7 @@ else ifeq ($(ARCH),mipsel)
|
||||
ARCH_HEXCODE=1b0c
|
||||
endif
|
||||
|
||||
PKG_SOURCE_VERSION:=8895348606dc6cab9b25a75576e5142f553dfa82
|
||||
PKG_SOURCE_VERSION:=b5383a43aa18185cc32c759d2b8536c235fe54aa
|
||||
PKG_SOURCE:=linkease-common-bin-$(PKG_SOURCE_DATE)-linux-$(PKG_ARCH_LINKEASE).tar.gz
|
||||
PKG_SOURCE_URL:=https://github.com/istoreos/istoreos-app-hub/releases/download/linkease-runtime-v$(PKG_SOURCE_DATE)/
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/linkease-common-bin-$(PKG_SOURCE_DATE)-linux-$(PKG_ARCH_LINKEASE)
|
||||
@@ -59,10 +59,11 @@ define Build/Compile
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/uci-defaults
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/heif-converter $(1)/usr/sbin/heif-converter
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/linkease-media $(1)/usr/sbin/linkease-media
|
||||
$(INSTALL_BIN) ./files/linkease-config.sh $(1)/usr/sbin/linkease-config.sh
|
||||
$(INSTALL_BIN) ./files/linkease-fw.uci-default $(1)/etc/uci-defaults/linkease-fw
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,$(PKG_NAME)))
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
|
||||
uci -q batch <<-EOF >/dev/null
|
||||
delete firewall.linkease
|
||||
set firewall.linkease=rule
|
||||
set firewall.linkease.name="linkease"
|
||||
set firewall.linkease.target="ACCEPT"
|
||||
set firewall.linkease.src="wan"
|
||||
set firewall.linkease.proto="tcp"
|
||||
set firewall.linkease.dest_port="8897"
|
||||
commit firewall
|
||||
EOF
|
||||
|
||||
/etc/init.d/firewall reload 2>/dev/null
|
||||
|
||||
exit 0
|
||||
+2
-2
@@ -12,7 +12,7 @@ PKG_ARCH_LINKEASE:=$(ARCH)
|
||||
PKG_NAME:=linkease
|
||||
# use PKG_SOURCE_DATE instead of PKG_VERSION for compitable
|
||||
PKG_SOURCE_DATE:=1.7.5
|
||||
PKG_RELEASE:=6
|
||||
PKG_RELEASE:=7
|
||||
|
||||
ARCH_HEXCODE:=
|
||||
ifeq ($(ARCH),x86_64)
|
||||
@@ -28,7 +28,7 @@ else ifeq ($(ARCH),mipsel)
|
||||
ARCH_HEXCODE=1b0c
|
||||
endif
|
||||
|
||||
PKG_SOURCE_VERSION:=8895348606dc6cab9b25a75576e5142f553dfa82
|
||||
PKG_SOURCE_VERSION:=b5383a43aa18185cc32c759d2b8536c235fe54aa
|
||||
PKG_SOURCE:=linkease-bin-$(PKG_SOURCE_DATE)-linux-$(PKG_ARCH_LINKEASE).tar.gz
|
||||
PKG_SOURCE_URL:=https://github.com/istoreos/istoreos-app-hub/releases/download/linkease-runtime-v$(PKG_SOURCE_DATE)/
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/linkease-bin-$(PKG_SOURCE_DATE)-linux-$(PKG_ARCH_LINKEASE)
|
||||
|
||||
@@ -1,87 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /lib/functions.sh
|
||||
|
||||
case "$1" in
|
||||
save)
|
||||
if [ ! -z "$2" ]; then
|
||||
uci set "linkease.@linkease[0].preconfig=$2"
|
||||
uci commit
|
||||
fi
|
||||
;;
|
||||
|
||||
load)
|
||||
if [ -f "/usr/sbin/preconfig.data" ]; then
|
||||
data="`cat /usr/sbin/preconfig.data`"
|
||||
uci set "linkease.@linkease[0].preconfig=${data}"
|
||||
uci commit
|
||||
rm /usr/sbin/preconfig.data
|
||||
else
|
||||
data="`uci -q get linkease.@linkease[0].preconfig`"
|
||||
fi
|
||||
|
||||
if [ -z "${data}" ]; then
|
||||
echo "nil"
|
||||
else
|
||||
echo "${data}"
|
||||
fi
|
||||
|
||||
;;
|
||||
|
||||
local_save)
|
||||
if [ ! -z "$2" ]; then
|
||||
uci set "linkease.@linkease[0].local_home=$2"
|
||||
uci commit
|
||||
ROOT_DIR="$2"
|
||||
if [ -f "/etc/config/quickstart" ]; then
|
||||
config_load quickstart
|
||||
config_get MAIN_DIR main main_dir ""
|
||||
config_get CONF_DIR main conf_dir ""
|
||||
config_get PUB_DIR main pub_dir ""
|
||||
config_get DL_DIR main dl_dir ""
|
||||
config_get TMP_DIR main tmp_dir ""
|
||||
if [ "$ROOT_DIR" = "$MAIN_DIR" ]; then
|
||||
exit 0
|
||||
fi
|
||||
uci set "quickstart.main.main_dir=$ROOT_DIR"
|
||||
if [ -z "$CONF_DIR" -o "$CONF_DIR" = "$MAIN_DIR/Configs" ]; then
|
||||
uci set "quickstart.main.conf_dir=$ROOT_DIR/Configs"
|
||||
fi
|
||||
if [ -z "$PUB_DIR" -o "$PUB_DIR" = "$MAIN_DIR/Public" ]; then
|
||||
uci set "quickstart.main.pub_dir=$ROOT_DIR/Public"
|
||||
fi
|
||||
if [ -z "$DL_DIR" -o "$DL_DIR" = "$MAIN_DIR/Public/Downloads" ]; then
|
||||
uci set "quickstart.main.dl_dir=$ROOT_DIR/Public/Downloads"
|
||||
fi
|
||||
if [ -z "$TMP_DIR" -o "$TMP_DIR" = "$MAIN_DIR/Caches" ]; then
|
||||
uci set "quickstart.main.tmp_dir=$ROOT_DIR/Caches"
|
||||
fi
|
||||
uci commit
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
|
||||
local_load)
|
||||
if [ -f "/etc/config/quickstart" ]; then
|
||||
data="`uci -q get quickstart.main.main_dir`"
|
||||
fi
|
||||
if [ -z "$data" ]; then
|
||||
data="`uci -q get linkease.@linkease[0].local_home`"
|
||||
fi
|
||||
|
||||
if [ -z "${data}" ]; then
|
||||
echo "nil"
|
||||
else
|
||||
echo "${data}"
|
||||
fi
|
||||
|
||||
;;
|
||||
|
||||
status)
|
||||
echo "TODO"
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Usage: $0 {save|load|local_save|local_load|status}"
|
||||
exit 1
|
||||
esac
|
||||
@@ -24,9 +24,6 @@ set_default enabled 1
|
||||
set_default port 8897
|
||||
set_default allowPublic 0
|
||||
uci -q commit linkease
|
||||
port="$(uci -q get linkease.@linkease[0].port 2>/dev/null || true)"
|
||||
[ -n "$port" ] || port=8897
|
||||
allow_public="$(uci -q get linkease.@linkease[0].allowPublic 2>/dev/null || true)"
|
||||
|
||||
uci -q batch <<-EOF >/dev/null
|
||||
delete ucitrack.@linkease[-1]
|
||||
@@ -35,25 +32,6 @@ uci -q batch <<-EOF >/dev/null
|
||||
commit ucitrack
|
||||
EOF
|
||||
|
||||
if [ "$allow_public" = "1" ]; then
|
||||
uci -q batch <<-EOF >/dev/null
|
||||
delete firewall.linkease
|
||||
set firewall.linkease=rule
|
||||
set firewall.linkease.name="linkease"
|
||||
set firewall.linkease.target="ACCEPT"
|
||||
set firewall.linkease.src="wan"
|
||||
set firewall.linkease.proto="tcp"
|
||||
set firewall.linkease.dest_port="$port"
|
||||
commit firewall
|
||||
EOF
|
||||
else
|
||||
uci -q batch <<-EOF >/dev/null
|
||||
delete firewall.linkease
|
||||
commit firewall
|
||||
EOF
|
||||
fi
|
||||
|
||||
/etc/init.d/linkease enable
|
||||
/etc/init.d/linkease restart
|
||||
|
||||
exit 0
|
||||
@@ -11,7 +11,7 @@ PKG_ARCH_LINKEASE:=$(ARCH)
|
||||
PKG_NAME:=linkeasefull
|
||||
# use PKG_SOURCE_DATE instead of PKG_VERSION for compitable
|
||||
PKG_SOURCE_DATE:=3.0.5
|
||||
PKG_RELEASE:=5
|
||||
PKG_RELEASE:=6
|
||||
|
||||
ARCH_HEXCODE:=
|
||||
ifeq ($(ARCH),x86_64)
|
||||
@@ -24,7 +24,7 @@ LINKEASE_RUNTIME_ARCH:=arm64
|
||||
PKG_HASH:=skip
|
||||
endif
|
||||
|
||||
PKG_SOURCE_VERSION:=8895348606dc6cab9b25a75576e5142f553dfa82
|
||||
PKG_SOURCE_VERSION:=b5383a43aa18185cc32c759d2b8536c235fe54aa
|
||||
PKG_SOURCE:=linkease-runtime-$(PKG_SOURCE_DATE)-linux-$(LINKEASE_RUNTIME_ARCH).tar.gz
|
||||
PKG_SOURCE_URL:=https://github.com/istoreos/istoreos-app-hub/releases/download/linkeasefull-runtime-v$(PKG_SOURCE_DATE)/
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/linkease-runtime-$(PKG_SOURCE_DATE)-linux-$(LINKEASE_RUNTIME_ARCH)
|
||||
|
||||
@@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-daede
|
||||
PKG_VERSION:=1.14.7
|
||||
PKG_RELEASE:=38
|
||||
PKG_RELEASE:=39
|
||||
PKG_MAINTAINER:=kenzok8
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
|
||||
|
||||
|
||||
@@ -429,6 +429,7 @@ function renderDaeForms(ctx) {
|
||||
.finally(function() {
|
||||
restoreLiveAccordions();
|
||||
btns.forEach(function(b) { b.disabled = false; });
|
||||
window.setTimeout(function() { ui.changes.init(); }, 1800);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-passwall
|
||||
PKG_VERSION:=26.8.1
|
||||
PKG_RELEASE:=203
|
||||
PKG_RELEASE:=204
|
||||
PKG_PO_VERSION:=$(PKG_VERSION)
|
||||
|
||||
PKG_CONFIG_DEPENDS:= \
|
||||
|
||||
@@ -34,6 +34,10 @@ local tmp_lines = {}
|
||||
local USE_GEOVIEW = uci:get(appname, "@global_rules[0]", "enable_geoview")
|
||||
local IS_SHUNT_NODE = uci:get(appname, TCP_NODE, "protocol") == "_shunt"
|
||||
|
||||
if not api.is_finded("geoview") then
|
||||
USE_GEOVIEW = "0"
|
||||
end
|
||||
|
||||
local function log(...)
|
||||
if NO_LOGIC_LOG == "1" then
|
||||
return
|
||||
@@ -128,16 +132,20 @@ local file_block_host = TMP_ACL_PATH .. "/block_host"
|
||||
if USE_BLOCK_LIST == "1" and not fs.access(file_block_host) then
|
||||
local block_domain, lookup_block_domain = {}, {}
|
||||
local geosite_arg = ""
|
||||
for line in io.lines(RULES_PATH .. "/block_host") do
|
||||
if not line:find("#") and line:find("geosite:") then
|
||||
line = string.match(line, ":([^:]+)$")
|
||||
geosite_arg = geosite_arg .. (geosite_arg ~= "" and "," or "") .. line
|
||||
else
|
||||
line = api.get_std_domain(line)
|
||||
if line ~= "" and not line:find("#") then
|
||||
insert_unique(block_domain, line, lookup_block_domain)
|
||||
local f = io.open(RULES_PATH .. "/block_host")
|
||||
if f then
|
||||
for line in f:lines() do
|
||||
if not line:find("#") and line:find("geosite:") then
|
||||
line = string.match(line, ":([^:]+)$")
|
||||
geosite_arg = geosite_arg .. (geosite_arg ~= "" and "," or "") .. line
|
||||
else
|
||||
line = api.get_std_domain(line)
|
||||
if line ~= "" and not line:find("#") then
|
||||
insert_unique(block_domain, line, lookup_block_domain)
|
||||
end
|
||||
end
|
||||
end
|
||||
f:close()
|
||||
end
|
||||
if #block_domain > 0 then
|
||||
local f_out = io.open(file_block_host, "w")
|
||||
@@ -146,11 +154,11 @@ if USE_BLOCK_LIST == "1" and not fs.access(file_block_host) then
|
||||
end
|
||||
f_out:close()
|
||||
end
|
||||
if USE_GEOVIEW == "1" and geosite_arg ~= "" and api.is_finded("geoview") then
|
||||
if USE_GEOVIEW == "1" and geosite_arg ~= "" then
|
||||
if get_geosite(geosite_arg, file_block_host) == 0 then
|
||||
log(" * 解析[屏蔽列表] Geosite 到屏蔽域名表(blocklist)完成")
|
||||
log(" - 解析[屏蔽列表] Geosite 到屏蔽域名表(blocklist)完成")
|
||||
else
|
||||
log(" * 解析[屏蔽列表] Geosite 到屏蔽域名表(blocklist)失败!")
|
||||
log(" - 解析[屏蔽列表] Geosite 到屏蔽域名表(blocklist)失败!")
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -211,16 +219,20 @@ local file_direct_host = TMP_ACL_PATH .. "/direct_host"
|
||||
if USE_DIRECT_LIST == "1" and not fs.access(file_direct_host) then
|
||||
local direct_domain, lookup_direct_domain = {}, {}
|
||||
local geosite_arg = ""
|
||||
for line in io.lines(RULES_PATH .. "/direct_host") do
|
||||
if not line:find("#") and line:find("geosite:") then
|
||||
line = string.match(line, ":([^:]+)$")
|
||||
geosite_arg = geosite_arg .. (geosite_arg ~= "" and "," or "") .. line
|
||||
else
|
||||
line = api.get_std_domain(line)
|
||||
if line ~= "" and not line:find("#") then
|
||||
insert_unique(direct_domain, line, lookup_direct_domain)
|
||||
local f = io.open(RULES_PATH .. "/direct_host")
|
||||
if f then
|
||||
for line in f:lines() do
|
||||
if not line:find("#") and line:find("geosite:") then
|
||||
line = string.match(line, ":([^:]+)$")
|
||||
geosite_arg = geosite_arg .. (geosite_arg ~= "" and "," or "") .. line
|
||||
else
|
||||
line = api.get_std_domain(line)
|
||||
if line ~= "" and not line:find("#") then
|
||||
insert_unique(direct_domain, line, lookup_direct_domain)
|
||||
end
|
||||
end
|
||||
end
|
||||
f:close()
|
||||
end
|
||||
if #direct_domain > 0 then
|
||||
local f_out = io.open(file_direct_host, "w")
|
||||
@@ -229,11 +241,11 @@ if USE_DIRECT_LIST == "1" and not fs.access(file_direct_host) then
|
||||
end
|
||||
f_out:close()
|
||||
end
|
||||
if USE_GEOVIEW == "1" and geosite_arg ~= "" and api.is_finded("geoview") then
|
||||
if USE_GEOVIEW == "1" and geosite_arg ~= "" then
|
||||
if get_geosite(geosite_arg, file_direct_host) == 0 then
|
||||
log(" * 解析[直连列表] Geosite 到域名白名单(whitelist)完成")
|
||||
log(" - 解析[直连列表] Geosite 到域名白名单(whitelist)完成")
|
||||
else
|
||||
log(" * 解析[直连列表] Geosite 到域名白名单(whitelist)失败!")
|
||||
log(" - 解析[直连列表] Geosite 到域名白名单(whitelist)失败!")
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -257,16 +269,20 @@ local file_proxy_host = TMP_ACL_PATH .. "/proxy_host"
|
||||
if USE_PROXY_LIST == "1" and not fs.access(file_proxy_host) then
|
||||
local proxy_domain, lookup_proxy_domain = {}, {}
|
||||
local geosite_arg = ""
|
||||
for line in io.lines(RULES_PATH .. "/proxy_host") do
|
||||
if not line:find("#") and line:find("geosite:") then
|
||||
line = string.match(line, ":([^:]+)$")
|
||||
geosite_arg = geosite_arg .. (geosite_arg ~= "" and "," or "") .. line
|
||||
else
|
||||
line = api.get_std_domain(line)
|
||||
if line ~= "" and not line:find("#") then
|
||||
insert_unique(proxy_domain, line, lookup_proxy_domain)
|
||||
local f = io.open(RULES_PATH .. "/proxy_host")
|
||||
if f then
|
||||
for line in f:lines() do
|
||||
if not line:find("#") and line:find("geosite:") then
|
||||
line = string.match(line, ":([^:]+)$")
|
||||
geosite_arg = geosite_arg .. (geosite_arg ~= "" and "," or "") .. line
|
||||
else
|
||||
line = api.get_std_domain(line)
|
||||
if line ~= "" and not line:find("#") then
|
||||
insert_unique(proxy_domain, line, lookup_proxy_domain)
|
||||
end
|
||||
end
|
||||
end
|
||||
f:close()
|
||||
end
|
||||
if #proxy_domain > 0 then
|
||||
local f_out = io.open(file_proxy_host, "w")
|
||||
@@ -275,11 +291,11 @@ if USE_PROXY_LIST == "1" and not fs.access(file_proxy_host) then
|
||||
end
|
||||
f_out:close()
|
||||
end
|
||||
if USE_GEOVIEW == "1" and geosite_arg ~= "" and api.is_finded("geoview") then
|
||||
if USE_GEOVIEW == "1" and geosite_arg ~= "" then
|
||||
if get_geosite(geosite_arg, file_proxy_host) == 0 then
|
||||
log(" * 解析[代理列表] Geosite 到代理域名表(blacklist)完成")
|
||||
log(" - 解析[代理列表] Geosite 到代理域名表(blacklist)完成")
|
||||
else
|
||||
log(" * 解析[代理列表] Geosite 到代理域名表(blacklist)失败!")
|
||||
log(" - 解析[代理列表] Geosite 到代理域名表(blacklist)失败!")
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -432,7 +448,7 @@ if IS_SHUNT_NODE then
|
||||
end
|
||||
end
|
||||
|
||||
if GFWLIST == "1" and CHNLIST == "0" and USE_GEOVIEW == "1" and api.is_finded("geoview") then --仅GFW模式解析geosite
|
||||
if GFWLIST == "1" and CHNLIST == "0" and USE_GEOVIEW == "1" then --仅GFW模式解析geosite
|
||||
local return_white, return_shunt
|
||||
if geosite_white_arg ~= "" then
|
||||
return_white = get_geosite(geosite_white_arg, file_white_host)
|
||||
@@ -441,9 +457,9 @@ if IS_SHUNT_NODE then
|
||||
return_shunt = get_geosite(geosite_shunt_arg, file_shunt_host)
|
||||
end
|
||||
if (return_white == nil or return_white == 0) and (return_shunt == nil or return_shunt == 0) then
|
||||
log(" * 解析[分流节点] Geosite 完成")
|
||||
log(" - 解析[分流节点] Geosite 完成")
|
||||
else
|
||||
log(" * 解析[分流节点] Geosite 失败!")
|
||||
log(" - 解析[分流节点] Geosite 失败!")
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -346,14 +346,16 @@ function add_rule(var)
|
||||
fs.mkdir(CACHE_DNS_PATH)
|
||||
|
||||
--屏蔽列表
|
||||
if USE_CHINADNS_NG == "0" then
|
||||
if USE_BLOCK_LIST == "1" then
|
||||
for line in io.lines("/usr/share/passwall/rules/block_host") do
|
||||
if USE_CHINADNS_NG == "0" and USE_BLOCK_LIST == "1" then
|
||||
local f = io.open("/usr/share/passwall/rules/block_host")
|
||||
if f then
|
||||
for line in f:lines() do
|
||||
line = api.get_std_domain(line)
|
||||
if line ~= "" and not line:find("#") and not line:find(":") then
|
||||
set_domain_address(line, "")
|
||||
end
|
||||
end
|
||||
f:close()
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -40,6 +40,10 @@ local tmp_lines = {}
|
||||
local USE_GEOVIEW = uci:get(appname, "@global_rules[0]", "enable_geoview")
|
||||
local IS_SHUNT_NODE = uci:get(appname, TCP_NODE, "protocol") == "_shunt"
|
||||
|
||||
if not api.is_finded("geoview") then
|
||||
USE_GEOVIEW = "0"
|
||||
end
|
||||
|
||||
local function log(...)
|
||||
if NO_LOGIC_LOG == "1" then
|
||||
return
|
||||
@@ -286,16 +290,20 @@ local file_block_host = TMP_ACL_PATH .. "/block_host"
|
||||
if USE_BLOCK_LIST == "1" and not fs.access(file_block_host) then
|
||||
local block_domain, lookup_block_domain = {}, {}
|
||||
local geosite_arg = ""
|
||||
for line in io.lines(RULES_PATH .. "/block_host") do
|
||||
if not line:find("#") and line:find("geosite:") then
|
||||
line = string.match(line, ":([^:]+)$")
|
||||
geosite_arg = geosite_arg .. (geosite_arg ~= "" and "," or "") .. line
|
||||
else
|
||||
line = api.get_std_domain(line)
|
||||
if line ~= "" and not line:find("#") then
|
||||
insert_unique(block_domain, line, lookup_block_domain)
|
||||
local f = io.open(RULES_PATH .. "/block_host")
|
||||
if f then
|
||||
for line in f:lines() do
|
||||
if not line:find("#") and line:find("geosite:") then
|
||||
line = string.match(line, ":([^:]+)$")
|
||||
geosite_arg = geosite_arg .. (geosite_arg ~= "" and "," or "") .. line
|
||||
else
|
||||
line = api.get_std_domain(line)
|
||||
if line ~= "" and not line:find("#") then
|
||||
insert_unique(block_domain, line, lookup_block_domain)
|
||||
end
|
||||
end
|
||||
end
|
||||
f:close()
|
||||
end
|
||||
if #block_domain > 0 then
|
||||
local f_out = io.open(file_block_host, "w")
|
||||
@@ -304,11 +312,11 @@ if USE_BLOCK_LIST == "1" and not fs.access(file_block_host) then
|
||||
end
|
||||
f_out:close()
|
||||
end
|
||||
if USE_GEOVIEW == "1" and geosite_arg ~= "" and api.is_finded("geoview") then
|
||||
if USE_GEOVIEW == "1" and geosite_arg ~= "" then
|
||||
if get_geosite(geosite_arg, file_block_host) == 0 then
|
||||
log(" * 解析[屏蔽列表] Geosite 到屏蔽域名表(blocklist)完成")
|
||||
log(" - 解析[屏蔽列表] Geosite 到屏蔽域名表(blocklist)完成")
|
||||
else
|
||||
log(" * 解析[屏蔽列表] Geosite 到屏蔽域名表(blocklist)失败!")
|
||||
log(" - 解析[屏蔽列表] Geosite 到屏蔽域名表(blocklist)失败!")
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -372,16 +380,20 @@ local file_direct_host = TMP_ACL_PATH .. "/direct_host"
|
||||
if USE_DIRECT_LIST == "1" and not fs.access(file_direct_host) then
|
||||
local direct_domain, lookup_direct_domain = {}, {}
|
||||
local geosite_arg = ""
|
||||
for line in io.lines(RULES_PATH .. "/direct_host") do
|
||||
if not line:find("#") and line:find("geosite:") then
|
||||
line = string.match(line, ":([^:]+)$")
|
||||
geosite_arg = geosite_arg .. (geosite_arg ~= "" and "," or "") .. line
|
||||
else
|
||||
line = api.get_std_domain(line)
|
||||
if line ~= "" and not line:find("#") then
|
||||
insert_unique(direct_domain, line, lookup_direct_domain)
|
||||
local f = io.open(RULES_PATH .. "/direct_host")
|
||||
if f then
|
||||
for line in f:lines() do
|
||||
if not line:find("#") and line:find("geosite:") then
|
||||
line = string.match(line, ":([^:]+)$")
|
||||
geosite_arg = geosite_arg .. (geosite_arg ~= "" and "," or "") .. line
|
||||
else
|
||||
line = api.get_std_domain(line)
|
||||
if line ~= "" and not line:find("#") then
|
||||
insert_unique(direct_domain, line, lookup_direct_domain)
|
||||
end
|
||||
end
|
||||
end
|
||||
f:close()
|
||||
end
|
||||
if #direct_domain > 0 then
|
||||
local f_out = io.open(file_direct_host, "w")
|
||||
@@ -390,11 +402,11 @@ if USE_DIRECT_LIST == "1" and not fs.access(file_direct_host) then
|
||||
end
|
||||
f_out:close()
|
||||
end
|
||||
if USE_GEOVIEW == "1" and geosite_arg ~= "" and api.is_finded("geoview") then
|
||||
if USE_GEOVIEW == "1" and geosite_arg ~= "" then
|
||||
if get_geosite(geosite_arg, file_direct_host) == 0 then
|
||||
log(" * 解析[直连列表] Geosite 到域名白名单(whitelist)完成")
|
||||
log(" - 解析[直连列表] Geosite 到域名白名单(whitelist)完成")
|
||||
else
|
||||
log(" * 解析[直连列表] Geosite 到域名白名单(whitelist)失败!")
|
||||
log(" - 解析[直连列表] Geosite 到域名白名单(whitelist)失败!")
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -420,16 +432,20 @@ local file_proxy_host = TMP_ACL_PATH .. "/proxy_host"
|
||||
if USE_PROXY_LIST == "1" and not fs.access(file_proxy_host) then
|
||||
local proxy_domain, lookup_proxy_domain = {}, {}
|
||||
local geosite_arg = ""
|
||||
for line in io.lines(RULES_PATH .. "/proxy_host") do
|
||||
if not line:find("#") and line:find("geosite:") then
|
||||
line = string.match(line, ":([^:]+)$")
|
||||
geosite_arg = geosite_arg .. (geosite_arg ~= "" and "," or "") .. line
|
||||
else
|
||||
line = api.get_std_domain(line)
|
||||
if line ~= "" and not line:find("#") then
|
||||
insert_unique(proxy_domain, line, lookup_proxy_domain)
|
||||
local f = io.open(RULES_PATH .. "/proxy_host")
|
||||
if f then
|
||||
for line in f:lines() do
|
||||
if not line:find("#") and line:find("geosite:") then
|
||||
line = string.match(line, ":([^:]+)$")
|
||||
geosite_arg = geosite_arg .. (geosite_arg ~= "" and "," or "") .. line
|
||||
else
|
||||
line = api.get_std_domain(line)
|
||||
if line ~= "" and not line:find("#") then
|
||||
insert_unique(proxy_domain, line, lookup_proxy_domain)
|
||||
end
|
||||
end
|
||||
end
|
||||
f:close()
|
||||
end
|
||||
if #proxy_domain > 0 then
|
||||
local f_out = io.open(file_proxy_host, "w")
|
||||
@@ -438,11 +454,11 @@ if USE_PROXY_LIST == "1" and not fs.access(file_proxy_host) then
|
||||
end
|
||||
f_out:close()
|
||||
end
|
||||
if USE_GEOVIEW == "1" and geosite_arg ~= "" and api.is_finded("geoview") then
|
||||
if USE_GEOVIEW == "1" and geosite_arg ~= "" then
|
||||
if get_geosite(geosite_arg, file_proxy_host) == 0 then
|
||||
log(" * 解析[代理列表] Geosite 到代理域名表(blacklist)完成")
|
||||
log(" - 解析[代理列表] Geosite 到代理域名表(blacklist)完成")
|
||||
else
|
||||
log(" * 解析[代理列表] Geosite 到代理域名表(blacklist)失败!")
|
||||
log(" - 解析[代理列表] Geosite 到代理域名表(blacklist)失败!")
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -600,7 +616,7 @@ if IS_SHUNT_NODE then
|
||||
end
|
||||
end
|
||||
|
||||
if USE_GFW_LIST == "1" and CHN_LIST == "0" and USE_GEOVIEW == "1" and api.is_finded("geoview") then --仅GFW模式解析geosite
|
||||
if USE_GFW_LIST == "1" and CHN_LIST == "0" and USE_GEOVIEW == "1" then --仅GFW模式解析geosite
|
||||
local return_white, return_shunt
|
||||
if geosite_white_arg ~= "" then
|
||||
return_white = get_geosite(geosite_white_arg, file_white_host)
|
||||
@@ -609,9 +625,9 @@ if IS_SHUNT_NODE then
|
||||
return_shunt = get_geosite(geosite_shunt_arg, file_shunt_host)
|
||||
end
|
||||
if (return_white == nil or return_white == 0) and (return_shunt == nil or return_shunt == 0) then
|
||||
log(" * 解析[分流节点] Geosite 完成")
|
||||
log(" - 解析[分流节点] Geosite 完成")
|
||||
else
|
||||
log(" * 解析[分流节点] Geosite 失败!")
|
||||
log(" - 解析[分流节点] Geosite 失败!")
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
+2
-2
@@ -10,12 +10,12 @@ include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=natflow
|
||||
PKG_VERSION:=20260531
|
||||
PKG_RELEASE:=61
|
||||
PKG_RELEASE:=62
|
||||
|
||||
PKG_SOURCE:=$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=https://github.com/ptpt52/natflow.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=4e62e176dee1ee5d2bea09c40f5d515d6b8a3655
|
||||
PKG_SOURCE_VERSION:=00be1cea6bcdaf0d8e79b62dff533f08f49863e8
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_MAINTAINER:=Chen Minqiang <ptpt52@gmail.com>
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
|
||||
Reference in new issue
Block a user