Skip to content

Commit

Permalink
luci-app-ssr-plus: Fix link failure for latest Xray version.
Browse files Browse the repository at this point in the history
1、修复Xray更新到2024.9.30版本后,无法连接服务器导致不能科学上网;
2、本次修改兼容1.8.24及以下版本,不过要对应的服务器节点也必须是1.18.24版本及以下,即:客户端是旧版本对应的服务器也是旧版本,客户端是新版本服务器节点也必须是新版本。
3、将 socks 的配置修改为适配最新版本,不适配旧版本的配置。旧版本能否使用请测试。
  • Loading branch information
zxlhhyccc authored Oct 21, 2024
1 parent 4c090d0 commit 06f0fc3
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions luci-app-ssr-plus/root/etc/init.d/shadowsocksr
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ start_udp() {
;;
v2ray)
gen_config_file $UDP_RELAY_SERVER $type 2 $tmp_udp_port
ln_start_bin $(first_type xray v2ray) v2ray run -config $udp_config_file
ln_start_bin $(first_type xray v2ray) v2ray run -c $udp_config_file
echolog "UDP TPROXY Relay:$($(first_type "xray" "v2ray") version | head -1) Started!"
;;
trojan) #client
Expand Down Expand Up @@ -531,7 +531,7 @@ start_shunt() {
v2ray)
local tmp_port=${tmp_local_port:-$tmp_shunt_local_port}
gen_config_file $SHUNT_SERVER $type 3 $tmp_shunt_port $tmp_port
ln_start_bin $(first_type xray v2ray) v2ray run -config $shunt_config_file
ln_start_bin $(first_type xray v2ray) v2ray run -c $shunt_config_file
shunt_dns_command
echolog "shunt:$($(first_type xray v2ray) version | head -1) Started!"
;;
Expand Down Expand Up @@ -651,7 +651,7 @@ start_local() {
v2ray)
if [ "$_local" == "2" ]; then
gen_config_file $LOCAL_SERVER $type 4 0 $local_port
ln_start_bin $(first_type xray v2ray) v2ray run -config $local_config_file
ln_start_bin $(first_type xray v2ray) v2ray run -c $local_config_file
fi
echolog "Global_Socks5:$($(first_type "xray" "v2ray") version | head -1) Started!"
;;
Expand Down Expand Up @@ -745,8 +745,13 @@ Start_Run() {
echolog "Main node:$(get_name $type) $threads Threads Started!"
;;
v2ray)
local version=$($(first_type xray v2ray) version | head -1 | awk '{print $2}')
local xray_protocol=$(uci_get_by_name $GLOBAL_SERVER v2ray_protocol)
gen_config_file $GLOBAL_SERVER $type 1 $tcp_port $socks_port
ln_start_bin $(first_type xray v2ray) v2ray run -config $tcp_config_file
ln_start_bin $(first_type xray v2ray) v2ray run -c $tcp_config_file
if [ "$xray_protocol" = "vless" ] && [ "$(echo -e "$version\n1.18.24" | sort -V)" ]; then
ARG_UDP=""
fi
echolog "Main node:$($(first_type xray v2ray) version | head -1) Started!"
;;
trojan)
Expand Down

0 comments on commit 06f0fc3

Please sign in to comment.