diff --git a/package/lean/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua b/package/lean/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua index ffc5f2a2b3..3cd6294b6a 100644 --- a/package/lean/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua +++ b/package/lean/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua @@ -3,9 +3,9 @@ local server_table = {} uci:foreach("shadowsocksr", "servers", function(s) if s.alias then - server_table[s[".name"]] = "[%s]:%s" % {string.upper(s.type), s.alias} + server_table[s[".name"]] = "[%s]:%s" % {string.upper(s.v2ray_protocol or s.type), s.alias} elseif s.server and s.server_port then - server_table[s[".name"]] = "[%s]:%s:%s" % {string.upper(s.type), s.server, s.server_port} + server_table[s[".name"]] = "[%s]:%s:%s" % {string.upper(s.v2ray_protocol or s.type), s.server, s.server_port} end end) diff --git a/package/lean/luci-app-ssr-plus/root/etc/init.d/shadowsocksr b/package/lean/luci-app-ssr-plus/root/etc/init.d/shadowsocksr index b5fa6b2b82..5a327bec59 100755 --- a/package/lean/luci-app-ssr-plus/root/etc/init.d/shadowsocksr +++ b/package/lean/luci-app-ssr-plus/root/etc/init.d/shadowsocksr @@ -461,6 +461,7 @@ start_shunt() { } start_local() { + [ "$LOCAL_SERVER" = "nil" ] && return 1 local local_port=$(uci_get_by_type socks5_proxy local_port) [ "$LOCAL_SERVER" == "$SHUNT_SERVER" ] && tmp_local_port=$local_port local type=$(uci_get_by_name $LOCAL_SERVER type) @@ -580,12 +581,16 @@ load_config() { else GLOBAL_SERVER=$switch_server fi + LOCAL_SERVER=$(uci_get_by_type socks5_proxy server nil) if [ "$GLOBAL_SERVER" == "nil" ]; then + mode="tcp,udp" + _local="2" + local_config_file=$TMP_PATH/tcp-udp-ssr-local.json + start_local return 1 fi UDP_RELAY_SERVER=$(uci_get_by_type global udp_relay_server nil) SHUNT_SERVER=$(uci_get_by_type global netflix_server nil) - LOCAL_SERVER=$(uci_get_by_type socks5_proxy server nil) tcp_config_file=$TMP_PATH/tcp-only-ssr-retcp.json case "$UDP_RELAY_SERVER" in nil)