Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
DNS testing tools
Remoh
Commits
5547974c
Commit
5547974c
authored
May 25, 2020
by
Alexandre
Browse files
Merge branch 'master' into pipelining
parents
6abef5ec
2ac17769
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
5547974c
...
...
@@ -45,6 +45,7 @@ Total elapsed time: 0.07 seconds (66.72 ms/request )
Possible options, besides
`--dot`
:
*
--verbose or -v: Makes the program more talkative
*
--debug: Makes the program very talkative (sets verbose to true)
*
--head or -e: (DoH) Uses only the HEAD HTTP method. Since the RFC
does not mention it, result is probably indefinite.
*
--POST or -P: (DoH) Uses the POST HTTP method (default is GET)
...
...
@@ -61,7 +62,11 @@ Possible options, besides `--dot`:
*
--pipelining: on DoT, send several requests even before getting the
reply to the first one (may increase performance when you have
several requests)
*
--multistreams: (DoH) Uses HTTP/2 streams (requires the --file option)
*
--file INPUT_FILE: provide an input file with a list of domain name to query
(read the first line only, use --repeat N to read up to N lines of the file)
*
--repeat N: repeat a test N times or read up to N lines of a file
### Check
The
`--check`
option allows to run several defined tests on a connection.
...
...
@@ -123,7 +128,52 @@ one):
```
When repeating tests, you can add a delay between tests, with
`--delay
N`
, where N is the (possibly fractional) number of seconds to wait.
N`
or
`-d N`
, where N is the (possibly fractional) number of seconds
to wait.
### Mulitstreams
When using Homer with DoH, the option
`--multistreams`
can be used
to specify that you want to take advantage of the HTTP/2 streams
when sending several requests.
This option requires an input file provided with the
`--file`
option.
By default only the first line of the file is read. You need to
specify a number of line with
`--repeat`
to read more lines from
the file.
For example :
```
% ./homer.py --multistreams --file input_file --repeat 5 https://doh.powerdns.org
```
In order to focus on the time per request, you can suppress the
output by using the option
`--no-display-results`
.
This option only works with
`--multistreams`
.
Two modes are available. By default each response is read,
checked and displayed as soon as it is received.
You can use
`--sync`
to delay this processing after the last transfer.
In that case the DNS responses are displayed in the same order as they
were sent.
An option
`--time`
allows to display the time taken by each transfer.
This is based on
[
libcurl time values
](
https://curl.haxx.se/libcurl/c/curl_easy_getinfo.html#TIMES
)
[
CURLINFO_TOTAL_TIME
](
https://curl.haxx.se/libcurl/c/curl_easy_getinfo.html#CURLINFOTOTALTIME
)
and
[
CURLINFO_PRETRANSFER_TIME
](
https://curl.haxx.se/libcurl/c/curl_easy_getinfo.html#CURLINFOPRETRANSFERTIME
)
```
% ./homer.py --multistreams --file input_file --repeat 5 --no-display-results --time https://doh.powerdns.org
0 36.165 ms 44.773 ms 8.608 ms
1 0.142 ms 8.580 ms 8.438 ms
3 0.095 ms 9.223 ms 9.128 ms
2 0.103 ms 10.282 ms 10.179 ms
4 0.104 ms 10.068 ms 9.964 ms
Total elapsed time: 0.07 seconds (9.26 ms/request)
OK
```
### Monitoring with Nagios, Icinga, or similar software
...
...
homer.py
View file @
5547974c
This diff is collapsed.
Click to expand it.
tests.yaml
View file @
5547974c
...
...
@@ -6,10 +6,13 @@ config:
-
"
doh:
test
specific
to
DoH"
-
"
monitoring:
test
using
monitoring"
-
"
exception:
test
raising
an
exception"
-
"
streams:
test
multistreams
with
DoH"
-
"
check:
test
related
to
the
compliance
option
--check"
-
"
forceIPv4:
test
using
the
option
-4"
-
"
forceIPv6:
test
using
the
option
-6"
-
"
pipelining:
test
with
--pipelining
option"
-
"
fail:
mark
test
with
a
resolver
currently
failing
our
tests"
-
"
slow:
test
that
need
time
to
run"
tests
:
-
exe
:
'
./homer.py'
...
...
@@ -66,7 +69,6 @@ tests:
-
'
https://doh.bortzmeyer.fr/'
-
'
ressources-pedagogiques.org'
retcode
:
0
stderr
:
'
'
stdout
:
"
OK
\n
"
-
exe
:
'
./homer.py'
...
...
@@ -94,7 +96,7 @@ tests:
-
'
https://doh.42l.fr/dns-query'
-
'
ressources-pedagogiques.org'
retcode
:
1
stderr
:
"
Test
HEAD:
HTTP
error
405:
[No
details]
\n
"
part
stderr
:
"
Test
HEAD:
HTTP
error
405:
[No
details]
\n
"
stdout
:
"
KO
\n
"
-
exe
:
'
./homer.py'
...
...
@@ -111,13 +113,40 @@ tests:
stderr
:
'
'
stdout
:
"
OK
\n
"
-
exe
:
'
./homer.py'
name
:
"
[doh][check]
Successcul
check"
markers
:
-
'
doh'
-
'
check'
args
:
-
'
--check'
-
'
https://dns.google/dns-query'
-
'
framagit.org'
stderr
:
'
'
stdout
:
"
OK
\n
"
-
exe
:
'
./homer.py'
name
:
"
[doh][fail][check]
502
Bad
Gateway"
markers
:
-
'
doh'
-
'
check'
-
'
fail'
-
'
slow'
timeout
:
10
args
:
-
'
--check'
-
'
https://doh.42l.fr/dns-query'
-
'
framagit.org'
partstderr
:
'
Test
truncated
data:
HTTP
error
502'
stdout
:
"
KO
\n
"
-
exe
:
'
./homer.py'
name
:
'
[doh][check]
Test
that
all
the
resolved
IPs
are
tried,
try
a
first
IP'
markers
:
-
'
doh'
-
'
check'
args
:
-
'
-
v
'
-
'
-
-debug
'
-
'
--check'
-
'
https://doh.bortzmeyer.fr'
-
'
www.afnic.fr'
...
...
@@ -129,7 +158,7 @@ tests:
-
'
doh'
-
'
check'
args
:
-
'
-
v
'
-
'
-
-debug
'
-
'
--check'
-
'
https://doh.bortzmeyer.fr'
-
'
curl.haxx.se'
...
...
@@ -228,7 +257,7 @@ tests:
-
'
check'
-
'
forceIPv4'
args
:
-
'
-
v
'
-
'
-
-debug
'
-
'
-4'
-
'
--check'
-
'
https://dns.google/dns-query'
...
...
@@ -242,7 +271,7 @@ tests:
-
'
check'
-
'
forceIPv4'
args
:
-
'
-
v
'
-
'
-
-debug
'
-
'
-4'
-
'
--check'
-
'
https://dns.google/dns-query'
...
...
@@ -256,7 +285,7 @@ tests:
-
'
check'
-
'
forceIPv6'
args
:
-
'
-
v
'
-
'
-
-debug
'
-
'
-6'
-
'
--check'
-
'
https://dns.google/dns-query'
...
...
@@ -270,7 +299,7 @@ tests:
-
'
check'
-
'
forceIPv6'
args
:
-
'
-
v
'
-
'
-
-debug
'
-
'
-6'
-
'
--check'
-
'
https://dns.google/dns-query'
...
...
@@ -283,6 +312,7 @@ tests:
markers
:
-
'
dot'
-
'
check'
-
'
slow'
args
:
-
'
-k'
-
'
--check'
...
...
@@ -297,6 +327,7 @@ tests:
markers
:
-
'
dot'
-
'
check'
-
'
slow'
args
:
-
'
-k'
-
'
--check'
...
...
@@ -429,6 +460,7 @@ tests:
name
:
'
[dot]
Loop
on
all
ips
on
connection
error
(brok.sources.org)'
markers
:
-
'
dot'
-
'
slow'
timeout
:
6
args
:
-
'
--dot'
...
...
@@ -444,6 +476,7 @@ tests:
markers
:
-
'
dot'
-
'
forceIPv6'
-
'
slow'
timeout
:
6
args
:
-
'
-6'
...
...
@@ -539,6 +572,37 @@ tests:
stderr
:
'
'
partstdout
:
"
OK
\n
"
################################################################################
-
exe
:
'
./homer.py'
name
:
'
[dot][check]
Resolver
returning
a
malformed
DNS
message'
markers
:
-
'
dot'
-
'
check'
-
'
exception'
args
:
-
'
--dot'
-
'
--check'
-
'
dns.digitale-gesellschaft.ch'
-
'
framagit.org'
retcode
:
0
stderr
:
'
'
stdout
:
"
OK
\n
"
-
exe
:
'
./homer.py'
name
:
'
[dot][fail]
Resolver
with
an
invalid
certificate'
markers
:
-
'
dot'
-
'
fail'
args
:
-
'
--dot'
-
'
-v'
-
'
ns0.ldn-fai.net'
-
'
framagit.org'
retcode
:
1
partstdout
:
'
certificate
verify
failed'
################################################################################
# check_dot
...
...
@@ -949,3 +1013,119 @@ tests:
retcode
:
0
stderr
:
'
'
partstdout
:
'
HEAD'
-
exe
:
'
./homer.py'
name
:
'
[doh]
Multistreams
with
DoT
(error)'
markers
:
-
'
doh'
-
'
streams'
-
'
exception'
args
:
-
'
--multistreams'
-
'
--dot'
-
'
dot.bortzmeyer.fr'
-
'
framagit.org'
retcode
:
1
partstderr
:
'
Multi-streams
makes
no
sense
for
DoT'
stdout
:
'
'
-
exe
:
'
./homer.py'
name
:
'
[doh]
Multistreams
without
input
file
(error)'
markers
:
-
'
doh'
-
'
streams'
-
'
exception'
args
:
-
'
--multistreams'
-
'
dot.bortzmeyer.fr'
-
'
framagit.org'
retcode
:
1
partstderr
:
'
Multi-streams
requires
an
input
file'
stdout
:
'
'
-
exe
:
'
./homer.py'
name
:
'
[doh]
Multistreams
too
many
arguments
(error)'
markers
:
-
'
doh'
-
'
streams'
-
'
exception'
args
:
-
'
--multistreams'
-
'
--file'
-
'
input_file'
-
'
dot.bortzmeyer.fr'
-
'
framagit.org'
retcode
:
1
partstderr
:
'
Wrong
number
of
arguments'
stdout
:
'
'
-
exe
:
'
./homer.py'
name
:
'
[doh]
Multistreams
invalid
URL'
markers
:
-
'
doh'
-
'
streams'
-
'
exception'
args
:
-
'
--multistreams'
-
'
--file'
-
'
input_file'
-
'
dot.bortzmeyer.fr'
retcode
:
1
partstderr
:
'
DoH
requires
a
valid'
stdout
:
'
'
-
exe
:
'
./homer.py'
name
:
'
[doh]
Multistreams
with
1
request'
markers
:
-
'
doh'
-
'
streams'
args
:
-
'
--multistreams'
-
'
--file'
-
'
input_file'
-
'
https://doh.bortzmeyer.fr'
retcode
:
0
stderr
:
'
'
partstdout
:
'
NOERR'
# This test might fail
# this is due to the fact that it will check that libcurl
# uses HTTP/2 streams or sometimes the connection is
# available very quickly making unnecessary to use
# different streams
-
exe
:
'
./homer.py'
name
:
'
[doh]
Multistreams
with
3
requests
(can
fail)'
markers
:
-
'
doh'
-
'
streams'
-
'
xfail'
args
:
-
'
-v'
-
'
--multistreams'
-
'
--file'
-
'
input_file'
-
'
--repeat'
-
'
3'
-
'
https://doh.powerdns.org'
retcode
:
0
partstderr
:
'
Multiplexed
connection
found'
partstdout
:
'
Return
code
200'
# same as previous test
-
exe
:
'
./homer.py'
name
:
'
[doh]
Multistreams
with
5
requests'
markers
:
-
'
doh'
-
'
streams'
-
'
xfail'
args
:
-
'
-v'
-
'
--multistreams'
-
'
--file'
-
'
input_file'
-
'
--repeat'
-
'
5'
-
'
https://doh.bortzmeyer.fr'
retcode
:
0
partstderr
:
'
Multiplexed
connection
found'
partstdout
:
'
Return
code
200'
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment