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

Set aes instead of chacha when CPU support it

This commit is contained in:
Ycarus 2019-05-14 22:28:39 +02:00
parent 19988237ce
commit 40eda919b3

View file

@ -552,6 +552,20 @@ _config_service() {
EOF
}
boot() {
if [ "$(uci -q get openmptcprouter.settings.firstboot)" != "0" ] && [ -n "$(cat /proc/cpuinfo | grep aes)" ]; then
uci -q batch <<-EOF >/dev/null
set glorytun.vpn.chacha20=0
commit glorytun
shadowsocks-libev.sss0.method=aes-256-gcm
commit shadowsocks-libev
EOF
fi
uci -q set openmptcprouter.settings.firstboot=0
start "$@"
}
start_service() {
serversnb=0
config_load openmptcprouter