From c9e31f5fb81bb46202372e03efbc49bd12a64aa1 Mon Sep 17 00:00:00 2001 From: zxl hhyccc <45259624+zxlhhyccc@users.noreply.github.com> Date: Sun, 24 Nov 2024 00:25:33 +0800 Subject: [PATCH] luci-app-ssr-plus: Fix `Xray` old configuration does not run. Signed-off-by: Zxl hhyccc --- luci-app-ssr-plus/root/etc/uci-defaults/luci-ssr-plus | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/luci-app-ssr-plus/root/etc/uci-defaults/luci-ssr-plus b/luci-app-ssr-plus/root/etc/uci-defaults/luci-ssr-plus index 64751cf4d7a..d4efcd04a17 100755 --- a/luci-app-ssr-plus/root/etc/uci-defaults/luci-ssr-plus +++ b/luci-app-ssr-plus/root/etc/uci-defaults/luci-ssr-plus @@ -28,6 +28,16 @@ touch /etc/ssrplus/gfw_list.conf touch /etc/ssrplus/oversea_list.conf touch /etc/ssrplus/ad.conf touch /etc/config/shadowsocksr + +if [ -s "/etc/config/shadowsocksr" ]; then + if ! uci -q get shadowsocksr.@global_xray_fragment[0] > /dev/null; then + uci -q add shadowsocksr global_xray_fragment + uci -q set shadowsocksr.@global_xray_fragment[0].fragment='0' + uci -q set shadowsocksr.@global_xray_fragment[0].noise='0' + uci -q commit shadowsocksr + fi +fi + [ -s "/etc/config/shadowsocksr" ] || /etc/init.d/shadowsocksr reset sed -i "s/option type 'vmess'/option type 'v2ray'\n\toption v2ray_protocol 'vmess'/g" /etc/config/shadowsocksr