|
@@ -184,9 +184,6 @@ o:value("vless", translate("VLESS"))
|
|
|
o:value("vmess", translate("VMess"))
|
|
|
o:value("trojan", translate("Trojan"))
|
|
|
o:value("shadowsocks", translate("Shadowsocks"))
|
|
|
-if is_installed("sagernet-core") then
|
|
|
- o:value("shadowsocksr", translate("ShadowsocksR"))
|
|
|
-end
|
|
|
if is_finded("xray") then
|
|
|
o:value("wireguard", translate("WireGuard"))
|
|
|
end
|
|
@@ -244,7 +241,6 @@ o:depends({type = "socks5", auth_enable = true})
|
|
|
o:depends({type = "v2ray", v2ray_protocol = "http", auth_enable = true})
|
|
|
o:depends({type = "v2ray", v2ray_protocol = "socks", socks_ver = "5", auth_enable = true})
|
|
|
o:depends({type = "v2ray", v2ray_protocol = "shadowsocks"})
|
|
|
-o:depends({type = "v2ray", v2ray_protocol = "shadowsocksr"})
|
|
|
o:depends({type = "v2ray", v2ray_protocol = "trojan"})
|
|
|
|
|
|
o = s:option(ListValue, "encrypt_method", translate("Encrypt Method"))
|
|
@@ -253,7 +249,6 @@ for _, v in ipairs(encrypt_methods) do
|
|
|
end
|
|
|
o.rmempty = true
|
|
|
o:depends("type", "ssr")
|
|
|
-o:depends({type = "v2ray", v2ray_protocol = "shadowsocksr"})
|
|
|
|
|
|
o = s:option(ListValue, "encrypt_method_ss", translate("Encrypt Method"))
|
|
|
for _, v in ipairs(encrypt_methods_ss) do
|
|
@@ -277,10 +272,10 @@ o.default = "1"
|
|
|
-- Shadowsocks Plugin
|
|
|
o = s:option(Value, "plugin", translate("Obfs"))
|
|
|
o:value("none", translate("None"))
|
|
|
-if is_finded("obfs-local") or is_installed("sagernet-core") then
|
|
|
+if is_finded("obfs-local") then
|
|
|
o:value("obfs-local", translate("obfs-local"))
|
|
|
end
|
|
|
-if is_finded("v2ray-plugin") or is_installed("sagernet-core") then
|
|
|
+if is_finded("v2ray-plugin") then
|
|
|
o:value("v2ray-plugin", translate("v2ray-plugin"))
|
|
|
end
|
|
|
if is_finded("xray-plugin") then
|
|
@@ -288,16 +283,10 @@ if is_finded("xray-plugin") then
|
|
|
end
|
|
|
o.rmempty = true
|
|
|
o:depends("type", "ss")
|
|
|
-if is_installed("sagernet-core") then
|
|
|
- o:depends({type = "v2ray", v2ray_protocol = "shadowsocks"})
|
|
|
-end
|
|
|
|
|
|
o = s:option(Value, "plugin_opts", translate("Plugin Opts"))
|
|
|
o.rmempty = true
|
|
|
o:depends("type", "ss")
|
|
|
-if is_installed("sagernet-core") then
|
|
|
- o:depends({type = "v2ray", v2ray_protocol = "shadowsocks"})
|
|
|
-end
|
|
|
|
|
|
o = s:option(ListValue, "protocol", translate("Protocol"))
|
|
|
for _, v in ipairs(protocol) do
|
|
@@ -305,11 +294,9 @@ for _, v in ipairs(protocol) do
|
|
|
end
|
|
|
o.rmempty = true
|
|
|
o:depends("type", "ssr")
|
|
|
-o:depends({type = "v2ray", v2ray_protocol = "shadowsocksr"})
|
|
|
|
|
|
o = s:option(Value, "protocol_param", translate("Protocol param (optional)"))
|
|
|
o:depends("type", "ssr")
|
|
|
-o:depends({type = "v2ray", v2ray_protocol = "shadowsocksr"})
|
|
|
|
|
|
o = s:option(ListValue, "obfs", translate("Obfs"))
|
|
|
for _, v in ipairs(obfs) do
|
|
@@ -317,11 +304,9 @@ for _, v in ipairs(obfs) do
|
|
|
end
|
|
|
o.rmempty = true
|
|
|
o:depends("type", "ssr")
|
|
|
-o:depends({type = "v2ray", v2ray_protocol = "shadowsocksr"})
|
|
|
|
|
|
o = s:option(Value, "obfs_param", translate("Obfs param (optional)"))
|
|
|
o:depends("type", "ssr")
|
|
|
-o:depends({type = "v2ray", v2ray_protocol = "shadowsocksr"})
|
|
|
|
|
|
-- [[ Hysteria ]]--
|
|
|
o = s:option(ListValue, "hysteria_protocol", translate("Protocol"))
|
|
@@ -478,21 +463,17 @@ o:depends("transport", "ws")
|
|
|
o.rmempty = true
|
|
|
|
|
|
if is_finded("v2ray") then
|
|
|
- -- 启用WS前置数据
|
|
|
- o = s:option(Flag, "ws_ed_enable", translate("Enable early data"))
|
|
|
- o:depends("transport", "ws")
|
|
|
-
|
|
|
-- WS前置数据
|
|
|
o = s:option(Value, "ws_ed", translate("Max Early Data"))
|
|
|
o:depends("ws_ed_enable", true)
|
|
|
o.datatype = "uinteger"
|
|
|
- o.default = 2048
|
|
|
+ o.value("2048")
|
|
|
o.rmempty = true
|
|
|
|
|
|
-- WS前置数据标头
|
|
|
o = s:option(Value, "ws_ed_header", translate("Early Data Header Name"))
|
|
|
o:depends("ws_ed_enable", true)
|
|
|
- o.default = "Sec-WebSocket-Protocol"
|
|
|
+ o.value("Sec-WebSocket-Protocol")
|
|
|
o.rmempty = true
|
|
|
end
|
|
|
|
|
@@ -513,19 +494,16 @@ o = s:option(Value, "serviceName", translate("gRPC Service Name"))
|
|
|
o:depends("transport", "grpc")
|
|
|
o.rmempty = true
|
|
|
|
|
|
-if is_finded("xray") or is_installed("sagernet-core") then
|
|
|
+if is_finded("xray") then
|
|
|
-- gPRC模式
|
|
|
o = s:option(ListValue, "grpc_mode", translate("gRPC Mode"))
|
|
|
o:depends("transport", "grpc")
|
|
|
o:value("gun", translate("Gun"))
|
|
|
o:value("multi", translate("Multi"))
|
|
|
- if is_installed("sagernet-core") then
|
|
|
- o:value("raw", translate("Raw"))
|
|
|
- end
|
|
|
o.rmempty = true
|
|
|
end
|
|
|
|
|
|
-if is_finded("xray") or is_installed("sagernet-core") then
|
|
|
+if is_finded("xray") then
|
|
|
-- gRPC初始窗口
|
|
|
o = s:option(Value, "initial_windows_size", translate("Initial Windows Size"))
|
|
|
o.datatype = "uinteger"
|
|
@@ -824,17 +802,6 @@ o:depends("type", "ss")
|
|
|
o:depends("type", "trojan")
|
|
|
o:depends("type", "hysteria")
|
|
|
|
|
|
-if is_installed("sagernet-core") then
|
|
|
- o = s:option(ListValue, "packet_encoding", translate("Packet Encoding"))
|
|
|
- o:value("none", translate("none"))
|
|
|
- o:value("packet", translate("packet (v2ray-core v5+)"))
|
|
|
- o:value("xudp", translate("xudp (Xray-core)"))
|
|
|
- o.default = "xudp"
|
|
|
- o.rmempty = true
|
|
|
- o:depends({type = "v2ray", v2ray_protocol = "vless"})
|
|
|
- o:depends({type = "v2ray", v2ray_protocol = "vmess"})
|
|
|
-end
|
|
|
-
|
|
|
o = s:option(Flag, "switch_enable", translate("Enable Auto Switch"))
|
|
|
o.rmempty = false
|
|
|
o.default = "1"
|