Conversation
|
One doubt that this test makes me think of is that we are writing to the If somebody is to interpret this test as they would any other one, they would mistakenly attribute the results of the Perhaps it's worth adding some additional information to our spec to make it explicit and clear that top level |
| if resolverIP == nil { | ||
| return fmt.Errorf("%w: invalid IP address", errInvalidResolver) | ||
| } | ||
| resolverAddress := fmt.Sprintf("%s:%s", resolverIP, parsedResolver.Port()) |
There was a problem hiding this comment.
| resolverAddress := fmt.Sprintf("%s:%s", resolverIP, parsedResolver.Port()) | |
| resolverAddress := parsedResolver.Host |
There was a problem hiding this comment.
or, net.JoinHostPort(resolverIP, parsedResolver.Port()) but you already have this value, so it's better to just use it from the URL rather than reconstructing it.
| // is an IPv6 address | ||
| if resolverIP.To4() == nil { | ||
| resolverAddress = fmt.Sprintf("[%s]:%s", resolverIP, parsedResolver.Port()) | ||
| } |
There was a problem hiding this comment.
unnecessary if you rely on URL parsing as mentioned here: https://github.com/ooni/probe-cli/pull/847/files#r935489263
| // dnsRoundTrip performs a round trip and returns the results to the caller. | ||
| func (m *Measurer) dnsRoundTrip(ctx context.Context, zeroTime time.Time, | ||
| logger model.Logger, address string, domain string, tk *TestKeys) { | ||
| fmt.Printf("Measuing %s %s", domain, address) |
There was a problem hiding this comment.
| fmt.Printf("Measuing %s %s", domain, address) | |
| fmt.Printf("Measuring %s %s", domain, address) |
| defer cancel() | ||
| trace := measurexlite.NewTrace(0, zeroTime) | ||
| ol := measurexlite.NewOperationLogger(logger, "DNSScan %s %s", address, domain) | ||
|
|
Added an experiment for scanning open DNS resolvers to detect blocking.
Currently experimental and as such doesn't have a spec for it yet.
Here is a sample of the output of a test run: