1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-02-12 18:41:51 +00:00

Restart shadowsocks after setting encrypt method

This commit is contained in:
Ycarus (Yannick Chabanois) 2021-03-11 16:56:20 +01:00
parent 16a293cd2e
commit a5f2bce689

View file

@ -1709,6 +1709,7 @@ _config_service() {
vps_aes="$(echo "$vps_config" | jsonfilter -q -e '@.vps.aes')"
if [ "$vps_aes" != "false" ] && [ "$user_permission" != "ro" ]; then
logger -t "OMR-VPS" "CPU support AES, set it by default"
method="$(uci -q get shadowsocks-libev.sss0.method)"
uci -q batch <<-EOF >/dev/null
set glorytun.vpn.chacha20="0"
commit glorytun
@ -1717,6 +1718,7 @@ _config_service() {
EOF
config_foreach _set_ss_server server "method" "aes-256-gcm"
uci -q commit shadowsocks-libev
[ "$method" != "aes-256-gcm" ] && /etc/init.d/shadowsocks-libev restart
fi
}
fi