Skip to content

Commit

Permalink
luci-app-ssr-plus: Fix Xray old configuration does not run.
Browse files Browse the repository at this point in the history
Signed-off-by: Zxl hhyccc <[email protected]>
  • Loading branch information
zxlhhyccc committed Nov 29, 2024
1 parent 3f2dd2c commit 475f2d6
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions luci-app-ssr-plus/root/etc/uci-defaults/luci-ssr-plus
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,6 @@ uci -q batch <<-EOF >/dev/null
set firewall.shadowsocksr.path=/var/etc/shadowsocksr.include
set firewall.shadowsocksr.reload=1
commit firewall
delete shadowsocksr.@global_xray_fragment[0]
add shadowsocksr global_xray_fragment
set shadowsocksr.@global_xray_fragment[0].fragment='0'
set shadowsocksr.@global_xray_fragment[0].noise='0'
commit shadowsocksr
EOF

rm -rf /etc/config/shadowsocksr-opkg /etc/ssrplus/*opkg
Expand All @@ -34,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
Expand Down

0 comments on commit 475f2d6

Please sign in to comment.