c1b06a2d09
This diff has been extracted and adapted from 8848c8c516
The reason to prefer composition over embedding is that we want the
build to break if we add new methods to interfaces we define. If the build
does not break, we may forget about wrapping methods we should
actually be wrapping. I noticed this issue inside netxlite when I was working
on websteps-illustrated and I added support for NS and PTR queries.
See https://github.com/ooni/probe/issues/2096
While there, perform comprehensive netxlite code review
and apply minor changes and improve the docs.
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
|
|
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
|
|
DialerSystem = dialerSystem
|
|
TLSDialerLegacy = tlsDialer
|
|
AddressResolver = resolverShortCircuitIPAddr
|
|
)
|