Răsfoiți Sursa

Fixed subscription issues which showing ss nodes as v2ray nodes

AmberisMyShiba 2 ani în urmă
părinte
comite
cca5c6d0a0

+ 2 - 13
luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua

@@ -145,10 +145,10 @@ if is_finded("ssr-redir") then
 	o:value("ssr", translate("ShadowsocksR"))
 end
 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
 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
 if is_finded("trojan") then
 	o:value("trojan", translate("Trojan"))
@@ -202,7 +202,6 @@ o.datatype = "host"
 o.rmempty = false
 o:depends("type", "ssr")
 o:depends("type", "ss")
-o:depends("type", "ss_rust")
 o:depends("type", "v2ray")
 o:depends("type", "trojan")
 o:depends("type", "naiveproxy")
@@ -216,7 +215,6 @@ o.datatype = "port"
 o.rmempty = true
 o:depends("type", "ssr")
 o:depends("type", "ss")
-o:depends("type", "ss_rust")
 o:depends("type", "v2ray")
 o:depends("type", "trojan")
 o:depends("type", "naiveproxy")
@@ -244,7 +242,6 @@ o.password = true
 o.rmempty = true
 o:depends("type", "ssr")
 o:depends("type", "ss")
-o:depends("type", "ss_rust")
 o:depends("type", "trojan")
 o:depends("type", "naiveproxy")
 o:depends("type", "shadowtls")
@@ -267,7 +264,6 @@ for _, v in ipairs(encrypt_methods_ss) do
 end
 o.rmempty = true
 o:depends("type", "ss")
-o:depends("type", "ss_rust")
 o:depends({type = "v2ray", v2ray_protocol = "shadowsocks"})
 
 o = s:option(Flag, "uot", translate("UDP over TCP"))
@@ -295,12 +291,10 @@ if is_finded("xray-plugin") then
 end
 o.rmempty = true
 o:depends("type", "ss")
-o:depends("type", "ss_rust")
 
 o = s:option(Value, "plugin_opts", translate("Plugin Opts"))
 o.rmempty = true
 o:depends("type", "ss")
-o:depends("type", "ss_rust")
 
 o = s:option(ListValue, "protocol", translate("Protocol"))
 for _, v in ipairs(protocol) do
@@ -989,7 +983,6 @@ o.rmempty = true
 o.default = "0"
 o:depends("type", "ssr")
 o:depends("type", "ss")
-o:depends("type", "ss_rust")
 o:depends("type", "trojan")
 o:depends("type", "hysteria")
 
@@ -1008,26 +1001,22 @@ if is_finded("kcptun-client") then
 	o.default = "0"
 	o:depends("type", "ssr")
 	o:depends("type", "ss")
-	o:depends("type", "ss_rust")
 
 	o = s:option(Value, "kcp_port", translate("KcpTun Port"))
 	o.datatype = "port"
 	o.default = 4000
 	o:depends("type", "ssr")
 	o:depends("type", "ss")
-	o:depends("type", "ss_rust")
 
 	o = s:option(Value, "kcp_password", translate("KcpTun Password"))
 	o.password = true
 	o:depends("type", "ssr")
 	o:depends("type", "ss")
-	o:depends("type", "ss_rust")
 
 	o = s:option(Value, "kcp_param", translate("KcpTun Param"))
 	o.default = "--nocomp"
 	o:depends("type", "ssr")
 	o:depends("type", "ss")
-	o:depends("type", "ss_rust")
 end
 
 return m

+ 3 - 4
luci-app-ssr-plus/root/etc/init.d/shadowsocksr

@@ -270,7 +270,6 @@ get_name() {
 	case "$1" in
 	ss) echo "Shadowsocks" ;;
 	ssr) echo "ShadowsocksR" ;;
-	ss_rust) echo "Shadowsocks-Rust";;
 	esac
 }
 
@@ -300,7 +299,7 @@ gen_config_file() { #server1 type2 code3 local_port4 socks_port5 chain6 threads5
 		;;
 	esac
 	case "$2" in
-	ss | ssr | ss_rust)
+	ss | ssr)
 		lua /usr/share/shadowsocksr/gen_config.lua $1 $mode $4 ${ss_protocol:-redir} >$config_file
 		if [ "$3" == "3" ]; then
 			lua /usr/share/shadowsocksr/gen_config.lua $1 $mode $tmp_port socks >$shunt_dns_config_file
@@ -457,7 +456,7 @@ start_udp() {
 start_shunt() {
 	local type=$(uci_get_by_name $SHUNT_SERVER type)
 	case "$type" in
-	ss | ssr |ss_rust)
+	ss | ssr)
 		gen_config_file $SHUNT_SERVER $type 3 $tmp_shunt_port
 		ss_program="$(first_type ${type}local ${type}-redir)"
 		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 type=$(uci_get_by_name $LOCAL_SERVER type)
 	case "$type" in
-	ss | ssr | ss_rust)
+	ss | ssr)
 		gen_config_file $LOCAL_SERVER $type 4 $local_port
 		ss_program="$(first_type ${type}local ${type}-local)"
 		ln_start_bin $ss_program ${type}-local -c $local_config_file

+ 0 - 8
luci-app-ssr-plus/root/usr/share/shadowsocksr/gen_config.lua

@@ -442,14 +442,6 @@ function config:new(o)
 end
 function config:handleIndex(index)
 	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.protocol = socks_port
 			if server.plugin and server.plugin ~= "none" then