Hi Aleksandr,
Nice script. One question:
> [ ${idle_seconds} -lt 150 ] && return 0;
Is there a reason why you went with 150? My original reresolve-dns.sh
went with 135 (REKEY_AFTER_TIME + KEEPALIVE_TIMEOUT + REKEY_TIMEOUT).
Did you find 150 matched network conditions better?
Regards,
Jason