Commit 69a7e745 authored by Alexandre's avatar Alexandre
Browse files

Merge branch 'master' into doh-option-header

parents 5dcb7d06 a69be136
...@@ -60,10 +60,14 @@ Possible options, besides `--dot`: ...@@ -60,10 +60,14 @@ Possible options, besides `--dot`:
* --key KEYINBASE64: authentifies a DoT resolver with its public * --key KEYINBASE64: authentifies a DoT resolver with its public
key. Example: `homer.py --key "62lKu9HsDVbyiPenApnc4sfmSYTHOVfFgL3pyB+cBL4=" --dot 145.100.185.15 IN NS` key. Example: `homer.py --key "62lKu9HsDVbyiPenApnc4sfmSYTHOVfFgL3pyB+cBL4=" --dot 145.100.185.15 IN NS`
* --check: Run a set of tests (see below) * --check: Run a set of tests (see below)
* --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) * --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 * --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) (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 * --repeat N: repeat a test N times or read up to N lines of a file
* --no-display-results: do not output DNS response
### Check ### Check
...@@ -129,7 +133,7 @@ When repeating tests, you can add a delay between tests, with `--delay ...@@ -129,7 +133,7 @@ When repeating tests, you can add a delay between tests, with `--delay
N` or `-d N`, where N is the (possibly fractional) number of seconds N` or `-d N`, where N is the (possibly fractional) number of seconds
to wait. to wait.
### Mulitstreams ### Multistreams
When using Homer with DoH, the option `--multistreams` can be used When using Homer with DoH, the option `--multistreams` can be used
to specify that you want to take advantage of the HTTP/2 streams to specify that you want to take advantage of the HTTP/2 streams
...@@ -147,7 +151,6 @@ For example : ...@@ -147,7 +151,6 @@ For example :
In order to focus on the time per request, you can suppress the In order to focus on the time per request, you can suppress the
output by using the option `--no-display-results`. output by using the option `--no-display-results`.
This option only works with `--multistreams`.
Two modes are available. By default each response is read, Two modes are available. By default each response is read,
checked and displayed as soon as it is received. checked and displayed as soon as it is received.
...@@ -162,16 +165,18 @@ and [CURLINFO_PRETRANSFER_TIME](https://curl.haxx.se/libcurl/c/curl_easy_getinfo ...@@ -162,16 +165,18 @@ and [CURLINFO_PRETRANSFER_TIME](https://curl.haxx.se/libcurl/c/curl_easy_getinfo
``` ```
% ./homer.py --multistreams --file input_file --repeat 5 --no-display-results --time https://doh.powerdns.org % ./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 0 (200) 41.995 ms 51.409 ms 9.414 ms
1 0.142 ms 8.580 ms 8.438 ms 1 (200) 0.156 ms 8.648 ms 8.492 ms
3 0.095 ms 9.223 ms 9.128 ms 2 (200) 0.121 ms 8.494 ms 8.373 ms
2 0.103 ms 10.282 ms 10.179 ms 3 (200) 0.120 ms 11.185 ms 11.065 ms
4 0.104 ms 10.068 ms 9.964 ms 4 (200) 0.103 ms 11.922 ms 11.819 ms
Total elapsed time: 0.07 seconds (9.26 ms/request) Total elapsed time: 0.07 seconds (9.83 ms/request)
OK
``` ```
Finally note that when using multistreams an extra DNS request is sent
to initiate the connection. This request asks for the root NS.
### Monitoring with Nagios, Icinga, or similar software ### Monitoring with Nagios, Icinga, or similar software
......
This diff is collapsed.
...@@ -10,6 +10,7 @@ config: ...@@ -10,6 +10,7 @@ config:
- "check: test related to the compliance option --check" - "check: test related to the compliance option --check"
- "forceIPv4: test using the option -4" - "forceIPv4: test using the option -4"
- "forceIPv6: test using the option -6" - "forceIPv6: test using the option -6"
- "pipelining: test with --pipelining option"
- "header: test using --header option" - "header: test using --header option"
- "fail: mark test with a resolver currently failing our tests" - "fail: mark test with a resolver currently failing our tests"
- "slow: test that need time to run" - "slow: test that need time to run"
...@@ -19,14 +20,14 @@ tests: ...@@ -19,14 +20,14 @@ tests:
args: args:
- '-h' - '-h'
retcode: 0 retcode: 0
partstderr: 'url-or-servername domain-name [DNS type]' partstderr: 'url-or-servername [domain-name [DNS type]]'
stdout: '' stdout: ''
- exe: './homer.py' - exe: './homer.py'
args: args:
- '--zzz' - '--zzz'
retcode: 1 retcode: 1
partstderr: 'url-or-servername domain-name [DNS type]' partstderr: 'url-or-servername [domain-name [DNS type]]'
stdout: '' stdout: ''
- exe: './homer.py' - exe: './homer.py'
...@@ -132,7 +133,7 @@ tests: ...@@ -132,7 +133,7 @@ tests:
- 'check' - 'check'
- 'fail' - 'fail'
- 'slow' - 'slow'
timeout: 10 timeout: 12
args: args:
- '--check' - '--check'
- 'https://doh.42l.fr/dns-query' - 'https://doh.42l.fr/dns-query'
...@@ -555,6 +556,52 @@ tests: ...@@ -555,6 +556,52 @@ tests:
retcode: 1 retcode: 1
partstderr: 'Key error' partstderr: 'Key error'
################################################################################
- exe: './homer.py'
name: '[dot][pipelining] Pipelining only with dot'
markers:
- 'pipelining'
args:
- '--pipelining'
- 'dot.bortzmeyer.fr'
retcode: 1
partstderr: 'Pipelining is only accepted for DoT'
stdout: ''
- exe: './homer.py'
name: '[dot][pipelining] Pipelining only with input file'
markers:
- 'pipelining'
args:
- '--dot'
- '--pipelining'
- 'dot.bortzmeyer.fr'
retcode: 1
partstderr: 'Pipelining requires an input file'
stdout: ''
- exe: './homer.py'
name: '[dot][pipelining] 5 requests from input file'
markers:
- 'dot'
- 'pipelining'
args:
- '--dot'
- '--pipelining'
- '--file'
- 'input_file'
- '--repeat'
- '5'
- 'dot.bortzmeyer.fr'
retcode: 0
stderr: ''
partstdout: "OK\n"
################################################################################
- exe: './homer.py' - exe: './homer.py'
name: '[dot][check] Resolver returning a malformed DNS message' name: '[dot][check] Resolver returning a malformed DNS message'
markers: markers:
...@@ -971,7 +1018,19 @@ tests: ...@@ -971,7 +1018,19 @@ tests:
stdout: '' stdout: ''
- exe: './homer.py' - exe: './homer.py'
name: '[doh] POST' name: '[doh] POST --post'
markers:
- 'doh'
args:
- '--post'
- 'https://doh.bortzmeyer.fr'
- 'framagit.org'
retcode: 0
stderr: ''
partstdout: '2a01:4f8:'
- exe: './homer.py'
name: '[doh] POST --POST'
markers: markers:
- 'doh' - 'doh'
args: args:
...@@ -983,7 +1042,19 @@ tests: ...@@ -983,7 +1042,19 @@ tests:
partstdout: '2a01:4f8:' partstdout: '2a01:4f8:'
- exe: './homer.py' - exe: './homer.py'
name: '[doh] HEAD' name: '[doh] POST -P'
markers:
- 'doh'
args:
- '-P'
- 'https://doh.bortzmeyer.fr'
- 'framagit.org'
retcode: 0
stderr: ''
partstdout: '2a01:4f8:'
- exe: './homer.py'
name: '[doh] HEAD --head'
markers: markers:
- 'doh' - 'doh'
args: args:
...@@ -994,6 +1065,30 @@ tests: ...@@ -994,6 +1065,30 @@ tests:
stderr: '' stderr: ''
partstdout: 'HEAD' partstdout: 'HEAD'
- exe: './homer.py'
name: '[doh] HEAD --HEAD'
markers:
- 'doh'
args:
- '--HEAD'
- 'https://doh.bortzmeyer.fr'
- 'framagit.org'
retcode: 0
stderr: ''
partstdout: 'HEAD'
- exe: './homer.py'
name: '[doh] HEAD -e'
markers:
- 'doh'
args:
- '-e'
- 'https://doh.bortzmeyer.fr'
- 'framagit.org'
retcode: 0
stderr: ''
partstdout: 'HEAD'
- exe : './homer.py' - exe : './homer.py'
name: '[doh] Multistreams with DoT (error)' name: '[doh] Multistreams with DoT (error)'
markers: markers:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment