🚀 Sync 2024-05-23 00:28

This commit is contained in:
github-actions[bot] 2024-05-23 00:28:03 +08:00
parent c0156b4e45
commit 914a7c277a
3 changed files with 14 additions and 8 deletions

View File

@ -8,14 +8,14 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=ddns-go
PKG_VERSION:=6.5.0
PKG_VERSION:=6.6.0
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/jeessy2/ddns-go.git
PKG_MIRROR_HASH:=3b2f219cf96446bae23cf57b3504ca086e576b3afafa78aa47e7dd09d5addceb
PKG_SOURCE_VERSION:=63b510bef20effd0fe9edd09cee8fafe96e884ea
PKG_MIRROR_HASH:=2b611b810dc073491ae9699634d444e27b6d62784689868e4020a5793c499385
PKG_SOURCE_VERSION:=eda105043069530201cd38014c49cfaa7f33bc71
PKG_LICENSE:=AGPL-3.0-only
PKG_LICENSE_FILES:=LICENSE

View File

@ -27,6 +27,7 @@ local header_type_list = {
"none", "srtp", "utp", "wechat-video", "dtls", "wireguard"
}
local xray_version = api.get_app_version("xray")
-- [[ Xray ]]
s.fields["type"]:value(type_name, "Xray")
@ -106,9 +107,11 @@ o:value("leastPing")
o.default = "leastPing"
-- Fallback Node
if api.compare_versions(api.get_app_version("xray"), ">=", "1.8.10") then
if api.compare_versions(xray_version, ">=", "1.8.10") then
local o = s:option(ListValue, option_name("fallback_node"), translate("Fallback Node"))
o:depends({ [option_name("balancingStrategy")] = "leastPing" })
if api.compare_versions(xray_version, "<", "1.8.12") then
o:depends({ [option_name("balancingStrategy")] = "leastPing" })
end
o:value("",translate("Null"))
o.default = ""
local function check_fallback_chain(fb)
@ -130,6 +133,7 @@ end
-- 探测地址
local o = s:option(Flag, option_name("useCustomProbeUrl"), translate("Use Custome Probe URL"), translate("By default the built-in probe URL will be used, enable this option to use a custom probe URL."))
o:depends({ [option_name("balancingStrategy")] = "leastPing" })
o:depends({ [option_name("fallback_node")] = "", ["!reverse"] = true })
local o = s:option(Value, option_name("probeUrl"), translate("Probe URL"))
o:depends({ [option_name("useCustomProbeUrl")] = true })
@ -139,6 +143,7 @@ o.description = translate("The URL used to detect the connection status.")
-- 探测间隔
local o = s:option(Value, option_name("probeInterval"), translate("Probe Interval"))
o:depends({ [option_name("balancingStrategy")] = "leastPing" })
o:depends({ [option_name("fallback_node")] = "", ["!reverse"] = true })
o.default = "1m"
o.description = translate("The interval between initiating probes. Every time this time elapses, a server status check is performed on a server. The time format is numbers + units, such as '10s', '2h45m', and the supported time units are <code>ns</code>, <code>us</code>, <code>ms</code>, <code>s</code>, <code>m</code>, <code>h</code>, which correspond to nanoseconds, microseconds, milliseconds, seconds, minutes, and hours, respectively.")
@ -401,7 +406,7 @@ o = s:option(Value, option_name("wireguard_mtu"), translate("MTU"))
o.default = "1420"
o:depends({ [option_name("protocol")] = "wireguard" })
if api.compare_versions(api.get_app_version("xray"), ">=", "1.8.0") then
if api.compare_versions(xray_version, ">=", "1.8.0") then
o = s:option(Value, option_name("wireguard_reserved"), translate("Reserved"), translate("Decimal numbers separated by \",\" or Base64-encoded strings."))
o:depends({ [option_name("protocol")] = "wireguard" })
end

View File

@ -693,7 +693,8 @@ function gen_config(var)
-- fallback node
local fallback_node_id = _node.fallback_node
if fallback_node_id and fallback_node_id ~= "" then
if fallback_node_id == "" then fallback_node_id = nil
if fallback_node_id then
local is_new_node = true
for _, outbound in ipairs(outbounds) do
if outbound.tag == fallback_node_id then
@ -723,7 +724,7 @@ function gen_config(var)
fallbackTag = fallback_node_id,
strategy = { type = _node.balancingStrategy or "random" }
})
if _node.balancingStrategy == "leastPing" then
if _node.balancingStrategy == "leastPing" or fallback_node_id then
if not observatory then
observatory = {
subjectSelector = { "blc-" },