Compare commits

...

2 commits

Author SHA1 Message Date
Christian Hesse
b068f86995 netwatch-dns: fix indention 2025-06-25 10:47:12 +02:00
Christian Hesse
d46574b4fe netwatch-dns: retry doh server...
... for more resilience on bad connectivity or saturated link.
2025-06-25 10:30:26 +02:00

View file

@ -119,11 +119,13 @@
:local Data false; :local Data false;
:onerror Err { :onerror Err {
:set Data ([ /tool/fetch check-certificate=yes-without-crl output=user \ :retry {
http-header-field=({ "accept: application/dns-message" }) \ :set Data ([ /tool/fetch check-certificate=yes-without-crl output=user \
url=(($DohServer->"doh-url") . "?dns=" . [ :convert to=base64 ([ :rndstr length=2 ] . \ http-header-field=({ "accept: application/dns-message" }) \
"\01\00" . "\00\01" . "\00\00" . "\00\00" . "\00\00" . "\09doh-check\05eworm\02de\00" . \ url=(($DohServer->"doh-url") . "?dns=" . [ :convert to=base64 ([ :rndstr length=2 ] . \
"\00\10" . "\00\01") ]) as-value ]->"data"); "\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={ } do={
$LogPrint warning $ScriptName ("Request to DoH server " . ($DohServer->"doh-url") . \ $LogPrint warning $ScriptName ("Request to DoH server " . ($DohServer->"doh-url") . \
" failed: " . $Err); " failed: " . $Err);