refactor: continue to simplify engine/netx (#769)

The objective of this diff is to simplify the code inside engine/netx
while moving more bits of code inside netxlite.

See https://github.com/ooni/probe/issues/2121
This commit is contained in:
Simone Basso 2022-05-31 08:11:07 +02:00 committed by GitHub
commit e4f10eeac2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 312 additions and 344 deletions

View file

@ -11,7 +11,6 @@ import (
"github.com/ooni/probe-cli/v3/internal/bytecounter"
"github.com/ooni/probe-cli/v3/internal/engine/geolocate"
"github.com/ooni/probe-cli/v3/internal/engine/netx/httptransport"
"github.com/ooni/probe-cli/v3/internal/engine/probeservices"
"github.com/ooni/probe-cli/v3/internal/model"
"github.com/ooni/probe-cli/v3/internal/version"
@ -286,7 +285,7 @@ func (e *Experiment) OpenReportContext(ctx context.Context) error {
}
// use custom client to have proper byte accounting
httpClient := &http.Client{
Transport: &httptransport.ByteCountingTransport{
Transport: &bytecounter.HTTPTransport{
HTTPTransport: e.session.httpDefaultTransport, // proxy is OK
Counter: e.byteCounter,
},