69fd0c5119
This diff modifies the construction of a dialer to allow one to insert custom dialer wrappers into the dialers chain. The point of the chain in which we allow custom wrappers is the optimal one for connect, read, and write measurements. This new design is better than the previous netx design since we don't need to construct the whole chain manually now. The work in this diff is part of the effort to make engine/netx just a tiny wrapper around netxlite. See https://github.com/ooni/probe/issues/2121.
42 lines
1.4 KiB
Go
42 lines
1.4 KiB
Go
package netxlite
|
|
|
|
//
|
|
// Legacy code
|
|
//
|
|
|
|
// These vars export internal names to legacy ooni/probe-cli code.
|
|
//
|
|
// Deprecated: do not use these names in new code.
|
|
var (
|
|
DefaultDialer = &DialerSystem{}
|
|
DefaultTLSHandshaker = defaultTLSHandshaker
|
|
NewConnUTLS = newConnUTLS
|
|
DefaultResolver = &resolverSystem{}
|
|
)
|
|
|
|
// These types export internal names to legacy ooni/probe-cli code.
|
|
//
|
|
// Deprecated: do not use these names in new code.
|
|
type (
|
|
DialerResolver = dialerResolver
|
|
DialerLogger = dialerLogger
|
|
HTTPTransportWrapper = httpTransportConnectionsCloser
|
|
HTTPTransportLogger = httpTransportLogger
|
|
ErrorWrapperDialer = dialerErrWrapper
|
|
ErrorWrapperQUICListener = quicListenerErrWrapper
|
|
ErrorWrapperQUICDialer = quicDialerErrWrapper
|
|
ErrorWrapperResolver = resolverErrWrapper
|
|
ErrorWrapperTLSHandshaker = tlsHandshakerErrWrapper
|
|
QUICListenerStdlib = quicListenerStdlib
|
|
QUICDialerQUICGo = quicDialerQUICGo
|
|
QUICDialerResolver = quicDialerResolver
|
|
QUICDialerLogger = quicDialerLogger
|
|
ResolverSystem = resolverSystem
|
|
ResolverLogger = resolverLogger
|
|
ResolverIDNA = resolverIDNA
|
|
TLSHandshakerConfigurable = tlsHandshakerConfigurable
|
|
TLSHandshakerLogger = tlsHandshakerLogger
|
|
TLSDialerLegacy = tlsDialer
|
|
AddressResolver = resolverShortCircuitIPAddr
|
|
)
|