luci-app-ssr-plus: add alpn settings
Fixes: #973 Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
parent
3835c26c9c
commit
43d6fcd02f
@ -688,6 +688,11 @@ o:depends("xtls", true)
|
|||||||
o:depends("type", "hysteria")
|
o:depends("type", "hysteria")
|
||||||
o.rmempty = true
|
o.rmempty = true
|
||||||
|
|
||||||
|
o = s:option(DynamicList, "tls_alpn", translate("TLS ALPN"))
|
||||||
|
o:depends("tls", true)
|
||||||
|
o:depends("xtls", true)
|
||||||
|
o.rmempty = true
|
||||||
|
|
||||||
o = s:option(Value, "quic_tls_alpn", translate("QUIC TLS ALPN"))
|
o = s:option(Value, "quic_tls_alpn", translate("QUIC TLS ALPN"))
|
||||||
o:depends("type", "hysteria")
|
o:depends("type", "hysteria")
|
||||||
o.rmempty = true
|
o.rmempty = true
|
||||||
|
@ -160,16 +160,26 @@ local Xray = {
|
|||||||
security = (server.xtls == '1') and "xtls" or (server.tls == '1') and "tls" or nil,
|
security = (server.xtls == '1') and "xtls" or (server.tls == '1') and "tls" or nil,
|
||||||
tlsSettings = (server.tls == '1' and (server.insecure == "1" or server.tls_host or server.fingerprint)) and {
|
tlsSettings = (server.tls == '1' and (server.insecure == "1" or server.tls_host or server.fingerprint)) and {
|
||||||
-- tls
|
-- tls
|
||||||
fingerprint = server.fingerprint,
|
alpn = server.tls_alpn,
|
||||||
allowInsecure = (server.insecure == "1") and true or nil,
|
|
||||||
serverName = server.tls_host
|
|
||||||
} or nil,
|
|
||||||
xtlsSettings = (server.xtls == '1' and (server.insecure == "1" or server.tls_host or server.fingerprint)) and {
|
|
||||||
-- xtls
|
|
||||||
fingerprint = server.fingerprint,
|
fingerprint = server.fingerprint,
|
||||||
allowInsecure = (server.insecure == "1") and true or nil,
|
allowInsecure = (server.insecure == "1") and true or nil,
|
||||||
serverName = server.tls_host,
|
serverName = server.tls_host,
|
||||||
minVersion = "1.3"
|
certificates = server.certificate and {
|
||||||
|
usage = "verify",
|
||||||
|
certificateFile = server.certpath
|
||||||
|
} or nil
|
||||||
|
} or nil,
|
||||||
|
xtlsSettings = (server.xtls == '1' and (server.insecure == "1" or server.tls_host or server.fingerprint)) and {
|
||||||
|
-- xtls
|
||||||
|
alpn = server.tls_alpn,
|
||||||
|
fingerprint = server.fingerprint,
|
||||||
|
allowInsecure = (server.insecure == "1") and true or nil,
|
||||||
|
serverName = server.tls_host,
|
||||||
|
minVersion = "1.3",
|
||||||
|
certificates = server.certificate and {
|
||||||
|
usage = "verify",
|
||||||
|
certificateFile = server.certpath
|
||||||
|
} or nil
|
||||||
} or nil,
|
} or nil,
|
||||||
tcpSettings = (server.transport == "tcp" and server.tcp_guise == "http") and {
|
tcpSettings = (server.transport == "tcp" and server.tcp_guise == "http") and {
|
||||||
-- tcp
|
-- tcp
|
||||||
@ -255,7 +265,7 @@ local trojan = {
|
|||||||
cipher = cipher,
|
cipher = cipher,
|
||||||
cipher_tls13 = cipher13,
|
cipher_tls13 = cipher13,
|
||||||
sni = server.tls_host,
|
sni = server.tls_host,
|
||||||
alpn = {"h2", "http/1.1"},
|
alpn = server.tls_alpn or {"h2", "http/1.1"},
|
||||||
curve = "",
|
curve = "",
|
||||||
reuse_session = true,
|
reuse_session = true,
|
||||||
session_ticket = (server.tls_sessionTicket == "1") and true or false
|
session_ticket = (server.tls_sessionTicket == "1") and true or false
|
||||||
|
Loading…
Reference in New Issue
Block a user