Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

luci-app-ssr-plus: Fix Xray old configuration does not run. #1614

Merged
merged 1 commit into from
Nov 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions luci-app-ssr-plus/root/etc/uci-defaults/luci-ssr-plus
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down