refactor: only use shaping dialer for ndt7 and dash (#754)
See https://github.com/ooni/probe/issues/2112 for context. While there, run `go fix -fix buildtag ./...`
This commit is contained in:
@@ -259,8 +259,14 @@ func (m Measurer) Run(
|
||||
httpClient := &http.Client{
|
||||
Transport: netx.NewHTTPTransport(netx.Config{
|
||||
ContextByteCounting: true,
|
||||
DialSaver: saver,
|
||||
Logger: sess.Logger(),
|
||||
// Implements shaping if the user builds using `-tags shaping`
|
||||
// See https://github.com/ooni/probe/issues/2112
|
||||
Dialer: netxlite.NewMaybeShapingDialer(netx.NewDialer(netx.Config{
|
||||
ContextByteCounting: true,
|
||||
DialSaver: saver,
|
||||
Logger: sess.Logger(),
|
||||
})),
|
||||
Logger: sess.Logger(),
|
||||
}),
|
||||
}
|
||||
defer httpClient.CloseIdleConnections()
|
||||
|
||||
Reference in New Issue
Block a user