luci: adjust Xray uTLS fingerprint option
This commit is contained in:
parent
23cb634242
commit
fde784ab1b
@ -401,21 +401,6 @@ o.default = "0"
|
||||
add_xray_depends(o, { [option_name("tls")] = true, [option_name("reality")] = false })
|
||||
add_v2ray_depends(o, { [option_name("tls")] = true })
|
||||
|
||||
o = s:option(Value, option_name("fingerprint"), translate("Finger Print"), translate("Avoid using randomized, unless you have to."))
|
||||
o:value("", translate("Disable"))
|
||||
o:value("chrome")
|
||||
o:value("firefox")
|
||||
o:value("safari")
|
||||
o:value("ios")
|
||||
-- o:value("android")
|
||||
o:value("edge")
|
||||
-- o:value("360")
|
||||
o:value("qq")
|
||||
o:value("random")
|
||||
o:value("randomized")
|
||||
o.default = ""
|
||||
add_xray_depends(o, { [option_name("tls")] = true, [option_name("reality")] = false })
|
||||
|
||||
-- [[ REALITY部分 ]] --
|
||||
o = s:option(Value, option_name("reality_publicKey"), translate("Public Key"))
|
||||
add_xray_depends(o, { [option_name("tls")] = true, [option_name("reality")] = true })
|
||||
@ -427,28 +412,24 @@ o = s:option(Value, option_name("reality_spiderX"), translate("Spider X"))
|
||||
o.placeholder = "/"
|
||||
add_xray_depends(o, { [option_name("tls")] = true, [option_name("reality")] = true })
|
||||
|
||||
o = s:option(Value, option_name("reality_fingerprint"), translate("Finger Print"), translate("Avoid using randomized, unless you have to."))
|
||||
o.not_rewrite = true
|
||||
o = s:option(Flag, option_name("utls"), translate("uTLS"))
|
||||
o.default = "0"
|
||||
add_xray_depends(o, { [option_name("tls")] = true, [option_name("reality")] = false })
|
||||
|
||||
o = s:option(ListValue, option_name("fingerprint"), translate("Finger Print"))
|
||||
o:value("chrome")
|
||||
o:value("firefox")
|
||||
o:value("safari")
|
||||
o:value("ios")
|
||||
-- o:value("android")
|
||||
o:value("edge")
|
||||
-- o:value("360")
|
||||
o:value("safari")
|
||||
o:value("360")
|
||||
o:value("qq")
|
||||
o:value("ios")
|
||||
o:value("android")
|
||||
o:value("random")
|
||||
o:value("randomized")
|
||||
o.default = "chrome"
|
||||
add_xray_depends(o, { [option_name("tls")] = true, [option_name("utls")] = true })
|
||||
add_xray_depends(o, { [option_name("tls")] = true, [option_name("reality")] = true })
|
||||
function o.cfgvalue(self, section)
|
||||
return m:get(section, "fingerprint")
|
||||
end
|
||||
function o.write(self, section, value)
|
||||
if s.fields["type"]:formvalue(arg[1]) == "Xray" or s.fields["type"]:formvalue(arg[1]) == "V2ray" then
|
||||
m:set(section, "fingerprint", value)
|
||||
end
|
||||
end
|
||||
|
||||
o = s:option(ListValue, option_name("transport"), translate("Transport"))
|
||||
o:value("tcp", "TCP")
|
||||
|
@ -137,7 +137,7 @@ function gen_outbound(flag, node, tag, proxy_table)
|
||||
tlsSettings = (node.stream_security == "tls") and {
|
||||
serverName = node.tls_serverName,
|
||||
allowInsecure = (node.tls_allowInsecure == "1") and true or false,
|
||||
fingerprint = (node.type == "Xray" and node.fingerprint and node.fingerprint ~= "") and node.fingerprint or nil
|
||||
fingerprint = (node.type == "Xray" and node.utls == "1" and node.fingerprint and node.fingerprint ~= "") and node.fingerprint or nil
|
||||
} or nil,
|
||||
realitySettings = (node.stream_security == "reality") and {
|
||||
serverName = node.tls_serverName,
|
||||
|
Loading…
Reference in New Issue
Block a user