refactor(datafmt): use "udp" instead of "quic" (#946)

This diff changes the data format to prefer "udp" to "quic" everywhere we were previously using "quic".

Previously, the code inconsistently used "quic" for operations where we knew we were using "quic" and "udp" otherwise (e.g., for generic operations like ReadFrom).

While it would be more correct to say that a specific HTTP request used "quic" rather than "udp", using "udp" consistently allows one to see how distinct events such as ReadFrom and an handshake all refer to the same address, port, and protocol triple. Therefore, this change makes it easier to programmatically unpack a single measurement and create endpoint stats.

Before implementing this change, I discussed the problem with @hellais who mentioned that ooni/data is not currently using the "quic" string anywhere. I know that ooni/pipeline also doesn't rely on this string. The only users of this feature have been research-oriented experiments such as urlgetter, for which such a change would actually be acceptable.

See https://github.com/ooni/probe/issues/2238 and https://github.com/ooni/spec/pull/262.
This commit is contained in:
Simone Basso 2022-09-08 17:19:59 +02:00 committed by GitHub
parent 800217d15b
commit b78b9aca51
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
21 changed files with 66 additions and 66 deletions

View File

@ -55,7 +55,7 @@ var allTransportsInfo = map[bool]httpTransportInfo{
}, },
true: { true: {
Factory: newHTTP3Transport, Factory: newHTTP3Transport,
TransportName: "quic", TransportName: "udp",
}, },
} }

View File

@ -19,13 +19,13 @@ const (
// NetworkTCP identifies endpoints using TCP. // NetworkTCP identifies endpoints using TCP.
NetworkTCP = EndpointNetwork("tcp") NetworkTCP = EndpointNetwork("tcp")
// NetworkQUIC identifies endpoints using QUIC. // NetworkUDP identifies endpoints using UDP.
NetworkQUIC = EndpointNetwork("quic") NetworkUDP = EndpointNetwork("udp")
) )
// Endpoint is an endpoint for a domain. // Endpoint is an endpoint for a domain.
type Endpoint struct { type Endpoint struct {
// Network is the network (e.g., "tcp", "quic") // Network is the network (e.g., "tcp", "udp")
Network EndpointNetwork Network EndpointNetwork
// Address is the endpoint address (e.g., "8.8.8.8:443") // Address is the endpoint address (e.g., "8.8.8.8:443")
@ -42,7 +42,7 @@ type HTTPEndpoint struct {
// Domain is the endpoint domain (e.g., "dns.google"). // Domain is the endpoint domain (e.g., "dns.google").
Domain string Domain string
// Network is the network (e.g., "tcp" or "quic"). // Network is the network (e.g., "tcp" or "udp").
Network EndpointNetwork Network EndpointNetwork
// Address is the endpoint address (e.g., "8.8.8.8:443"). // Address is the endpoint address (e.g., "8.8.8.8:443").

View File

@ -156,7 +156,7 @@ func (m *DNSMeasurement) allQUICEndpoints(domain, port string) (out []*Endpoint)
continue continue
} }
for _, addr := range entry.Addrs() { for _, addr := range entry.Addrs() {
out = append(out, m.newEndpoint(addr, port, NetworkQUIC)) out = append(out, m.newEndpoint(addr, port, NetworkUDP))
} }
} }
return return
@ -186,7 +186,7 @@ func (m *DNSMeasurement) allHTTPEndpointsForURL(
epnts := m.allEndpointsForDomain(domain, port) epnts := m.allEndpointsForDomain(domain, port)
var out []*HTTPEndpoint var out []*HTTPEndpoint
for _, epnt := range epnts { for _, epnt := range epnts {
if URL.Scheme != "https" && epnt.Network == NetworkQUIC { if URL.Scheme != "https" && epnt.Network == NetworkUDP {
continue // we'll only use QUIC with HTTPS continue // we'll only use QUIC with HTTPS
} }
out = append(out, &HTTPEndpoint{ out = append(out, &HTTPEndpoint{

View File

@ -394,7 +394,7 @@ func (mx *Measurer) QUICHandshake(ctx context.Context, address string,
qconn.CloseWithError(0, "") qconn.CloseWithError(0, "")
} }
return &EndpointMeasurement{ return &EndpointMeasurement{
Network: NetworkQUIC, Network: NetworkUDP,
Address: address, Address: address,
Measurement: measurement, Measurement: measurement,
} }
@ -502,7 +502,7 @@ func (mx *Measurer) httpEndpointGetMeasurement(ctx context.Context, epnt *HTTPEn
func (mx *Measurer) HTTPEndpointGetWithDB(ctx context.Context, epnt *HTTPEndpoint, func (mx *Measurer) HTTPEndpointGetWithDB(ctx context.Context, epnt *HTTPEndpoint,
db WritableDB, jar http.CookieJar) (err error) { db WritableDB, jar http.CookieJar) (err error) {
switch epnt.Network { switch epnt.Network {
case NetworkQUIC: case NetworkUDP:
_, err = mx.httpEndpointGetQUIC(ctx, db, epnt, jar) _, err = mx.httpEndpointGetQUIC(ctx, db, epnt, jar)
case NetworkTCP: case NetworkTCP:
_, err = mx.httpEndpointGetTCP(ctx, db, epnt, jar) _, err = mx.httpEndpointGetTCP(ctx, db, epnt, jar)
@ -517,7 +517,7 @@ func (mx *Measurer) HTTPEndpointGetWithDB(ctx context.Context, epnt *HTTPEndpoin
func (mx *Measurer) httpEndpointGetWithDB(ctx context.Context, epnt *HTTPEndpoint, func (mx *Measurer) httpEndpointGetWithDB(ctx context.Context, epnt *HTTPEndpoint,
db WritableDB, jar http.CookieJar) (resp *http.Response, err error) { db WritableDB, jar http.CookieJar) (resp *http.Response, err error) {
switch epnt.Network { switch epnt.Network {
case NetworkQUIC: case NetworkUDP:
resp, err = mx.httpEndpointGetQUIC(ctx, db, epnt, jar) resp, err = mx.httpEndpointGetQUIC(ctx, db, epnt, jar)
case NetworkTCP: case NetworkTCP:
resp, err = mx.httpEndpointGetTCP(ctx, db, epnt, jar) resp, err = mx.httpEndpointGetTCP(ctx, db, epnt, jar)
@ -971,7 +971,7 @@ func (mx *Measurer) doQUICFollowUp(ctx context.Context, parallelism int,
for _, epnt := range epnts { for _, epnt := range epnts {
quicEpnts = append(quicEpnts, &HTTPEndpoint{ quicEpnts = append(quicEpnts, &HTTPEndpoint{
Domain: epnt.Domain, Domain: epnt.Domain,
Network: NetworkQUIC, Network: NetworkUDP,
Address: epnt.Address, Address: epnt.Address,
SNI: epnt.SNI, SNI: epnt.SNI,
ALPN: []string{"h3"}, ALPN: []string{"h3"},

View File

@ -47,7 +47,7 @@ func (c *udpLikeConnDB) WriteTo(p []byte, addr net.Addr) (int, error) {
finished := time.Since(c.begin).Seconds() finished := time.Since(c.begin).Seconds()
c.db.InsertIntoReadWrite(&NetworkEvent{ c.db.InsertIntoReadWrite(&NetworkEvent{
Operation: "write_to", Operation: "write_to",
Network: "quic", Network: "udp",
RemoteAddr: addr.String(), RemoteAddr: addr.String(),
Started: started, Started: started,
Finished: finished, Finished: finished,
@ -63,7 +63,7 @@ func (c *udpLikeConnDB) ReadFrom(b []byte) (int, net.Addr, error) {
finished := time.Since(c.begin).Seconds() finished := time.Since(c.begin).Seconds()
c.db.InsertIntoReadWrite(&NetworkEvent{ c.db.InsertIntoReadWrite(&NetworkEvent{
Operation: "read_from", Operation: "read_from",
Network: "quic", Network: "udp",
RemoteAddr: addrStringIfNotNil(addr), RemoteAddr: addrStringIfNotNil(addr),
Started: started, Started: started,
Finished: finished, Finished: finished,
@ -79,7 +79,7 @@ func (c *udpLikeConnDB) Close() error {
finished := time.Since(c.begin).Seconds() finished := time.Since(c.begin).Seconds()
c.db.InsertIntoClose(&NetworkEvent{ c.db.InsertIntoClose(&NetworkEvent{
Operation: "close", Operation: "close",
Network: "quic", Network: "udp",
RemoteAddr: "", RemoteAddr: "",
Started: started, Started: started,
Finished: finished, Finished: finished,
@ -123,7 +123,7 @@ func (qh *quicDialerDB) DialContext(ctx context.Context, address string,
} }
finished := time.Since(qh.begin).Seconds() finished := time.Since(qh.begin).Seconds()
qh.db.InsertIntoQUICHandshake(&QUICTLSHandshakeEvent{ qh.db.InsertIntoQUICHandshake(&QUICTLSHandshakeEvent{
Network: "quic", Network: "udp",
RemoteAddr: address, RemoteAddr: address,
SNI: tlsConfig.ServerName, SNI: tlsConfig.ServerName,
ALPN: tlsConfig.NextProtos, ALPN: tlsConfig.NextProtos,

View File

@ -16,7 +16,7 @@ import (
// given the network. On failure, we return a nil list. // given the network. On failure, we return a nil list.
func ALPNForHTTPEndpoint(network EndpointNetwork) []string { func ALPNForHTTPEndpoint(network EndpointNetwork) []string {
switch network { switch network {
case NetworkQUIC: case NetworkUDP:
return []string{"h3"} return []string{"h3"}
case NetworkTCP: case NetworkTCP:
return []string{"h2", "http/1.1"} return []string{"h2", "http/1.1"}

View File

@ -27,7 +27,7 @@ import (
// //
// - alpn is the negotiated ALPN or an empty string when not applicable; // - alpn is the negotiated ALPN or an empty string when not applicable;
// //
// - transport is the HTTP transport's protocol we're using ("quic" or "tcp"): this field // - transport is the HTTP transport's protocol we're using ("udp" or "tcp"): this field
// was introduced a long time ago to support QUIC measurements and we keep it for backwards // was introduced a long time ago to support QUIC measurements and we keep it for backwards
// compatibility but network, address, and alpn are much more informative; // compatibility but network, address, and alpn are much more informative;
// //

View File

@ -155,7 +155,7 @@ func TestNewArchivalHTTPRequestResult(t *testing.T) {
network: "udp", network: "udp",
address: "8.8.8.8:443", address: "8.8.8.8:443",
alpn: "h3", alpn: "h3",
transport: "quic", transport: "udp",
req: &http.Request{ req: &http.Request{
Method: "GET", Method: "GET",
URL: &url.URL{ URL: &url.URL{
@ -205,7 +205,7 @@ func TestNewArchivalHTTPRequestResult(t *testing.T) {
}, },
Method: "GET", Method: "GET",
Tor: model.ArchivalHTTPTor{}, Tor: model.ArchivalHTTPTor{},
Transport: "quic", Transport: "udp",
URL: "https://dns.google/", URL: "https://dns.google/",
}, },
Response: model.ArchivalHTTPResponse{ Response: model.ArchivalHTTPResponse{
@ -243,7 +243,7 @@ func TestNewArchivalHTTPRequestResult(t *testing.T) {
network: "udp", network: "udp",
address: "8.8.8.8:443", address: "8.8.8.8:443",
alpn: "h3", alpn: "h3",
transport: "quic", transport: "udp",
req: &http.Request{ req: &http.Request{
Method: "GET", Method: "GET",
URL: &url.URL{ URL: &url.URL{
@ -301,7 +301,7 @@ func TestNewArchivalHTTPRequestResult(t *testing.T) {
}, },
Method: "GET", Method: "GET",
Tor: model.ArchivalHTTPTor{}, Tor: model.ArchivalHTTPTor{},
Transport: "quic", Transport: "udp",
URL: "https://dns.google/", URL: "https://dns.google/",
}, },
Response: model.ArchivalHTTPResponse{ Response: model.ArchivalHTTPResponse{

View File

@ -64,7 +64,7 @@ func (tx *Trace) OnQUICHandshakeDone(started time.Time, remoteAddr string, qconn
case tx.quicHandshake <- NewArchivalTLSOrQUICHandshakeResult( case tx.quicHandshake <- NewArchivalTLSOrQUICHandshakeResult(
tx.Index, tx.Index,
started.Sub(tx.ZeroTime), started.Sub(tx.ZeroTime),
"quic", "udp",
remoteAddr, remoteAddr,
config, config,
state, state,

View File

@ -137,7 +137,7 @@ func TestNewQUICDialerWithoutResolver(t *testing.T) {
} }
expectedFailure := "unknown_failure: mocked" expectedFailure := "unknown_failure: mocked"
expect := &model.ArchivalTLSOrQUICHandshakeResult{ expect := &model.ArchivalTLSOrQUICHandshakeResult{
Network: "quic", Network: "udp",
Address: "1.1.1.1:443", Address: "1.1.1.1:443",
CipherSuite: "", CipherSuite: "",
Failure: &expectedFailure, Failure: &expectedFailure,
@ -275,7 +275,7 @@ func TestFirstQUICHandshake(t *testing.T) {
zeroTime := time.Now() zeroTime := time.Now()
trace := NewTrace(0, zeroTime) trace := NewTrace(0, zeroTime)
expect := []*model.ArchivalTLSOrQUICHandshakeResult{{ expect := []*model.ArchivalTLSOrQUICHandshakeResult{{
Network: "quic", Network: "udp",
Address: "1.1.1.1:443", Address: "1.1.1.1:443",
CipherSuite: "", CipherSuite: "",
Failure: nil, Failure: nil,
@ -287,7 +287,7 @@ func TestFirstQUICHandshake(t *testing.T) {
Tags: []string{}, Tags: []string{},
TLSVersion: "", TLSVersion: "",
}, { }, {
Network: "quic", Network: "udp",
Address: "8.8.8.8:443", Address: "8.8.8.8:443",
CipherSuite: "", CipherSuite: "",
Failure: nil, Failure: nil,

View File

@ -10,7 +10,7 @@ import (
func TestHTTPTransport(t *testing.T) { func TestHTTPTransport(t *testing.T) {
t.Run("Network", func(t *testing.T) { t.Run("Network", func(t *testing.T) {
expected := "quic" expected := "udp"
txp := &HTTPTransport{ txp := &HTTPTransport{
MockNetwork: func() string { MockNetwork: func() string {
return expected return expected

View File

@ -158,7 +158,7 @@ type HTTPClient interface {
// HTTPTransport is an http.Transport-like structure. // HTTPTransport is an http.Transport-like structure.
type HTTPTransport interface { type HTTPTransport interface {
// Network returns the network used by the transport, which // Network returns the network used by the transport, which
// should be one of "tcp" and "quic". // should be one of "tcp" and "udp".
Network() string Network() string
// RoundTrip performs the HTTP round trip. // RoundTrip performs the HTTP round trip.

View File

@ -29,7 +29,7 @@ var _ model.HTTPTransport = &http3Transport{}
// Network implements HTTPTransport.Network. // Network implements HTTPTransport.Network.
func (txp *http3Transport) Network() string { func (txp *http3Transport) Network() string {
return "quic" return "udp"
} }
// RoundTrip implements HTTPTransport.RoundTrip. // RoundTrip implements HTTPTransport.RoundTrip.

View File

@ -39,7 +39,7 @@ func TestHTTP3Transport(t *testing.T) {
t.Run("Network", func(t *testing.T) { t.Run("Network", func(t *testing.T) {
txp := &http3Transport{} txp := &http3Transport{}
if txp.Network() != "quic" { if txp.Network() != "udp" {
t.Fatal("unexpected .Network return value") t.Fatal("unexpected .Network return value")
} }
}) })

View File

@ -564,7 +564,7 @@ func TestNewTLSHandshakesList(t *testing.T) {
Address: "131.252.210.176:443", Address: "131.252.210.176:443",
Err: netxlite.FailureEOFError, Err: netxlite.FailureEOFError,
NoTLSVerify: false, NoTLSVerify: false,
Proto: "quic", Proto: "udp",
TLSCipherSuite: "SUITE", TLSCipherSuite: "SUITE",
TLSNegotiatedProto: "h3", TLSNegotiatedProto: "h3",
TLSPeerCerts: [][]byte{ TLSPeerCerts: [][]byte{

View File

@ -89,12 +89,12 @@ Produces this JSON:
```JavaScript ```JavaScript
{ {
// In chapter02 these two fields were similar but // In chapter02 these two fields were similar but
// the network was "tcp" as opposed to "quic" // the network was "tcp" as opposed to "udp"
"network": "quic", "network": "udp",
"address": "8.8.4.4:443", "address": "8.8.4.4:443",
// This block contains I/O operations. Note that // This block contains I/O operations. Note that
// the protocol is "quic" and that the syscalls // the protocol is "udp" and that the syscalls
// are "read_from" and "write_to" because QUIC does // are "read_from" and "write_to" because QUIC does
// not bind/connect sockets. (The real syscalls // not bind/connect sockets. (The real syscalls
// are actually `recvfrom` and `sendto` but here // are actually `recvfrom` and `sendto` but here
@ -106,7 +106,7 @@ Produces this JSON:
"failure": null, "failure": null,
"num_bytes": 1252, "num_bytes": 1252,
"operation": "write_to", "operation": "write_to",
"proto": "quic", "proto": "udp",
"t": 0.027184208, "t": 0.027184208,
"started": 0.027127208, "started": 0.027127208,
"oddity": "" "oddity": ""
@ -116,7 +116,7 @@ Produces this JSON:
"failure": null, "failure": null,
"num_bytes": 1252, "num_bytes": 1252,
"operation": "read_from", "operation": "read_from",
"proto": "quic", "proto": "udp",
"t": 0.053116458, "t": 0.053116458,
"started": 0.025626583, "started": 0.025626583,
"oddity": "" "oddity": ""
@ -126,7 +126,7 @@ Produces this JSON:
"failure": null, "failure": null,
"num_bytes": 1252, "num_bytes": 1252,
"operation": "write_to", "operation": "write_to",
"proto": "quic", "proto": "udp",
"t": 0.054538792, "t": 0.054538792,
"started": 0.054517542, "started": 0.054517542,
"oddity": "" "oddity": ""
@ -136,7 +136,7 @@ Produces this JSON:
"failure": null, "failure": null,
"num_bytes": 1252, "num_bytes": 1252,
"operation": "read_from", "operation": "read_from",
"proto": "quic", "proto": "udp",
"t": 0.069144958, "t": 0.069144958,
"started": 0.053194208, "started": 0.053194208,
"oddity": "" "oddity": ""
@ -146,7 +146,7 @@ Produces this JSON:
"failure": null, "failure": null,
"num_bytes": 1252, "num_bytes": 1252,
"operation": "read_from", "operation": "read_from",
"proto": "quic", "proto": "udp",
"t": 0.069183458, "t": 0.069183458,
"started": 0.069173292, "started": 0.069173292,
"oddity": "" "oddity": ""
@ -156,7 +156,7 @@ Produces this JSON:
"failure": null, "failure": null,
"num_bytes": 1252, "num_bytes": 1252,
"operation": "read_from", "operation": "read_from",
"proto": "quic", "proto": "udp",
"t": 0.06920225, "t": 0.06920225,
"started": 0.069197875, "started": 0.069197875,
"oddity": "" "oddity": ""
@ -166,7 +166,7 @@ Produces this JSON:
"failure": null, "failure": null,
"num_bytes": 1216, "num_bytes": 1216,
"operation": "read_from", "operation": "read_from",
"proto": "quic", "proto": "udp",
"t": 0.069210958, "t": 0.069210958,
"started": 0.069206875, "started": 0.069206875,
"oddity": "" "oddity": ""
@ -176,7 +176,7 @@ Produces this JSON:
"failure": null, "failure": null,
"num_bytes": 65, "num_bytes": 65,
"operation": "read_from", "operation": "read_from",
"proto": "quic", "proto": "udp",
"t": 0.069220667, "t": 0.069220667,
"started": 0.069217375, "started": 0.069217375,
"oddity": "" "oddity": ""
@ -186,7 +186,7 @@ Produces this JSON:
"failure": null, "failure": null,
"num_bytes": 44, "num_bytes": 44,
"operation": "write_to", "operation": "write_to",
"proto": "quic", "proto": "udp",
"t": 0.069433417, "t": 0.069433417,
"started": 0.069417625, "started": 0.069417625,
"oddity": "" "oddity": ""
@ -196,7 +196,7 @@ Produces this JSON:
"failure": null, "failure": null,
"num_bytes": 44, "num_bytes": 44,
"operation": "write_to", "operation": "write_to",
"proto": "quic", "proto": "udp",
"t": 0.069677625, "t": 0.069677625,
"started": 0.069647458, "started": 0.069647458,
"oddity": "" "oddity": ""
@ -206,7 +206,7 @@ Produces this JSON:
"failure": null, "failure": null,
"num_bytes": 83, "num_bytes": 83,
"operation": "write_to", "operation": "write_to",
"proto": "quic", "proto": "udp",
"t": 0.073461917, "t": 0.073461917,
"started": 0.073432875, "started": 0.073432875,
"oddity": "" "oddity": ""
@ -216,7 +216,7 @@ Produces this JSON:
"failure": null, "failure": null,
"num_bytes": 33, "num_bytes": 33,
"operation": "write_to", "operation": "write_to",
"proto": "quic", "proto": "udp",
"t": 0.073559417, "t": 0.073559417,
"started": 0.073542542, "started": 0.073542542,
"oddity": "" "oddity": ""
@ -253,7 +253,7 @@ Produces this JSON:
], ],
"no_tls_verify": false, "no_tls_verify": false,
"oddity": "", "oddity": "",
"proto": "quic", "proto": "udp",
"started": 0.025061583 "started": 0.025061583
} }
] ]

View File

@ -90,12 +90,12 @@ func main() {
// ```JavaScript // ```JavaScript
// { // {
// // In chapter02 these two fields were similar but // // In chapter02 these two fields were similar but
// // the network was "tcp" as opposed to "quic" // // the network was "tcp" as opposed to "udp"
// "network": "quic", // "network": "udp",
// "address": "8.8.4.4:443", // "address": "8.8.4.4:443",
// //
// // This block contains I/O operations. Note that // // This block contains I/O operations. Note that
// // the protocol is "quic" and that the syscalls // // the protocol is "udp" and that the syscalls
// // are "read_from" and "write_to" because QUIC does // // are "read_from" and "write_to" because QUIC does
// // not bind/connect sockets. (The real syscalls // // not bind/connect sockets. (The real syscalls
// // are actually `recvfrom` and `sendto` but here // // are actually `recvfrom` and `sendto` but here
@ -107,7 +107,7 @@ func main() {
// "failure": null, // "failure": null,
// "num_bytes": 1252, // "num_bytes": 1252,
// "operation": "write_to", // "operation": "write_to",
// "proto": "quic", // "proto": "udp",
// "t": 0.027184208, // "t": 0.027184208,
// "started": 0.027127208, // "started": 0.027127208,
// "oddity": "" // "oddity": ""
@ -117,7 +117,7 @@ func main() {
// "failure": null, // "failure": null,
// "num_bytes": 1252, // "num_bytes": 1252,
// "operation": "read_from", // "operation": "read_from",
// "proto": "quic", // "proto": "udp",
// "t": 0.053116458, // "t": 0.053116458,
// "started": 0.025626583, // "started": 0.025626583,
// "oddity": "" // "oddity": ""
@ -127,7 +127,7 @@ func main() {
// "failure": null, // "failure": null,
// "num_bytes": 1252, // "num_bytes": 1252,
// "operation": "write_to", // "operation": "write_to",
// "proto": "quic", // "proto": "udp",
// "t": 0.054538792, // "t": 0.054538792,
// "started": 0.054517542, // "started": 0.054517542,
// "oddity": "" // "oddity": ""
@ -137,7 +137,7 @@ func main() {
// "failure": null, // "failure": null,
// "num_bytes": 1252, // "num_bytes": 1252,
// "operation": "read_from", // "operation": "read_from",
// "proto": "quic", // "proto": "udp",
// "t": 0.069144958, // "t": 0.069144958,
// "started": 0.053194208, // "started": 0.053194208,
// "oddity": "" // "oddity": ""
@ -147,7 +147,7 @@ func main() {
// "failure": null, // "failure": null,
// "num_bytes": 1252, // "num_bytes": 1252,
// "operation": "read_from", // "operation": "read_from",
// "proto": "quic", // "proto": "udp",
// "t": 0.069183458, // "t": 0.069183458,
// "started": 0.069173292, // "started": 0.069173292,
// "oddity": "" // "oddity": ""
@ -157,7 +157,7 @@ func main() {
// "failure": null, // "failure": null,
// "num_bytes": 1252, // "num_bytes": 1252,
// "operation": "read_from", // "operation": "read_from",
// "proto": "quic", // "proto": "udp",
// "t": 0.06920225, // "t": 0.06920225,
// "started": 0.069197875, // "started": 0.069197875,
// "oddity": "" // "oddity": ""
@ -167,7 +167,7 @@ func main() {
// "failure": null, // "failure": null,
// "num_bytes": 1216, // "num_bytes": 1216,
// "operation": "read_from", // "operation": "read_from",
// "proto": "quic", // "proto": "udp",
// "t": 0.069210958, // "t": 0.069210958,
// "started": 0.069206875, // "started": 0.069206875,
// "oddity": "" // "oddity": ""
@ -177,7 +177,7 @@ func main() {
// "failure": null, // "failure": null,
// "num_bytes": 65, // "num_bytes": 65,
// "operation": "read_from", // "operation": "read_from",
// "proto": "quic", // "proto": "udp",
// "t": 0.069220667, // "t": 0.069220667,
// "started": 0.069217375, // "started": 0.069217375,
// "oddity": "" // "oddity": ""
@ -187,7 +187,7 @@ func main() {
// "failure": null, // "failure": null,
// "num_bytes": 44, // "num_bytes": 44,
// "operation": "write_to", // "operation": "write_to",
// "proto": "quic", // "proto": "udp",
// "t": 0.069433417, // "t": 0.069433417,
// "started": 0.069417625, // "started": 0.069417625,
// "oddity": "" // "oddity": ""
@ -197,7 +197,7 @@ func main() {
// "failure": null, // "failure": null,
// "num_bytes": 44, // "num_bytes": 44,
// "operation": "write_to", // "operation": "write_to",
// "proto": "quic", // "proto": "udp",
// "t": 0.069677625, // "t": 0.069677625,
// "started": 0.069647458, // "started": 0.069647458,
// "oddity": "" // "oddity": ""
@ -207,7 +207,7 @@ func main() {
// "failure": null, // "failure": null,
// "num_bytes": 83, // "num_bytes": 83,
// "operation": "write_to", // "operation": "write_to",
// "proto": "quic", // "proto": "udp",
// "t": 0.073461917, // "t": 0.073461917,
// "started": 0.073432875, // "started": 0.073432875,
// "oddity": "" // "oddity": ""
@ -217,7 +217,7 @@ func main() {
// "failure": null, // "failure": null,
// "num_bytes": 33, // "num_bytes": 33,
// "operation": "write_to", // "operation": "write_to",
// "proto": "quic", // "proto": "udp",
// "t": 0.073559417, // "t": 0.073559417,
// "started": 0.073542542, // "started": 0.073542542,
// "oddity": "" // "oddity": ""
@ -254,7 +254,7 @@ func main() {
// ], // ],
// "no_tls_verify": false, // "no_tls_verify": false,
// "oddity": "", // "oddity": "",
// "proto": "quic", // "proto": "udp",
// "started": 0.025061583 // "started": 0.025061583
// } // }
// ] // ]

View File

@ -97,7 +97,7 @@ to need more information to characterize the endpoint.
In fact, in the above definition we recognize fields In fact, in the above definition we recognize fields
we have already discussed, such as: we have already discussed, such as:
- `Network`, describing whether to use "tcp" or "quic"; - `Network`, describing whether to use "tcp" or "udp";
- `Address`, which is the endpoint address. - `Address`, which is the endpoint address.

View File

@ -98,7 +98,7 @@ func main() {
// In fact, in the above definition we recognize fields // In fact, in the above definition we recognize fields
// we have already discussed, such as: // we have already discussed, such as:
// //
// - `Network`, describing whether to use "tcp" or "quic"; // - `Network`, describing whether to use "tcp" or "udp";
// //
// - `Address`, which is the endpoint address. // - `Address`, which is the endpoint address.
// //

View File

@ -86,7 +86,7 @@ A/AAAA lookups results but also the HTTPS lookup results.
The `AllHTTPEndpointsForURL` function will recognize that The `AllHTTPEndpointsForURL` function will recognize that
we also have HTTPS lookups and, if the "h3" ALPN is we also have HTTPS lookups and, if the "h3" ALPN is
present, will _also_ build HTTP/3 endpoints using "quic" present, will _also_ build HTTP/3 endpoints using "udp"
as the `HTTPEndpoint.Network`. as the `HTTPEndpoint.Network`.
```Go ```Go

View File

@ -87,7 +87,7 @@ func main() {
// //
// The `AllHTTPEndpointsForURL` function will recognize that // The `AllHTTPEndpointsForURL` function will recognize that
// we also have HTTPS lookups and, if the "h3" ALPN is // we also have HTTPS lookups and, if the "h3" ALPN is
// present, will _also_ build HTTP/3 endpoints using "quic" // present, will _also_ build HTTP/3 endpoints using "udp"
// as the `HTTPEndpoint.Network`. // as the `HTTPEndpoint.Network`.
// //
// ```Go // ```Go