You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: client.go
+1-82
Original file line number
Diff line number
Diff line change
@@ -7,20 +7,15 @@ import (
7
7
"context"
8
8
"crypto/tls"
9
9
"encoding/binary"
10
-
"fmt"
11
10
"io"
12
-
"io/ioutil"
13
11
"net"
14
-
"net/http"
15
12
"strings"
16
13
"time"
17
14
)
18
15
19
16
const (
20
17
dnsTimeout time.Duration=2*time.Second
21
18
tcpIdleTimeout time.Duration=8*time.Second
22
-
23
-
dohMimeType="application/dns-message"
24
19
)
25
20
26
21
// A Conn represents a connection to a DNS server.
@@ -44,7 +39,6 @@ type Client struct {
44
39
DialTimeout time.Duration// net.DialTimeout, defaults to 2 seconds, or net.Dialer.Timeout if expiring earlier - overridden by Timeout when that value is non-zero
45
40
ReadTimeout time.Duration// net.Conn.SetReadTimeout value for connections, defaults to 2 seconds - overridden by Timeout when that value is non-zero
46
41
WriteTimeout time.Duration// net.Conn.SetWriteTimeout value for connections, defaults to 2 seconds - overridden by Timeout when that value is non-zero
47
-
HTTPClient*http.Client// The http.Client to use for DNS-over-HTTPS
48
42
TsigSecretmap[string]string// secret(s) for Tsig map[<zonename>]<base64 secret>, zonename must be in canonical form (lowercase, fqdn, see RFC 4034 Section 6.2)
49
43
SingleInflightbool// if true suppress multiple outstanding queries for the same Qname, Qtype and Qclass
0 commit comments