2021-02-02 12:05:47 +01:00
|
|
|
package httptransport
|
|
|
|
|
|
|
|
import (
|
2022-01-07 18:33:37 +01:00
|
|
|
"github.com/ooni/probe-cli/v3/internal/model"
|
2021-06-30 15:19:10 +02:00
|
|
|
"github.com/ooni/probe-cli/v3/internal/netxlite"
|
2021-02-02 12:05:47 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
// NewHTTP3Transport creates a new HTTP3Transport instance.
|
2021-07-01 15:26:08 +02:00
|
|
|
//
|
|
|
|
// Deprecation warning
|
|
|
|
//
|
|
|
|
// New code should use netxlite.NewHTTP3Transport instead.
|
2022-01-07 18:33:37 +01:00
|
|
|
func NewHTTP3Transport(config Config) model.HTTPTransport {
|
2021-09-08 20:49:01 +02:00
|
|
|
// Rationale for using NoLogger here: previously this code did
|
|
|
|
// not use a logger as well, so it's fine to keep it as is.
|
|
|
|
return netxlite.NewHTTP3Transport(&NoLogger{},
|
2022-01-07 18:33:37 +01:00
|
|
|
config.QUICDialer, config.TLSConfig)
|
2021-02-02 12:05:47 +01:00
|
|
|
}
|
2021-09-08 20:49:01 +02:00
|
|
|
|
|
|
|
type NoLogger struct{}
|
|
|
|
|
|
|
|
func (*NoLogger) Debug(message string) {}
|
|
|
|
|
|
|
|
func (*NoLogger) Debugf(format string, v ...interface{}) {}
|