1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00

Allow to change encryption on XRay Shadowsocks

This commit is contained in:
Ycarus (Yannick Chabanois) 2023-12-13 10:58:47 +01:00
parent e41723e295
commit b8d2414f51
2 changed files with 7 additions and 3 deletions

View file

@ -353,6 +353,7 @@ _set_xray_server_vps() {
enabled=$(uci -q get xray.main.enabled)
userid=$(uci -q get xray.omrout.s_vless_user_id)
protocol=$(uci -q get xray.omrout.protocol)
ss_method=$(uci -q get xray.omrout.s_shadowsocks_method)
if [ "$protocol" = "vless-reality" ] && [ "$enabled" = "1" ]; then
vless_reality='true'
else
@ -363,10 +364,11 @@ _set_xray_server_vps() {
[ -z "$vps_config" ] && return
current_userid="$(echo "$vps_config" | jsonfilter -q -e '@.xray.config.key')"
current_vlessreality="$(echo "$vps_config" | jsonfilter -q -e '@.xray.config.vless_reality')"
current_method="$(echo "$vps_config" | jsonfilter -q -e '@.xray.config.ss_method')"
if [ "$current_userid" != "$userid" ] || [ "$current_vlessreality" != "$vless_reality" ]; then
if [ "$current_userid" != "$userid" ] || [ "$current_vlessreality" != "$vless_reality" ] || [ "$current_method" != "$ss_method" ]; then
local settings
settings='{"userid": "'$userid'","vless_reality": '$vless_reality'}'
settings='{"userid": "'$userid'","vless_reality": '$vless_reality',"ss_method": "'$ss_method'"}'
echo $(_set_json "xray" "$settings")
fi
}