mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2025-06-20 17:55:40 +02:00
netwatch-dns: :do ... on-error=... -> :onerror ... do=...
This commit is contained in:
parent
c757064eb9
commit
a523f97938
1 changed files with 4 additions and 4 deletions
|
@ -118,15 +118,15 @@
|
|||
}
|
||||
|
||||
:local Data false;
|
||||
:do {
|
||||
:onerror Err {
|
||||
: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");
|
||||
} on-error={
|
||||
$LogPrint warning $ScriptName ("Request to DoH server failed (network or certificate issue): " . \
|
||||
($DohServer->"doh-url"));
|
||||
} do={
|
||||
$LogPrint warning $ScriptName ("Request to DoH server " . ($DohServer->"doh-url") . \
|
||||
" failed: " . $Err);
|
||||
}
|
||||
|
||||
:if ($Data != false) do={
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue