luci: add alpn option to sing-box TUIC

This commit is contained in:
Gzxhwq 2023-09-08 15:38:18 +08:00 committed by sbwml
parent 763d138dc3
commit f106090d70
3 changed files with 12 additions and 0 deletions

View File

@ -321,6 +321,9 @@ if singbox_tags:find("with_quic") then
o.datatype = "uinteger"
o.default = "3"
o:depends({ [option_name("protocol")] = "tuic" })
o = s:option(Value, option_name("tuic_alpn"), translate("QUIC TLS ALPN"))
o:depends({ [option_name("protocol")] = "tuic" })
end
if singbox_tags:find("with_quic") then

View File

@ -132,6 +132,9 @@ if singbox_tags:find("with_quic") then
o.datatype = "uinteger"
o.default = "3"
o:depends({ [option_name("protocol")] = "tuic" })
o = s:option(Value, option_name("tuic_alpn"), translate("QUIC TLS ALPN"))
o:depends({ [option_name("protocol")] = "tuic" })
end
if singbox_tags:find("with_quic") then

View File

@ -306,6 +306,9 @@ function gen_outbound(flag, node, tag, proxy_table)
enabled = true,
server_name = node.tls_serverName,
insecure = (node.tls_allowInsecure == "1") and true or false,
alpn = (node.tuic_alpn and node.tuic_alpn ~= "") and {
node.tuic_alpn
} or nil,
},
}
end
@ -548,6 +551,9 @@ function gen_config_server(node)
enabled = true,
certificate_path = node.tls_certificateFile,
key_path = node.tls_keyFile,
alpn = (node.tuic_alpn and node.tuic_alpn ~= "") and {
node.tuic_alpn
} or nil,
},
}
end