Browse Source

Update client-config.lua

hackyes 5 years ago
parent
commit
5427c07894
1 changed files with 12 additions and 0 deletions
  1. 12 0
      luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua

+ 12 - 0
luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua

@@ -132,6 +132,9 @@ if nixio.fs.access("/usr/bin/v2ray/v2ray") or nixio.fs.access("/usr/bin/v2ray")
 o:value("v2ray", translate("V2Ray"))
 o:value("vless", translate("VLESS"))
 end
+if nixio.fs.access("/usr/bin/xray") then
+o:value("xray", translate("XRay"))
+end
 if nixio.fs.access("/usr/sbin/trojan") then
 o:value("trojan", translate("Trojan"))
 end
@@ -160,6 +163,7 @@ o:depends("type", "ssr")
 o:depends("type", "ss")
 o:depends("type", "v2ray")
 o:depends("type", "vless")
+o:depends("type", "xray")
 o:depends("type", "trojan")
 o:depends("type", "naiveproxy")
 o:depends("type", "socks5")
@@ -171,6 +175,7 @@ o:depends("type", "ssr")
 o:depends("type", "ss")
 o:depends("type", "v2ray")
 o:depends("type", "vless")
+o:depends("type", "xray")
 o:depends("type", "trojan")
 o:depends("type", "naiveproxy")
 o:depends("type", "socks5")
@@ -242,12 +247,14 @@ o.rmempty = true
 o.default = uuid
 o:depends("type", "v2ray")
 o:depends("type", "vless")
+o:depends("type", "xray")
 
 -- VLESS Encryption
 o = s:option(Value, "vless_encryption", translate("VLESS Encryption"))
 o.rmempty = true
 o.default = "none"
 o:depends("type", "vless")
+o:depends("type", "xray")
 
 -- 加密方式
 o = s:option(ListValue, "security", translate("Encrypt Method"))
@@ -265,6 +272,7 @@ o:value("quic", "QUIC")
 o.rmempty = true
 o:depends("type", "v2ray")
 o:depends("type", "vless")
+o:depends("type", "xray")
 
 -- [[ TCP部分 ]]--
 
@@ -393,6 +401,7 @@ o = s:option(Flag, "insecure", translate("allowInsecure"))
 o.rmempty = false
 o:depends("type", "v2ray")
 o:depends("type", "vless")
+o:depends("type", "xray")
 o:depends("type", "trojan")
 o.default = "1"
 o.description = translate("If true, allowss insecure connection at TLS client, e.g., TLS server uses unverifiable certificates.")
@@ -402,6 +411,7 @@ o.rmempty = true
 o.default = "0"
 o:depends("type", "v2ray")
 o:depends("type", "vless")
+o:depends("type", "xray")
 o:depends("type", "trojan")
 
 o = s:option(Value, "tls_host", translate("TLS Host"))
@@ -414,6 +424,7 @@ o = s:option(Flag, "xtls", translate("XTLS"))
 o.rmempty = true
 o.default = "0"
 o:depends({type="vless", tls="1"})
+o:depends({type="xray", tls="1"})
 
 -- Flow
 o = s:option(Value, "vless_flow", translate("Flow"))
@@ -442,6 +453,7 @@ o.default = "0"
 o:depends("type", "trojan")
 o:depends("type", "v2ray")
 o:depends("type", "vless")
+o:depends("type", "xray")
 o.description = translate("If you have a self-signed certificate,please check the box")
 
 o = s:option(DummyValue, "upload", translate("Upload"))