fix(sessionresolver): proxy check conditional on existing proxy (#264)

There was a face-palming error in the implementation causing the proxy
check to be implemented also without a proxy.

This meant that we were ALWAYS skipping http3 and system resolvers.

The bug has been introduced in 3.8.0. So, the currently released
version of the probe, sadly, has this beheavior :-(.

Reference issue https://github.com/ooni/probe/issues/1426.
This commit is contained in:
Simone Basso 2021-03-25 15:18:29 +01:00 committed by GitHub
commit c94721d9e5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 60 additions and 13 deletions

View file

@ -294,7 +294,7 @@ func TestResolverWorksWithProxy(t *testing.T) {
<-done
// check results
if !errors.Is(err, ErrLookupHost) {
t.Fatal("not the error we expected")
t.Fatal("not the error we expected", err)
}
if addrs != nil {
t.Fatal("expected nil addrs")