|
@@ -131,7 +131,7 @@ if nixio.fs.access("/usr/bin/ss-redir") then
|
|
|
o:value("ss", translate("Shadowsocks New Version"))
|
|
|
end
|
|
|
if nixio.fs.access("/usr/bin/xray") or nixio.fs.access("/usr/bin/xray/xray") or nixio.fs.access("/usr/bin/v2ray/v2ray") or nixio.fs.access("/usr/bin/v2ray") then
|
|
|
-o:value("v2ray", translate("V2Ray"))
|
|
|
+o:value("vmess", translate("Vmess"))
|
|
|
o:value("vless", translate("VLESS"))
|
|
|
end
|
|
|
if nixio.fs.access("/usr/sbin/trojan") then
|
|
@@ -160,7 +160,7 @@ o.datatype = "host"
|
|
|
o.rmempty = false
|
|
|
o:depends("type", "ssr")
|
|
|
o:depends("type", "ss")
|
|
|
-o:depends("type", "v2ray")
|
|
|
+o:depends("type", "vmess")
|
|
|
o:depends("type", "vless")
|
|
|
o:depends("type", "trojan")
|
|
|
o:depends("type", "naiveproxy")
|
|
@@ -171,7 +171,7 @@ o.datatype = "port"
|
|
|
o.rmempty = false
|
|
|
o:depends("type", "ssr")
|
|
|
o:depends("type", "ss")
|
|
|
-o:depends("type", "v2ray")
|
|
|
+o:depends("type", "vmess")
|
|
|
o:depends("type", "vless")
|
|
|
o:depends("type", "trojan")
|
|
|
o:depends("type", "naiveproxy")
|
|
@@ -236,13 +236,13 @@ o = s:option(Value, "alter_id", translate("AlterId"))
|
|
|
o.datatype = "port"
|
|
|
o.default = 16
|
|
|
o.rmempty = true
|
|
|
-o:depends("type", "v2ray")
|
|
|
+o:depends("type", "vmess")
|
|
|
|
|
|
-- VmessId
|
|
|
o = s:option(Value, "vmess_id", translate("Vmess/VLESS ID (UUID)"))
|
|
|
o.rmempty = true
|
|
|
o.default = uuid
|
|
|
-o:depends("type", "v2ray")
|
|
|
+o:depends("type", "vmess")
|
|
|
o:depends("type", "vless")
|
|
|
|
|
|
-- VLESS Encryption
|
|
@@ -255,7 +255,7 @@ o:depends("type", "vless")
|
|
|
o = s:option(ListValue, "security", translate("Encrypt Method"))
|
|
|
for _, v in ipairs(securitys) do o:value(v, v:upper()) end
|
|
|
o.rmempty = true
|
|
|
-o:depends("type", "v2ray")
|
|
|
+o:depends("type", "vmess")
|
|
|
|
|
|
-- 传输协议
|
|
|
o = s:option(ListValue, "transport", translate("Transport"))
|
|
@@ -265,7 +265,7 @@ o:value("ws", "WebSocket")
|
|
|
o:value("h2", "HTTP/2")
|
|
|
o:value("quic", "QUIC")
|
|
|
o.rmempty = true
|
|
|
-o:depends("type", "v2ray")
|
|
|
+o:depends("type", "vmess")
|
|
|
o:depends("type", "vless")
|
|
|
|
|
|
-- [[ TCP部分 ]]--
|
|
@@ -383,31 +383,23 @@ o.default = 2
|
|
|
o.rmempty = true
|
|
|
|
|
|
o = s:option(Value, "seed", translate("Obfuscate password (optional)"))
|
|
|
-o:depends({type="vless", transport="kcp"})
|
|
|
+o:depends({type="vless",transport="kcp"})
|
|
|
o.rmempty = true
|
|
|
|
|
|
o = s:option(Flag, "congestion", translate("Congestion"))
|
|
|
o:depends("transport", "kcp")
|
|
|
o.rmempty = true
|
|
|
|
|
|
--- [[ allowInsecure ]]--
|
|
|
-o = s:option(Flag, "insecure", translate("allowInsecure"))
|
|
|
-o.rmempty = false
|
|
|
-o:depends("type", "v2ray")
|
|
|
-o:depends("type", "vless")
|
|
|
-o:depends("type", "trojan")
|
|
|
-o.default = "0"
|
|
|
-o.description = translate("If true, allowss insecure connection at TLS client, e.g., TLS server uses unverifiable certificates.")
|
|
|
-- [[ TLS ]]--
|
|
|
o = s:option(Flag, "tls", translate("TLS"))
|
|
|
o.rmempty = true
|
|
|
o.default = "0"
|
|
|
-o:depends("type", "v2ray")
|
|
|
-o:depends("type", "vless")
|
|
|
+o:depends("type", "vmess")
|
|
|
+o:depends({type="vless", xtls=false})
|
|
|
o:depends("type", "trojan")
|
|
|
|
|
|
o = s:option(Value, "tls_host", translate("TLS Host"))
|
|
|
---o:depends("type", "trojan")
|
|
|
+o:depends("type", "trojan")
|
|
|
o:depends("tls", "1")
|
|
|
o.rmempty = true
|
|
|
|
|
@@ -416,21 +408,27 @@ if nixio.fs.access("/usr/bin/xray") or nixio.fs.access("/usr/bin/xray/xray") the
|
|
|
o = s:option(Flag, "xtls", translate("XTLS"))
|
|
|
o.rmempty = true
|
|
|
o.default = "0"
|
|
|
-o:depends({type="vless", tls=true})
|
|
|
+o:depends({type="vless",transport="tcp",tls=false})
|
|
|
end
|
|
|
|
|
|
-- Flow
|
|
|
o = s:option(Value, "vless_flow", translate("Flow"))
|
|
|
for _, v in ipairs(flows) do o:value(v, v) end
|
|
|
o.rmempty = true
|
|
|
-o.default = "xtls-rprx-origin"
|
|
|
-o:depends("xtls", "1")
|
|
|
+o.default = "xtls-rprx-splice"
|
|
|
+o:depends("xtls", true)
|
|
|
+
|
|
|
+-- [[ allowInsecure ]]--
|
|
|
+o = s:option(Flag, "insecure", translate("allowInsecure"))
|
|
|
+o.rmempty = false
|
|
|
+o:depends("tls", true)
|
|
|
+o:depends("xtls",true)
|
|
|
+o.description = translate("If true, allowss insecure connection at TLS client, e.g., TLS server uses unverifiable certificates.")
|
|
|
|
|
|
-- [[ Mux ]]--
|
|
|
o = s:option(Flag, "mux", translate("Mux"))
|
|
|
-o.rmempty = true
|
|
|
-o.default = "0"
|
|
|
-o:depends("type", "v2ray")
|
|
|
+o.rmempty = false
|
|
|
+o:depends("type", "vmess")
|
|
|
o:depends({type="vless", xtls=false})
|
|
|
|
|
|
o = s:option(Value, "concurrency", translate("Concurrency"))
|
|
@@ -444,7 +442,7 @@ o = s:option(Flag, "certificate", translate("Self-signed Certificate"))
|
|
|
o.rmempty = true
|
|
|
o.default = "0"
|
|
|
o:depends("type", "trojan")
|
|
|
-o:depends("type", "v2ray")
|
|
|
+o:depends("type", "vmess")
|
|
|
o:depends("type", "vless")
|
|
|
o.description = translate("If you have a self-signed certificate,please check the box")
|
|
|
|