mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-07-04 15:14:28 +02:00
netwatch-dns: retry doh server...
... for more resilience on bad connectivity or saturated link.
This commit is contained in:
parent
c3010af4ed
commit
d46574b4fe
1 changed files with 7 additions and 5 deletions
|
@ -119,11 +119,13 @@
|
|||
|
||||
:local Data false;
|
||||
:onerror Err {
|
||||
:retry {
|
||||
:set Data ([ /tool/fetch check-certificate=yes-without-crl output=user \
|
||||
http-header-field=({ "accept: application/dns-message" }) \
|
||||
url=(($DohServer->"doh-url") . "?dns=" . [ :convert to=base64 ([ :rndstr length=2 ] . \
|
||||
"\01\00" . "\00\01" . "\00\00" . "\00\00" . "\00\00" . "\09doh-check\05eworm\02de\00" . \
|
||||
"\00\10" . "\00\01") ]) as-value ]->"data");
|
||||
} delay=1s max=3;
|
||||
} do={
|
||||
$LogPrint warning $ScriptName ("Request to DoH server " . ($DohServer->"doh-url") . \
|
||||
" failed: " . $Err);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue