diff --git a/luci-app-passwall/luasrc/model/cbi/passwall/client/type/hysteria2.lua b/luci-app-passwall/luasrc/model/cbi/passwall/client/type/hysteria2.lua index 231d751ac..3ad4ca5c7 100644 --- a/luci-app-passwall/luasrc/model/cbi/passwall/client/type/hysteria2.lua +++ b/luci-app-passwall/luasrc/model/cbi/passwall/client/type/hysteria2.lua @@ -68,4 +68,8 @@ o = s:option(Flag, option_name("disable_mtu_discovery"), translate("Disable MTU o.default = "0" o.rewrite_option = o.option +o = s:option(Flag, option_name("lazy_start"), translate("Lazy Start")) +o.default = "0" +o.rewrite_option = o.option + api.luci_types(arg[1], m, s, type_name, option_prefix) diff --git a/luci-app-passwall/luasrc/passwall/util_hysteria2.lua b/luci-app-passwall/luasrc/passwall/util_hysteria2.lua index 7681fb8c3..bf29fab4b 100644 --- a/luci-app-passwall/luasrc/passwall/util_hysteria2.lua +++ b/luci-app-passwall/luasrc/passwall/util_hysteria2.lua @@ -90,7 +90,7 @@ function gen_config(var) down = node.hysteria2_down_mbps and node.hysteria2_down_mbps .. " mbps" or "100 mbps" }, fast_open = (node.fast_open == "1") and true or false, - lazy = true, + lazy = (node.hysteria2_lazy_start == "1") and true or false, socks5 = (local_socks_address and local_socks_port) and { listen = local_socks_address .. ":" .. local_socks_port, username = (local_socks_username and local_socks_password) and local_socks_username or nil,