-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cli: new testhelper and the websteps experiment prototype #432
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! Your work looks good to me! I am going to merge this branch into the main branch and then I continue the development of the new experiment!
🥳🥳🥳🥳
case "user-agent": | ||
case "accept": | ||
case "accept-language": | ||
case "user-agent", "accept", "accept-language": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a bug fix for the oohelperd code (which is not used in production yet).
if req.Header.Get("content-type") != "application/json" { | ||
w.WriteHeader(400) | ||
return | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here we are being less strict in terms of what we require in input.
@@ -50,7 +47,8 @@ func (h Handler) ServeHTTP(w http.ResponseWriter, req *http.Request) { | |||
} | |||
// We assume that the following call cannot fail because it's a | |||
// clearly serializable data structure. | |||
data, _ = json.Marshal(cresp) | |||
data, err = json.Marshal(cresp) | |||
runtimex.PanicOnError(err, "json.Marshal failed") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here we are asserting that the JSON serialization cannot fail.
We started doing this in #432. This work is part of ooni/probe#1733.
We started doing this in #432. This work is part of ooni/probe#1733.
This is the extension of ooni#431, and my final deliverable for GSoC 2021. The diff introduces: 1) The new `testhelper` which supports testing multiple IP endpoints per domain and introduces HTTP/3 control measurements. The specification of the `testhelper` can be found at ooni/spec#219. The `testhelper` algorithm consists of three main steps: * `InitialChecks` verifies that the input URL can be parsed, has an expected scheme, and contains a valid domain name. * `Explore` enumerates all the URLs that it discovers by redirection from the original URL, or by detecting h3 support at the target host. * `Generate` performs a step-by-step measurement of each discovered URL. 2) A prototype of the corresponding new experiment `websteps` which uses the control measurement of the `testhelper` to know which URLs to measure, and what to expect. The prototype does not yet have: * unit and integration tests, * an analysis tool to compare the control and the probe measurement. This PR is my final deliverable as it is the outcome of the trials, considerations and efforts of my GSoC weeks at OONI. It fully integrates HTTP/3 (QUIC) support which has been only used in the `urlgetter` experiment until now. Related issues: ooni/probe#1729 and ooni/probe#1733.
We started doing this in ooni#432. This work is part of ooni/probe#1733.
This is the extension of #431, and my final deliverable for GSoC 2021.
The diff introduces:
The new
testhelper
which supports testing multiple IP endpoints per domain and introduces HTTP/3 control measurements. The specification of thetesthelper
can be found at th-007-websteps: websteps test helper spec spec#219. Thetesthelper
algorithm consists of three main steps:InitialChecks
verifies that the input URL can be parsed, has an expected scheme, and contains a valid domain name.Explore
enumerates all the URLs that it discovers by redirection from the original URL, or by detecting h3 support at the target host.Generate
performs a step-by-step measurement of each discovered URL.A prototype of the corresponding new experiment
websteps
which uses the control measurement of thetesthelper
to know which URLs to measure, and what to expect. The prototype does not yet have:unit and integration tests,
an analysis tool to compare the control and the probe measurement.
This PR is my final deliverable as it is the outcome of the trials, considerations and efforts of my GSoC weeks at OONI.
It fully integrates HTTP/3 (QUIC) support which has been only used in the
urlgetter
experiment until now.Related issues: ooni/probe#1729 and ooni/probe#1733.