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

Test if VPS support AES also

This commit is contained in:
Ycarus (Yannick Chabanois) 2019-06-16 07:41:45 +02:00
parent 9094e3d79d
commit fff32acf1d

View file

@ -563,13 +563,19 @@ _config_service() {
} }
_get_vps_config _get_vps_config
if [ "$(uci -q get openmptcprouter.settings.firstboot)" != "0" ] && [ -n "$(cat /proc/cpuinfo | grep aes)" ]; then if [ "$(uci -q get openmptcprouter.settings.firstboot)" != "0" ] && [ -n "$(cat /proc/cpuinfo | grep aes)" ]; then
logger -t "OMR-VPS" "CPU support AES, set it by default" [ -z "$vps_config" ] && vps_config=$(_get_json "config")
uci -q batch <<-EOF >/dev/null [ -n "$vps_config" ] && {
set glorytun.vpn.chacha20=0 vps_aes="$(echo "$vps_config" | jsonfilter -q -e '@.vps.aes')"
commit glorytun if [ "$vps_aes" != "false" ]; then
set shadowsocks-libev.sss0.method=aes-256-gcm logger -t "OMR-VPS" "CPU support AES, set it by default"
commit shadowsocks-libev uci -q batch <<-EOF >/dev/null
EOF set glorytun.vpn.chacha20=0
commit glorytun
set shadowsocks-libev.sss0.method=aes-256-gcm
commit shadowsocks-libev
EOF
fi
}
fi fi
uci -q set openmptcprouter.settings.firstboot=0 uci -q set openmptcprouter.settings.firstboot=0