luci-app-passwall2: sync upstream
This commit is contained in:
parent
dd62e2ba98
commit
9a8ae2aeae
@ -45,11 +45,9 @@ o = s:option(Flag, option_name("tls_allowInsecure"), translate("allowInsecure"),
|
|||||||
o.default = "0"
|
o.default = "0"
|
||||||
|
|
||||||
o = s:option(Value, option_name("up_mbps"), translate("Max upload Mbps"))
|
o = s:option(Value, option_name("up_mbps"), translate("Max upload Mbps"))
|
||||||
o.default = "100"
|
|
||||||
o.rewrite_option = o.option
|
o.rewrite_option = o.option
|
||||||
|
|
||||||
o = s:option(Value, option_name("down_mbps"), translate("Max download Mbps"))
|
o = s:option(Value, option_name("down_mbps"), translate("Max download Mbps"))
|
||||||
o.default = "100"
|
|
||||||
o.rewrite_option = o.option
|
o.rewrite_option = o.option
|
||||||
|
|
||||||
o = s:option(Value, option_name("hop_interval"), translate("Hop Interval"))
|
o = s:option(Value, option_name("hop_interval"), translate("Hop Interval"))
|
||||||
|
@ -33,11 +33,9 @@ o.default = "1"
|
|||||||
o.rewrite_option = o.option
|
o.rewrite_option = o.option
|
||||||
|
|
||||||
o = s:option(Value, option_name("up_mbps"), translate("Max upload Mbps"))
|
o = s:option(Value, option_name("up_mbps"), translate("Max upload Mbps"))
|
||||||
o.default = "100"
|
|
||||||
o.rewrite_option = o.option
|
o.rewrite_option = o.option
|
||||||
|
|
||||||
o = s:option(Value, option_name("down_mbps"), translate("Max download Mbps"))
|
o = s:option(Value, option_name("down_mbps"), translate("Max download Mbps"))
|
||||||
o.default = "100"
|
|
||||||
o.rewrite_option = o.option
|
o.rewrite_option = o.option
|
||||||
|
|
||||||
o = s:option(Flag, option_name("ignoreClientBandwidth"), translate("ignoreClientBandwidth"))
|
o = s:option(Flag, option_name("ignoreClientBandwidth"), translate("ignoreClientBandwidth"))
|
||||||
|
@ -20,10 +20,10 @@ function gen_config_server(node)
|
|||||||
type = "password",
|
type = "password",
|
||||||
password = node.hysteria2_auth_password
|
password = node.hysteria2_auth_password
|
||||||
},
|
},
|
||||||
bandwidth = {
|
bandwidth = (node.hysteria2_up_mbps or node.hysteria2_down_mbps) and {
|
||||||
up = node.hysteria2_up_mbps and node.hysteria2_up_mbps .. " mbps" or "1 gbps",
|
up = node.hysteria2_up_mbps and node.hysteria2_up_mbps .. " mbps" or nil,
|
||||||
down = node.hysteria2_down_mbps and node.hysteria2_down_mbps .. " mbps" or "1 gbps",
|
down = node.hysteria2_down_mbps and node.hysteria2_down_mbps .. " mbps" or nil
|
||||||
},
|
} or nil,
|
||||||
ignoreClientBandwidth = (node.hysteria2_ignoreClientBandwidth == "1") and true or false,
|
ignoreClientBandwidth = (node.hysteria2_ignoreClientBandwidth == "1") and true or false,
|
||||||
disableUDP = (node.hysteria2_udp == "0") and true or false,
|
disableUDP = (node.hysteria2_udp == "0") and true or false,
|
||||||
}
|
}
|
||||||
@ -82,10 +82,10 @@ function gen_config(var)
|
|||||||
maxIdleTimeout = (node.hysteria2_idle_timeout) and tonumber(node.hysteria2_idle_timeout) or nil,
|
maxIdleTimeout = (node.hysteria2_idle_timeout) and tonumber(node.hysteria2_idle_timeout) or nil,
|
||||||
disablePathMTUDiscovery = (node.hysteria2_disable_mtu_discovery) and true or false,
|
disablePathMTUDiscovery = (node.hysteria2_disable_mtu_discovery) and true or false,
|
||||||
},
|
},
|
||||||
bandwidth = {
|
bandwidth = (node.hysteria2_up_mbps or node.hysteria2_down_mbps) and {
|
||||||
up = node.hysteria2_up_mbps and node.hysteria2_up_mbps .. " mbps" or "100 mbps",
|
up = node.hysteria2_up_mbps and node.hysteria2_up_mbps .. " mbps" or nil,
|
||||||
down = node.hysteria2_down_mbps and node.hysteria2_down_mbps .. " mbps" or "100 mbps"
|
down = node.hysteria2_down_mbps and node.hysteria2_down_mbps .. " mbps" or nil
|
||||||
},
|
} or nil,
|
||||||
fast_open = (node.fast_open == "1") and true or false,
|
fast_open = (node.fast_open == "1") and true or false,
|
||||||
lazy = (node.hysteria2_lazy_start == "1") and true or false,
|
lazy = (node.hysteria2_lazy_start == "1") and true or false,
|
||||||
socks5 = (local_socks_address and local_socks_port) and {
|
socks5 = (local_socks_address and local_socks_port) and {
|
||||||
|
Loading…
Reference in New Issue
Block a user