mirror of
https://github.com/caiwx86/small-packages.git
synced 2026-10-31 00:05:13 +08:00
update 2026-06-27 10:41:28
This commit is contained in:
1 parent
e233b82c33
commit
99dd851e1c
3 files changed
+29
-21
No files matched your search
@@ -128,6 +128,7 @@ config PACKAGE_$(PKG_NAME)_INCLUDE_Http_Proxy
|
|||||||
config PACKAGE_$(PKG_NAME)_INCLUDE_Mihomo
|
config PACKAGE_$(PKG_NAME)_INCLUDE_Mihomo
|
||||||
bool "Include Mihomo (Clash Support)"
|
bool "Include Mihomo (Clash Support)"
|
||||||
select PACKAGE_mihomo
|
select PACKAGE_mihomo
|
||||||
|
select PACKAGE_v2ray-geoip
|
||||||
depends on aarch64||arm||i386||loongarch64||riscv64||x86_64
|
depends on aarch64||arm||i386||loongarch64||riscv64||x86_64
|
||||||
default y if aarch64||arm||i386||loongarch64||riscv64||x86_64
|
default y if aarch64||arm||i386||loongarch64||riscv64||x86_64
|
||||||
|
|
||||||
|
|||||||
@@ -323,6 +323,8 @@ link_mihomo_geodata() {
|
|||||||
else
|
else
|
||||||
[ -s /etc/openclash/geoip.dat ] && ln -sf /etc/openclash/geoip.dat "$workdir/geoip.dat"
|
[ -s /etc/openclash/geoip.dat ] && ln -sf /etc/openclash/geoip.dat "$workdir/geoip.dat"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
prepare_tuic_runtime_config() {
|
prepare_tuic_runtime_config() {
|
||||||
|
|||||||
@@ -2522,17 +2522,19 @@ local execute = function()
|
|||||||
local nodes, szType
|
local nodes, szType
|
||||||
local is_clash_subscription = false
|
local is_clash_subscription = false
|
||||||
|
|
||||||
if isClashYAML(raw) then
|
if isClashYAML(raw) then
|
||||||
is_clash_subscription = true
|
is_clash_subscription = true
|
||||||
local result = processClashSubscription(fetch_url)
|
local result = processClashSubscription(fetch_url)
|
||||||
if result and not check_filer(result) and not cache[groupHash][result.hashkey] then
|
if result and check_filer(result) then
|
||||||
result.grouphashkey = groupHash
|
log('过滤 Clash 总节点: ' .. result.alias)
|
||||||
table.insert(nodeResult[index], result)
|
elseif result and not cache[groupHash][result.hashkey] then
|
||||||
cache[groupHash][result.hashkey] = result
|
result.grouphashkey = groupHash
|
||||||
log('成功导入 Clash 总节点: ' .. result.alias)
|
table.insert(nodeResult[index], result)
|
||||||
else
|
cache[groupHash][result.hashkey] = result
|
||||||
log('丢弃无效 Clash 总节点: ' .. url)
|
log('成功导入 Clash 总节点: ' .. result.alias)
|
||||||
end
|
else
|
||||||
|
log('丢弃无效 Clash 总节点: ' .. url)
|
||||||
|
end
|
||||||
-- SSD 似乎是这种格式 ssd:// 开头的
|
-- SSD 似乎是这种格式 ssd:// 开头的
|
||||||
elseif raw:find('ssd://') then
|
elseif raw:find('ssd://') then
|
||||||
szType = 'ssd'
|
szType = 'ssd'
|
||||||
@@ -2619,20 +2621,23 @@ local execute = function()
|
|||||||
log('跳过未知类型: ' .. szType)
|
log('跳过未知类型: ' .. szType)
|
||||||
end
|
end
|
||||||
-- log(result)
|
-- log(result)
|
||||||
if result then
|
if result then
|
||||||
-- 中文做地址的 也没有人拿中文域名搞,就算中文域也有Puny Code SB 机场
|
local filtered = check_filer(result)
|
||||||
if not result.server or not result.server_port
|
-- 中文做地址的 也没有人拿中文域名搞,就算中文域也有Puny Code SB 机场
|
||||||
|
local invalid = not result.server or not result.server_port
|
||||||
or (result.type ~= "clash" and result.server == "127.0.0.1")
|
or (result.type ~= "clash" and result.server == "127.0.0.1")
|
||||||
or result.alias == "NULL"
|
or result.alias == "NULL"
|
||||||
or check_filer(result)
|
|
||||||
or (result.type ~= "clash" and result.server:match("[^0-9a-zA-Z%-_%.%s]"))
|
or (result.type ~= "clash" and result.server:match("[^0-9a-zA-Z%-_%.%s]"))
|
||||||
or cache[groupHash][result.hashkey] then
|
or cache[groupHash][result.hashkey]
|
||||||
log('丢弃无效节点: ' .. result.alias)
|
if filtered then
|
||||||
else
|
log('过滤节点: ' .. result.alias)
|
||||||
-- 暂存节点
|
elseif invalid then
|
||||||
table.insert(groupRawNodes, result)
|
log('丢弃无效节点: ' .. result.alias)
|
||||||
|
else
|
||||||
|
-- 暂存节点
|
||||||
|
table.insert(groupRawNodes, result)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
end, function(err)
|
end, function(err)
|
||||||
log(string.format("解析节点出错: %s\n原始数据: %s", tostring(err), tostring(v)))
|
log(string.format("解析节点出错: %s\n原始数据: %s", tostring(err), tostring(v)))
|
||||||
end)
|
end)
|
||||||
|
|||||||
Reference in new issue
Block a user