mirror of
https://github.com/fw876/helloworld.git
synced 2026-12-05 16:02:13 +00:00
luci-app-ssr-plus: Fix hysteria2 config code.
This commit is contained in:
1 parent
75f7f117c8
commit
0be32df342
3 files changed
+3
-4
No files matched your search
@@ -436,7 +436,6 @@ o.default = "salamander"
|
||||
o = s:option(Value, "salamander", translate("Obfuscation Password"))
|
||||
o:depends({type = "hysteria2", flag_obfs = "1"})
|
||||
o.rmempty = true
|
||||
o.default = "cry_me_a_r1ver"
|
||||
|
||||
o = s:option(Flag, "flag_quicparam", translate("Hysterir QUIC parameters"))
|
||||
o:depends("type", "hysteria2")
|
||||
|
||||
@@ -138,7 +138,7 @@ function import_ssr_url(btn, urlname, sid) {
|
||||
document.getElementsByName('cbid.shadowsocksr.' + sid + '.flag_obfs')[0].dispatchEvent(event); // 触发事件
|
||||
|
||||
document.getElementsByName('cbid.shadowsocksr.' + sid + '.obfs_type')[0].value = params.get("obfs") || "salamander";
|
||||
document.getElementsByName('cbid.shadowsocksr.' + sid + '.salamander')[0].value = params.get("obfs-password") || "cry_me_a_r1ver";
|
||||
document.getElementsByName('cbid.shadowsocksr.' + sid + '.salamander')[0].value = params.get("obfs-password") || params.get("obfs_password") || "";
|
||||
}
|
||||
if (params.get("sni")) {
|
||||
document.getElementsByName('cbid.shadowsocksr.' + sid + '.tls')[0].checked = true; // 设置 flag_obfs 为 true
|
||||
|
||||
@@ -205,10 +205,10 @@ local function processData(szType, content)
|
||||
result.hy2_auth = url.user
|
||||
result.uplink_capacity = tonumber((params.upmbps or ""):match("^(%d+)")) or 5
|
||||
result.downlink_capacity = tonumber((params.downmbps or ""):match("^(%d+)")) or 20
|
||||
if params["obfs-password"] or params["obfs_password"] then
|
||||
if params.obfs then
|
||||
result.flag_obfs = "1"
|
||||
result.obfs_type = params.obfs
|
||||
result.salamander = params["obfs-password"] or params["obfs_password"]
|
||||
result.salamander = params["obfs-password"] or params["obfs_password"] or nil
|
||||
end
|
||||
if params.sni then
|
||||
result.tls = "1"
|
||||
|
||||
Reference in new issue
Block a user