mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-02-13 02:51:50 +00:00
Restart shadowsocks after setting encrypt method
This commit is contained in:
parent
16a293cd2e
commit
a5f2bce689
1 changed files with 2 additions and 0 deletions
|
@ -1709,6 +1709,7 @@ _config_service() {
|
||||||
vps_aes="$(echo "$vps_config" | jsonfilter -q -e '@.vps.aes')"
|
vps_aes="$(echo "$vps_config" | jsonfilter -q -e '@.vps.aes')"
|
||||||
if [ "$vps_aes" != "false" ] && [ "$user_permission" != "ro" ]; then
|
if [ "$vps_aes" != "false" ] && [ "$user_permission" != "ro" ]; then
|
||||||
logger -t "OMR-VPS" "CPU support AES, set it by default"
|
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
|
uci -q batch <<-EOF >/dev/null
|
||||||
set glorytun.vpn.chacha20="0"
|
set glorytun.vpn.chacha20="0"
|
||||||
commit glorytun
|
commit glorytun
|
||||||
|
@ -1717,6 +1718,7 @@ _config_service() {
|
||||||
EOF
|
EOF
|
||||||
config_foreach _set_ss_server server "method" "aes-256-gcm"
|
config_foreach _set_ss_server server "method" "aes-256-gcm"
|
||||||
uci -q commit shadowsocks-libev
|
uci -q commit shadowsocks-libev
|
||||||
|
[ "$method" != "aes-256-gcm" ] && /etc/init.d/shadowsocks-libev restart
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue