luci: update Xray fingerprint disable value

This commit is contained in:
xiaorouji 2023-02-04 17:10:45 +08:00 committed by sbwml
parent 6d0b55eae2
commit a91bad9cbc
3 changed files with 7 additions and 4 deletions

View File

@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-passwall PKG_NAME:=luci-app-passwall
PKG_VERSION:=4.57 PKG_VERSION:=4.57
PKG_RELEASE:=1 PKG_RELEASE:=2
PKG_CONFIG_DEPENDS:= \ PKG_CONFIG_DEPENDS:= \
CONFIG_PACKAGE_$(PKG_NAME)_Iptables_Transparent_Proxy \ CONFIG_PACKAGE_$(PKG_NAME)_Iptables_Transparent_Proxy \

View File

@ -156,7 +156,7 @@ function gen_outbound(node, tag, proxy_table)
tlsSettings = (node.stream_security == "tls") and { tlsSettings = (node.stream_security == "tls") and {
serverName = node.tls_serverName, serverName = node.tls_serverName,
allowInsecure = (node.tls_allowInsecure == "1") and true or false, allowInsecure = (node.tls_allowInsecure == "1") and true or false,
fingerprint = (node.type == "Xray" and node.fingerprint and node.fingerprint ~= "disable") and node.fingerprint or nil fingerprint = (node.type == "Xray" and node.fingerprint and node.fingerprint ~= "") and node.fingerprint or nil
} or nil, } or nil,
tcpSettings = (node.transport == "tcp" and node.protocol ~= "socks") and { tcpSettings = (node.transport == "tcp" and node.protocol ~= "socks") and {
header = { header = {

View File

@ -564,7 +564,7 @@ tls_allowInsecure:depends("tls", true)
tls_allowInsecure:depends("type", "Hysteria") tls_allowInsecure:depends("type", "Hysteria")
xray_fingerprint = s:option(Value, "xray_fingerprint", translate("Finger Print")) xray_fingerprint = s:option(Value, "xray_fingerprint", translate("Finger Print"))
xray_fingerprint:value("disable", translate("Disable")) xray_fingerprint:value("", translate("Disable"))
xray_fingerprint:value("chrome") xray_fingerprint:value("chrome")
xray_fingerprint:value("firefox") xray_fingerprint:value("firefox")
xray_fingerprint:value("safari") xray_fingerprint:value("safari")
@ -575,7 +575,7 @@ xray_fingerprint:value("360")
xray_fingerprint:value("qq") xray_fingerprint:value("qq")
xray_fingerprint:value("random") xray_fingerprint:value("random")
xray_fingerprint:value("randomized") xray_fingerprint:value("randomized")
xray_fingerprint.default = "disable" xray_fingerprint.default = ""
xray_fingerprint:depends({ type = "Xray", tls = true }) xray_fingerprint:depends({ type = "Xray", tls = true })
function xray_fingerprint.cfgvalue(self, section) function xray_fingerprint.cfgvalue(self, section)
return m:get(section, "fingerprint") return m:get(section, "fingerprint")
@ -583,6 +583,9 @@ end
function xray_fingerprint.write(self, section, value) function xray_fingerprint.write(self, section, value)
m:set(section, "fingerprint", value) m:set(section, "fingerprint", value)
end end
function xray_fingerprint.remove(self, section)
m:del(section, "fingerprint")
end
trojan_transport = s:option(ListValue, "trojan_transport", translate("Transport")) trojan_transport = s:option(ListValue, "trojan_transport", translate("Transport"))
trojan_transport:value("original", translate("Original")) trojan_transport:value("original", translate("Original"))