luci: add hysteria lazy_start option

This commit is contained in:
xiaorouji 2023-03-30 15:50:13 +08:00 committed by sbwml
parent f6d56838c7
commit c5e704b735
4 changed files with 8 additions and 1 deletions

View File

@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-passwall PKG_NAME:=luci-app-passwall
PKG_VERSION:=4.61 PKG_VERSION:=4.61
PKG_RELEASE:=4 PKG_RELEASE:=5
PKG_CONFIG_DEPENDS:= \ PKG_CONFIG_DEPENDS:= \
CONFIG_PACKAGE_$(PKG_NAME)_Iptables_Transparent_Proxy \ CONFIG_PACKAGE_$(PKG_NAME)_Iptables_Transparent_Proxy \

View File

@ -932,6 +932,9 @@ hysteria_hop_interval:depends("type", "Hysteria")
hysteria_disable_mtu_discovery = s:option(Flag, "hysteria_disable_mtu_discovery", translate("Disable MTU detection")) hysteria_disable_mtu_discovery = s:option(Flag, "hysteria_disable_mtu_discovery", translate("Disable MTU detection"))
hysteria_disable_mtu_discovery:depends("type", "Hysteria") hysteria_disable_mtu_discovery:depends("type", "Hysteria")
hysteria_lazy_start = s:option(Flag, "hysteria_lazy_start", translate("Lazy Start"))
hysteria_lazy_start:depends("type", "Hysteria")
protocol.validate = function(self, value) protocol.validate = function(self, value)
if value == "_shunt" or value == "_balancing" then if value == "_shunt" or value == "_balancing" then
address.rmempty = true address.rmempty = true

View File

@ -77,6 +77,7 @@ function gen_config(var)
hop_interval = (node.hysteria_hop_interval) and tonumber(node.hysteria_hop_interval) or nil, hop_interval = (node.hysteria_hop_interval) and tonumber(node.hysteria_hop_interval) or nil,
disable_mtu_discovery = (node.hysteria_disable_mtu_discovery) and true or false, disable_mtu_discovery = (node.hysteria_disable_mtu_discovery) and true or false,
fast_open = (node.fast_open == "1") and true or false, fast_open = (node.fast_open == "1") and true or false,
lazy_start = (node.hysteria_lazy_start) and true or false,
socks5 = (local_socks_address and local_socks_port) and { socks5 = (local_socks_address and local_socks_port) and {
listen = local_socks_address .. ":" .. local_socks_port, listen = local_socks_address .. ":" .. local_socks_port,
timeout = 300, timeout = 300,

View File

@ -490,6 +490,9 @@ msgstr "QUIC 连接接收窗口"
msgid "Disable MTU detection" msgid "Disable MTU detection"
msgstr "禁用 MTU 检测" msgstr "禁用 MTU 检测"
msgid "Lazy Start"
msgstr "延迟启动"
msgid "Encrypt Method" msgid "Encrypt Method"
msgstr "加密" msgstr "加密"