Fixed subscription issues which showing ss nodes as v2ray nodes
This commit is contained in:
parent
bda808486d
commit
760addae31
@ -145,10 +145,10 @@ if is_finded("ssr-redir") then
|
|||||||
o:value("ssr", translate("ShadowsocksR"))
|
o:value("ssr", translate("ShadowsocksR"))
|
||||||
end
|
end
|
||||||
if is_finded("ss-local") or is_finded("ss-redir") then
|
if is_finded("ss-local") or is_finded("ss-redir") then
|
||||||
o:value("ss", translate("Shadowsocks-libev New Version"))
|
o:value("ss", translate("Shadowsocks-libev Version"))
|
||||||
end
|
end
|
||||||
if is_finded("sslocal") or is_finded("ssmanager") then
|
if is_finded("sslocal") or is_finded("ssmanager") then
|
||||||
o:value("ss_rust", translate("Shadowsocks-rust Version"))
|
o:value("ss", translate("Shadowsocks-rust Version"))
|
||||||
end
|
end
|
||||||
if is_finded("trojan") then
|
if is_finded("trojan") then
|
||||||
o:value("trojan", translate("Trojan"))
|
o:value("trojan", translate("Trojan"))
|
||||||
@ -202,7 +202,6 @@ o.datatype = "host"
|
|||||||
o.rmempty = false
|
o.rmempty = false
|
||||||
o:depends("type", "ssr")
|
o:depends("type", "ssr")
|
||||||
o:depends("type", "ss")
|
o:depends("type", "ss")
|
||||||
o:depends("type", "ss_rust")
|
|
||||||
o:depends("type", "v2ray")
|
o:depends("type", "v2ray")
|
||||||
o:depends("type", "trojan")
|
o:depends("type", "trojan")
|
||||||
o:depends("type", "naiveproxy")
|
o:depends("type", "naiveproxy")
|
||||||
@ -216,7 +215,6 @@ o.datatype = "port"
|
|||||||
o.rmempty = true
|
o.rmempty = true
|
||||||
o:depends("type", "ssr")
|
o:depends("type", "ssr")
|
||||||
o:depends("type", "ss")
|
o:depends("type", "ss")
|
||||||
o:depends("type", "ss_rust")
|
|
||||||
o:depends("type", "v2ray")
|
o:depends("type", "v2ray")
|
||||||
o:depends("type", "trojan")
|
o:depends("type", "trojan")
|
||||||
o:depends("type", "naiveproxy")
|
o:depends("type", "naiveproxy")
|
||||||
@ -244,7 +242,6 @@ o.password = true
|
|||||||
o.rmempty = true
|
o.rmempty = true
|
||||||
o:depends("type", "ssr")
|
o:depends("type", "ssr")
|
||||||
o:depends("type", "ss")
|
o:depends("type", "ss")
|
||||||
o:depends("type", "ss_rust")
|
|
||||||
o:depends("type", "trojan")
|
o:depends("type", "trojan")
|
||||||
o:depends("type", "naiveproxy")
|
o:depends("type", "naiveproxy")
|
||||||
o:depends("type", "shadowtls")
|
o:depends("type", "shadowtls")
|
||||||
@ -267,7 +264,6 @@ for _, v in ipairs(encrypt_methods_ss) do
|
|||||||
end
|
end
|
||||||
o.rmempty = true
|
o.rmempty = true
|
||||||
o:depends("type", "ss")
|
o:depends("type", "ss")
|
||||||
o:depends("type", "ss_rust")
|
|
||||||
o:depends({type = "v2ray", v2ray_protocol = "shadowsocks"})
|
o:depends({type = "v2ray", v2ray_protocol = "shadowsocks"})
|
||||||
|
|
||||||
o = s:option(Flag, "uot", translate("UDP over TCP"))
|
o = s:option(Flag, "uot", translate("UDP over TCP"))
|
||||||
@ -295,12 +291,10 @@ if is_finded("xray-plugin") then
|
|||||||
end
|
end
|
||||||
o.rmempty = true
|
o.rmempty = true
|
||||||
o:depends("type", "ss")
|
o:depends("type", "ss")
|
||||||
o:depends("type", "ss_rust")
|
|
||||||
|
|
||||||
o = s:option(Value, "plugin_opts", translate("Plugin Opts"))
|
o = s:option(Value, "plugin_opts", translate("Plugin Opts"))
|
||||||
o.rmempty = true
|
o.rmempty = true
|
||||||
o:depends("type", "ss")
|
o:depends("type", "ss")
|
||||||
o:depends("type", "ss_rust")
|
|
||||||
|
|
||||||
o = s:option(ListValue, "protocol", translate("Protocol"))
|
o = s:option(ListValue, "protocol", translate("Protocol"))
|
||||||
for _, v in ipairs(protocol) do
|
for _, v in ipairs(protocol) do
|
||||||
@ -989,7 +983,6 @@ o.rmempty = true
|
|||||||
o.default = "0"
|
o.default = "0"
|
||||||
o:depends("type", "ssr")
|
o:depends("type", "ssr")
|
||||||
o:depends("type", "ss")
|
o:depends("type", "ss")
|
||||||
o:depends("type", "ss_rust")
|
|
||||||
o:depends("type", "trojan")
|
o:depends("type", "trojan")
|
||||||
o:depends("type", "hysteria")
|
o:depends("type", "hysteria")
|
||||||
|
|
||||||
@ -1008,26 +1001,22 @@ if is_finded("kcptun-client") then
|
|||||||
o.default = "0"
|
o.default = "0"
|
||||||
o:depends("type", "ssr")
|
o:depends("type", "ssr")
|
||||||
o:depends("type", "ss")
|
o:depends("type", "ss")
|
||||||
o:depends("type", "ss_rust")
|
|
||||||
|
|
||||||
o = s:option(Value, "kcp_port", translate("KcpTun Port"))
|
o = s:option(Value, "kcp_port", translate("KcpTun Port"))
|
||||||
o.datatype = "port"
|
o.datatype = "port"
|
||||||
o.default = 4000
|
o.default = 4000
|
||||||
o:depends("type", "ssr")
|
o:depends("type", "ssr")
|
||||||
o:depends("type", "ss")
|
o:depends("type", "ss")
|
||||||
o:depends("type", "ss_rust")
|
|
||||||
|
|
||||||
o = s:option(Value, "kcp_password", translate("KcpTun Password"))
|
o = s:option(Value, "kcp_password", translate("KcpTun Password"))
|
||||||
o.password = true
|
o.password = true
|
||||||
o:depends("type", "ssr")
|
o:depends("type", "ssr")
|
||||||
o:depends("type", "ss")
|
o:depends("type", "ss")
|
||||||
o:depends("type", "ss_rust")
|
|
||||||
|
|
||||||
o = s:option(Value, "kcp_param", translate("KcpTun Param"))
|
o = s:option(Value, "kcp_param", translate("KcpTun Param"))
|
||||||
o.default = "--nocomp"
|
o.default = "--nocomp"
|
||||||
o:depends("type", "ssr")
|
o:depends("type", "ssr")
|
||||||
o:depends("type", "ss")
|
o:depends("type", "ss")
|
||||||
o:depends("type", "ss_rust")
|
|
||||||
end
|
end
|
||||||
|
|
||||||
return m
|
return m
|
||||||
|
@ -270,7 +270,6 @@ get_name() {
|
|||||||
case "$1" in
|
case "$1" in
|
||||||
ss) echo "Shadowsocks" ;;
|
ss) echo "Shadowsocks" ;;
|
||||||
ssr) echo "ShadowsocksR" ;;
|
ssr) echo "ShadowsocksR" ;;
|
||||||
ss_rust) echo "Shadowsocks-Rust";;
|
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -300,7 +299,7 @@ gen_config_file() { #server1 type2 code3 local_port4 socks_port5 chain6 threads5
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
case "$2" in
|
case "$2" in
|
||||||
ss | ssr | ss_rust)
|
ss | ssr)
|
||||||
lua /usr/share/shadowsocksr/gen_config.lua $1 $mode $4 ${ss_protocol:-redir} >$config_file
|
lua /usr/share/shadowsocksr/gen_config.lua $1 $mode $4 ${ss_protocol:-redir} >$config_file
|
||||||
if [ "$3" == "3" ]; then
|
if [ "$3" == "3" ]; then
|
||||||
lua /usr/share/shadowsocksr/gen_config.lua $1 $mode $tmp_port socks >$shunt_dns_config_file
|
lua /usr/share/shadowsocksr/gen_config.lua $1 $mode $tmp_port socks >$shunt_dns_config_file
|
||||||
@ -457,7 +456,7 @@ start_udp() {
|
|||||||
start_shunt() {
|
start_shunt() {
|
||||||
local type=$(uci_get_by_name $SHUNT_SERVER type)
|
local type=$(uci_get_by_name $SHUNT_SERVER type)
|
||||||
case "$type" in
|
case "$type" in
|
||||||
ss | ssr |ss_rust)
|
ss | ssr)
|
||||||
gen_config_file $SHUNT_SERVER $type 3 $tmp_shunt_port
|
gen_config_file $SHUNT_SERVER $type 3 $tmp_shunt_port
|
||||||
ss_program="$(first_type ${type}local ${type}-redir)"
|
ss_program="$(first_type ${type}local ${type}-redir)"
|
||||||
ln_start_bin $ss_program ${type}-redir -c $shunt_config_file
|
ln_start_bin $ss_program ${type}-redir -c $shunt_config_file
|
||||||
@ -584,7 +583,7 @@ start_local() {
|
|||||||
[ "$LOCAL_SERVER" == "$SHUNT_SERVER" ] && tmp_local_port=$local_port
|
[ "$LOCAL_SERVER" == "$SHUNT_SERVER" ] && tmp_local_port=$local_port
|
||||||
local type=$(uci_get_by_name $LOCAL_SERVER type)
|
local type=$(uci_get_by_name $LOCAL_SERVER type)
|
||||||
case "$type" in
|
case "$type" in
|
||||||
ss | ssr | ss_rust)
|
ss | ssr)
|
||||||
gen_config_file $LOCAL_SERVER $type 4 $local_port
|
gen_config_file $LOCAL_SERVER $type 4 $local_port
|
||||||
ss_program="$(first_type ${type}local ${type}-local)"
|
ss_program="$(first_type ${type}local ${type}-local)"
|
||||||
ln_start_bin $ss_program ${type}-local -c $local_config_file
|
ln_start_bin $ss_program ${type}-local -c $local_config_file
|
||||||
|
@ -442,14 +442,6 @@ function config:new(o)
|
|||||||
end
|
end
|
||||||
function config:handleIndex(index)
|
function config:handleIndex(index)
|
||||||
local switch = {
|
local switch = {
|
||||||
ss_rust = function()
|
|
||||||
ss.protocol = socks_port
|
|
||||||
if server.plugin and server.plugin ~= "none" then
|
|
||||||
ss.plugin = server.plugin
|
|
||||||
ss.plugin_opts = server.plugin_opts or nil
|
|
||||||
end
|
|
||||||
print(json.stringify(ss, 1))
|
|
||||||
end,
|
|
||||||
ss = function()
|
ss = function()
|
||||||
ss.protocol = socks_port
|
ss.protocol = socks_port
|
||||||
if server.plugin and server.plugin ~= "none" then
|
if server.plugin and server.plugin ~= "none" then
|
||||||
|
Loading…
Reference in New Issue
Block a user