250a595f89
* refactor: cleaner way of passing a UDPConn around Also part of https://github.com/ooni/probe/issues/1505 * Update internal/engine/netx/quicdialer/connectionstate.go
21 lines
518 B
Go
21 lines
518 B
Go
package quicdialer
|
|
|
|
import (
|
|
"context"
|
|
"crypto/tls"
|
|
|
|
"github.com/lucas-clemente/quic-go"
|
|
)
|
|
|
|
// ContextDialer is a dialer for QUIC using Context.
|
|
type ContextDialer interface {
|
|
// Note: assumes that tlsCfg and cfg are not nil.
|
|
DialContext(ctx context.Context, network, host string,
|
|
tlsCfg *tls.Config, cfg *quic.Config) (quic.EarlySession, error)
|
|
}
|
|
|
|
// Resolver is the interface we expect from a resolver.
|
|
type Resolver interface {
|
|
LookupHost(ctx context.Context, hostname string) (addrs []string, err error)
|
|
}
|