mirror of
https://github.com/kenzok8/small-package.git
synced 2026-02-07 23:27:13 +08:00
update 2022-11-08 20:24:59
This commit is contained in:
@@ -124,6 +124,12 @@ local flows = {
|
||||
"xtls-rprx-splice-udp443"
|
||||
}
|
||||
|
||||
local tls_flows = {
|
||||
-- tls
|
||||
"xtls-rprx-vision",
|
||||
"xtls-rprx-vision-udp443"
|
||||
}
|
||||
|
||||
m = Map("shadowsocksr", translate("Edit ShadowSocksR Server"))
|
||||
m.redirect = luci.dispatcher.build_url("admin/services/shadowsocksr/servers")
|
||||
if m.uci:get("shadowsocksr", sid) ~= "servers" then
|
||||
@@ -636,16 +642,23 @@ if is_finded("xray") then
|
||||
o:depends({type = "v2ray", v2ray_protocol = "vless", transport = "kcp", tls = false})
|
||||
o:depends({type = "v2ray", v2ray_protocol = "trojan", transport = "tcp", tls = false})
|
||||
o:depends({type = "v2ray", v2ray_protocol = "trojan", transport = "kcp", tls = false})
|
||||
end
|
||||
|
||||
-- Flow
|
||||
o = s:option(Value, "vless_flow", translate("Flow"))
|
||||
for _, v in ipairs(flows) do
|
||||
o:value(v, translate(v))
|
||||
-- Flow
|
||||
o = s:option(Value, "vless_flow", translate("Flow"))
|
||||
for _, v in ipairs(flows) do
|
||||
o:value(v, translate(v))
|
||||
end
|
||||
o.rmempty = true
|
||||
o.default = "xtls-rprx-splice"
|
||||
o:depends("xtls", true)
|
||||
|
||||
o = s:option(Value, "tls_flow", translate("Flow"))
|
||||
for _, v in ipairs(tls_flows) do
|
||||
o:value(v, translate(v))
|
||||
end
|
||||
o.rmempty = true
|
||||
o:depends({type = "v2ray", v2ray_protocol = "vless", tls = true})
|
||||
end
|
||||
o.rmempty = true
|
||||
o.default = "xtls-rprx-splice"
|
||||
o:depends("xtls", true)
|
||||
|
||||
-- [[ TLS部分 ]] --
|
||||
o = s:option(Flag, "tls_sessionTicket", translate("Session Ticket"))
|
||||
@@ -661,6 +674,7 @@ if is_finded("xray") then
|
||||
o:value("safari", translate("safari"))
|
||||
o:value("randomized", translate("randomized"))
|
||||
o:depends({type = "v2ray", tls = true})
|
||||
o:depends({type = "v2ray", xtls = true})
|
||||
o.default = "disable"
|
||||
end
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ function vmess_vless()
|
||||
id = server.vmess_id,
|
||||
security = (server.v2ray_protocol == "vmess" or not server.v2ray_protocol) and server.security or nil,
|
||||
encryption = (server.v2ray_protocol == "vless") and server.vless_encryption or nil,
|
||||
flow = (server.xtls == '1') and (server.vless_flow and server.vless_flow or "xtls-rprx-splice") or nil
|
||||
flow = (server.xtls == '1') and (server.vless_flow or "xtls-rprx-splice") or (server.tls == '1') and server.tls_flow or nil
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -48,7 +48,7 @@ function trojan_shadowsocks()
|
||||
method = ((server.v2ray_protocol == "shadowsocks") and server.encrypt_method_ss) or ((server.v2ray_protocol == "shadowsocksr") and server.encrypt_method) or nil,
|
||||
uot = (server.v2ray_protocol == "shadowsocks") and (server.uot == '1') or nil,
|
||||
ivCheck = (server.v2ray_protocol == "shadowsocks") and (server.ivCheck == '1') or nil,
|
||||
flow = (server.v2ray_protocol == "trojan") and (server.xtls == '1') and (server.vless_flow and server.vless_flow or "xtls-rprx-splice") or nil
|
||||
flow = (server.v2ray_protocol == "trojan") and (server.xtls == '1') and (server.vless_flow or "xtls-rprx-splice") or nil
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -161,8 +161,9 @@ local Xray = {
|
||||
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)) and {
|
||||
xtlsSettings = (server.xtls == '1' and (server.insecure == "1" or server.tls_host or server.fingerprint)) and {
|
||||
-- xtls
|
||||
fingerprint = server.fingerprint,
|
||||
allowInsecure = (server.insecure == "1") and true or nil,
|
||||
serverName = server.tls_host,
|
||||
minVersion = "1.3"
|
||||
|
||||
Reference in New Issue
Block a user