From d13cf5c441aea7993776e6de824c07c1b6816d6c Mon Sep 17 00:00:00 2001 From: Tanya Verma Date: Mon, 8 Feb 2021 19:27:19 -0800 Subject: [PATCH 01/61] Add more target tests, add invalid keyID error code --- target.go | 15 +++++++++ target_test.go | 88 ++++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 101 insertions(+), 2 deletions(-) diff --git a/target.go b/target.go index 05c8414..25afa88 100644 --- a/target.go +++ b/target.go @@ -23,6 +23,7 @@ package main import ( + "bytes" "encoding/base64" "fmt" "io/ioutil" @@ -99,6 +100,10 @@ func (s *targetServer) resolveQueryWithResolver(q *dns.Msg, r resolver) ([]byte, start := time.Now() response, err := r.resolve(q) + if err != nil { + log.Println("Resolution failed: ", err) + return nil, err + } elapsed := time.Since(start) packedResponse, err := response.Pack() @@ -176,6 +181,9 @@ func (s *targetServer) parseObliviousQueryFromRequest(r *http.Request) (odoh.Obl func (s *targetServer) createObliviousResponseForQuery(context odoh.ResponseContext, dnsResponse []byte) (odoh.ObliviousDNSMessage, error) { response := odoh.CreateObliviousDNSResponse(dnsResponse, 0) odohResponse, err := context.EncryptResponse(response) + if err != nil { + return odoh.ObliviousDNSMessage{}, err + } if s.verbose { log.Printf("Encrypted response: %x", odohResponse) @@ -200,6 +208,13 @@ func (s *targetServer) odohQueryHandler(w http.ResponseWriter, r *http.Request) return } + keyID := s.odohKeyPair.Config.Contents.KeyID() + receivedKeyID := odohMessage.KeyID + if !bytes.Equal(keyID, receivedKeyID) { + log.Println("received keyID is different from expected key ID") + http.Error(w, http.StatusText(http.StatusUnauthorized), http.StatusUnauthorized) + } + obliviousQuery, responseContext, err := s.odohKeyPair.DecryptQuery(odohMessage) if err != nil { log.Println("DecryptQuery failed:", err) diff --git a/target_test.go b/target_test.go index d9bdca5..94a2d6f 100644 --- a/target_test.go +++ b/target_test.go @@ -33,6 +33,7 @@ import ( "net/http" "net/http/httptest" "testing" + "time" odoh "github.com/cloudflare/odoh-go" "github.com/miekg/dns" @@ -359,8 +360,8 @@ func TestQueryHandlerODoHWithInvalidKey(t *testing.T) { rr := httptest.NewRecorder() handler.ServeHTTP(rr, request) - if status := rr.Result().StatusCode; status != http.StatusBadRequest { - t.Fatal(fmt.Errorf("Result did not yield %d, got %d instead", http.StatusBadRequest, status)) + if status := rr.Result().StatusCode; status != http.StatusUnauthorized { + t.Fatal(fmt.Errorf("Result did not yield %d, got %d instead", http.StatusUnauthorized, status)) } } @@ -392,3 +393,86 @@ func TestQueryHandlerODoHWithCorruptCiphertext(t *testing.T) { t.Fatal(fmt.Errorf("Result did not yield %d, got %d instead", http.StatusBadRequest, status)) } } + +func TestQueryHandlerODoHWithMalformedQuery(t *testing.T) { + r := createLocalResolver(t) + target := createTarget(t, r) + + handler := http.HandlerFunc(target.targetQueryHandler) + + // malformed odoh query + queryBytes := []byte{1, 2, 3} + request, err := http.NewRequest(http.MethodPost, queryEndpoint, bytes.NewReader(queryBytes)) + if err != nil { + t.Fatal(err) + } + request.Header.Add("Content-Type", odohMessageContentType) + + rr := httptest.NewRecorder() + handler.ServeHTTP(rr, request) + + if status := rr.Result().StatusCode; status != http.StatusBadRequest { + t.Fatal(fmt.Errorf("Result did not yield %d, got %d instead", http.StatusBadRequest, status)) + } +} + +func TestODoHResolutionWithRealResolver(t *testing.T) { + r := &targetResolver{ + timeout: 2500 * time.Millisecond, + nameserver: "1.1.1.1:53", + } + target := createTarget(t, r) + + handler := http.HandlerFunc(target.targetQueryHandler) + + // malformed DNS query + obliviousQuery := odoh.CreateObliviousDNSQuery([]byte{1, 2, 3}, 0) + encryptedQuery, _, err := target.odohKeyPair.Config.Contents.EncryptQuery(obliviousQuery) + if err != nil { + t.Fatal(err) + } + + request, err := http.NewRequest(http.MethodPost, queryEndpoint, bytes.NewReader(encryptedQuery.Marshal())) + if err != nil { + t.Fatal(err) + } + request.Header.Add("Content-Type", odohMessageContentType) + + rr := httptest.NewRecorder() + handler.ServeHTTP(rr, request) + + if status := rr.Result().StatusCode; status != http.StatusBadRequest { + t.Fatal(fmt.Errorf("Result did not yield %d, got %d instead", http.StatusBadRequest, status)) + } + + handler = http.HandlerFunc(target.targetQueryHandler) + + // valid dns query + q := new(dns.Msg) + q.SetQuestion("example.com.", dns.TypeA) + packedQuery, err := q.Pack() + if err != nil { + t.Fatal(err) + } + obliviousQuery = odoh.CreateObliviousDNSQuery([]byte(packedQuery), 0) + encryptedQuery, _, err = target.odohKeyPair.Config.Contents.EncryptQuery(obliviousQuery) + if err != nil { + t.Fatal(err) + } + + request, err = http.NewRequest(http.MethodPost, queryEndpoint, bytes.NewReader(encryptedQuery.Marshal())) + if err != nil { + t.Fatal(err) + } + request.Header.Add("Content-Type", odohMessageContentType) + + rr = httptest.NewRecorder() + handler.ServeHTTP(rr, request) + + if status := rr.Result().StatusCode; status != http.StatusOK { + t.Fatal(fmt.Errorf("Result did not yield %d, got %d instead", http.StatusOK, status)) + } + if rr.Result().Header.Get("Content-Type") != odohMessageContentType { + t.Fatal("Invalid content type response") + } +} From d309f3c81ac2e4d7a1816c8b956b81edc12b0cf3 Mon Sep 17 00:00:00 2001 From: Nate Sales Date: Tue, 20 Apr 2021 17:24:47 -0700 Subject: [PATCH 02/61] create gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..485dee6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.idea From 810124678c8d2ad2a80e0fe85865e763352c0c31 Mon Sep 17 00:00:00 2001 From: Nate Sales Date: Tue, 20 Apr 2021 17:25:20 -0700 Subject: [PATCH 03/61] simplify cli config with flags --- go.mod | 2 ++ go.sum | 12 +++++-- odoh_server.go | 95 +++++++++++++++++++++----------------------------- 3 files changed, 52 insertions(+), 57 deletions(-) diff --git a/go.mod b/go.mod index d610052..9617245 100644 --- a/go.mod +++ b/go.mod @@ -7,5 +7,7 @@ require ( github.com/cisco/go-hpke v0.0.0-20201215202025-9cebdf8f33d4 github.com/cloudflare/odoh-go v0.1.4 github.com/elastic/go-elasticsearch/v8 v8.0.0-20201022194115-1af099fb3eca + github.com/jessevdk/go-flags v1.5.0 github.com/miekg/dns v1.1.35 + github.com/sirupsen/logrus v1.8.1 ) diff --git a/go.sum b/go.sum index 2130b57..0465369 100644 --- a/go.sum +++ b/go.sum @@ -54,8 +54,9 @@ github.com/cloudflare/circl v1.0.0/go.mod h1:MhjB3NEEhJbTOdLLq964NIUisXDxaE1WkQP github.com/cloudflare/odoh-go v0.1.4 h1:z+7+4bFZjk78NUqlw6WKZXhQaOsv2dUUyeQCiczWjU8= github.com/cloudflare/odoh-go v0.1.4/go.mod h1:SDBrEsRyq5fhkqOqKH5EbOjG4yA+Azx4UOgpaxlQU5k= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/elastic/go-elasticsearch/v8 v8.0.0-20201022194115-1af099fb3eca h1:bQtWepJpVTzze/AcH7r9riu3hAHgjNkIQNePw7gyVu4= github.com/elastic/go-elasticsearch/v8 v8.0.0-20201022194115-1af099fb3eca/go.mod h1:xe9a/L2aeOgFKKgrO3ibQTnMdpAeL0GC+5/HpGScSa4= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -123,6 +124,8 @@ github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/jessevdk/go-flags v1.5.0 h1:1jKYvbxEjfUl0fmqTCOfonvskHHXMjBySTLW4y9LFvc= +github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1 h1:6QPYqodiu3GuPL+7mfx+NwDdp2eTkp9IfEUpgAwUN0o= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= @@ -138,7 +141,10 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= +github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= @@ -249,6 +255,7 @@ golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -265,8 +272,9 @@ golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f h1:+Nyd8tzPX9R7BWHguqsrbFdRx3WQ/1ib8I44HXV5yTA= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4 h1:EZ2mChiOa8udjfp6rRmswTbtZN/QzUQp4ptM4rnjHvc= +golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= diff --git a/odoh_server.go b/odoh_server.go index 0e77279..4a210fb 100644 --- a/odoh_server.go +++ b/odoh_server.go @@ -26,15 +26,27 @@ import ( "crypto/rand" "encoding/hex" "fmt" - "log" "net/http" "os" "time" "github.com/cisco/go-hpke" - odoh "github.com/cloudflare/odoh-go" + "github.com/cloudflare/odoh-go" + "github.com/jessevdk/go-flags" + log "github.com/sirupsen/logrus" ) +// Set by build process +var version = "dev" + +// CLI flags +var opts struct { + ListenAddr string `short:"l" long:"listen" description:"Address to listen on" default:"localhost:8080"` + Cert string `short:"c" long:"cert" description:"TLS certificate file"` + Key string `short:"k" long:"key" description:"TLS key file"` + Verbose bool `short:"v" long:"verbose" description:"Enable verbose logging"` +} + const ( // HPKE constants kemID = hpke.DHKEM_X25519 @@ -59,8 +71,6 @@ const ( targetNameEnvironmentVariable = "TARGET_INSTANCE_NAME" experimentIDEnvironmentVariable = "EXPERIMENT_ID" telemetryTypeEnvironmentVariable = "TELEMETRY_TYPE" - certificateEnvironmentVariable = "CERT" - keyEnvironmentVariable = "KEY" ) var ( @@ -76,26 +86,21 @@ type odohServer struct { DOHURI string } -func (s odohServer) indexHandler(w http.ResponseWriter, r *http.Request) { - log.Printf("%s Handling %s\n", r.Method, r.URL.Path) - fmt.Fprint(w, "ODOH service\n") - fmt.Fprint(w, "----------------\n") - fmt.Fprintf(w, "Proxy endpoint: https://%s%s{?targethost,targetpath}\n", r.Host, s.endpoints["Proxy"]) - fmt.Fprintf(w, "Target endpoint: https://%s%s{?dns}\n", r.Host, s.endpoints["Target"]) - fmt.Fprint(w, "----------------\n") -} - -func (s odohServer) healthCheckHandler(w http.ResponseWriter, r *http.Request) { - log.Printf("%s Handling %s\n", r.Method, r.URL.Path) - fmt.Fprint(w, "ok") -} - func main() { - port := os.Getenv("PORT") - if port == "" { - port = defaultPort + // Parse cli flags + _, err := flags.ParseArgs(&opts, os.Args) + if err != nil { + os.Exit(1) + } + + // Enable debug logging in development releases + if //noinspection GoBoolExpressions + version == "devel" || opts.Verbose { + log.SetLevel(log.DebugLevel) } + log.Infof("Starting bcg %s", version) + var seed []byte if seedHex := os.Getenv(secretSeedEnvironmentVariable); seedHex != "" { log.Printf("Using Secret Key Seed : [%v]", seedHex) @@ -109,37 +114,9 @@ func main() { rand.Read(seed) } - var serverName string - if serverNameSetting := os.Getenv(targetNameEnvironmentVariable); serverNameSetting != "" { - serverName = serverNameSetting - } else { - serverName = "server_localhost" - } - log.Printf("Setting Server Name as %v", serverName) - - var experimentID string - if experimentID = os.Getenv(experimentIDEnvironmentVariable); experimentID == "" { - experimentID = "EXP_LOCAL" - } - - var telemetryType string - if telemetryType = os.Getenv(telemetryTypeEnvironmentVariable); telemetryType == "" { - telemetryType = "LOG" - } - - var certFile string - if certFile = os.Getenv(certificateEnvironmentVariable); certFile == "" { - certFile = "cert.pem" - } - - var keyFile string - if keyFile = os.Getenv(keyEnvironmentVariable); keyFile == "" { - keyFile = "key.pem" - } - keyPair, err := odoh.CreateKeyPairFromSeed(kemID, kdfID, aeadID, seed) if err != nil { - log.Fatal("Failed to create a private key. Exiting now.") + log.Fatal(err) } endpoints := make(map[string]string) @@ -185,10 +162,18 @@ func main() { http.HandleFunc(proxyEndpoint, server.proxy.proxyQueryHandler) http.HandleFunc(queryEndpoint, server.target.targetQueryHandler) - http.HandleFunc(healthEndpoint, server.healthCheckHandler) + http.HandleFunc(healthEndpoint, func(w http.ResponseWriter, r *http.Request) { + fmt.Fprint(w, "ok") + }) http.HandleFunc(configEndpoint, target.configHandler) - http.HandleFunc("/", server.indexHandler) - - log.Printf("Listening on port %v with cert %v and key %v\n", port, certFile, keyFile) - log.Fatal(http.ListenAndServeTLS(fmt.Sprintf(":%s", port), certFile, keyFile, nil)) + http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { + fmt.Fprint(w, "ODOH service\n") + fmt.Fprint(w, "----------------\n") + fmt.Fprintf(w, "Proxy endpoint: https://%s%s{?targethost,targetpath}\n", r.Host, server.endpoints["Proxy"]) + fmt.Fprintf(w, "Target endpoint: https://%s%s{?dns}\n", r.Host, server.endpoints["Target"]) + fmt.Fprint(w, "----------------\n") + }) + + log.Infoln("Starting ODoH listener on %s", opts.ListenAddr) + log.Fatal(http.ListenAndServeTLS(opts.ListenAddr, opts.Cert, opts.Key, nil)) } From aa1dd214980a09f24e434f6b96ff28eaa57745af Mon Sep 17 00:00:00 2001 From: Nate Sales Date: Tue, 20 Apr 2021 17:41:02 -0700 Subject: [PATCH 04/61] cleanup unnecessary constants --- odoh_server.go | 108 +++++++++++++------------------------------------ proxy_test.go | 20 ++++----- target_test.go | 18 ++++----- 3 files changed, 46 insertions(+), 100 deletions(-) diff --git a/odoh_server.go b/odoh_server.go index 4a210fb..c12e956 100644 --- a/odoh_server.go +++ b/odoh_server.go @@ -24,7 +24,6 @@ package main import ( "crypto/rand" - "encoding/hex" "fmt" "net/http" "os" @@ -36,6 +35,16 @@ import ( log "github.com/sirupsen/logrus" ) +const ( + // HPKE constants + kemID = hpke.DHKEM_X25519 + kdfID = hpke.KDF_HKDF_SHA256 + aeadID = hpke.AEAD_AESGCM128 + + // Keying material (seed) should have as many bits of entropy as the bit length of the x25519 secret key + defaultSeedLength = 32 +) + // Set by build process var version = "dev" @@ -47,45 +56,11 @@ var opts struct { Verbose bool `short:"v" long:"verbose" description:"Enable verbose logging"` } -const ( - // HPKE constants - kemID = hpke.DHKEM_X25519 - kdfID = hpke.KDF_HKDF_SHA256 - aeadID = hpke.AEAD_AESGCM128 - - // keying material (seed) should have as many bits of entropy as the bit - // length of the x25519 secret key - defaultSeedLength = 32 - - // HTTP constants. Fill in your proxy and target here. - defaultPort = "8080" - proxyURI = "https://dnstarget.example.net" - targetURI = "https://dnsproxy.example.net" - proxyEndpoint = "/proxy" - queryEndpoint = "/dns-query" - healthEndpoint = "/health" - configEndpoint = "/.well-known/odohconfigs" - - // Environment variables - secretSeedEnvironmentVariable = "SEED_SECRET_KEY" - targetNameEnvironmentVariable = "TARGET_INSTANCE_NAME" - experimentIDEnvironmentVariable = "EXPERIMENT_ID" - telemetryTypeEnvironmentVariable = "TELEMETRY_TYPE" -) - var ( // DNS constants. Fill in a DNS server to forward to here. nameServers = []string{"1.1.1.1:53", "8.8.8.8:53", "9.9.9.9:53"} ) -type odohServer struct { - endpoints map[string]string - Verbose bool - target *targetServer - proxy *proxyServer - DOHURI string -} - func main() { // Parse cli flags _, err := flags.ParseArgs(&opts, os.Args) @@ -99,32 +74,18 @@ func main() { log.SetLevel(log.DebugLevel) } - log.Infof("Starting bcg %s", version) - - var seed []byte - if seedHex := os.Getenv(secretSeedEnvironmentVariable); seedHex != "" { - log.Printf("Using Secret Key Seed : [%v]", seedHex) - var err error - seed, err = hex.DecodeString(seedHex) - if err != nil { - panic(err) - } - } else { - seed = make([]byte, defaultSeedLength) - rand.Read(seed) + // Random seed for HPKE keypair + seed := make([]byte, defaultSeedLength) + _, err = rand.Read(seed) + if err != nil { + log.Fatal(err) } - keyPair, err := odoh.CreateKeyPairFromSeed(kemID, kdfID, aeadID, seed) + keyPair, err := odoh.CreateKeyPairFromSeed(hpke.DHKEM_X25519, hpke.KDF_HKDF_SHA256, hpke.AEAD_AESGCM128, seed) if err != nil { log.Fatal(err) } - endpoints := make(map[string]string) - endpoints["Target"] = queryEndpoint - endpoints["Proxy"] = proxyEndpoint - endpoints["Health"] = healthEndpoint - endpoints["Config"] = configEndpoint - resolversInUse := make([]resolver, len(nameServers)) for index := 0; index < len(nameServers); index++ { @@ -136,12 +97,9 @@ func main() { } target := &targetServer{ - verbose: false, - resolver: resolversInUse, - odohKeyPair: keyPair, - telemetryClient: getTelemetryInstance(telemetryType), - serverInstanceName: serverName, - experimentId: experimentID, + verbose: false, + resolver: resolversInUse, + odohKeyPair: keyPair, } proxy := &proxyServer{ @@ -153,27 +111,15 @@ func main() { }, } - server := odohServer{ - endpoints: endpoints, - target: target, - proxy: proxy, - DOHURI: fmt.Sprintf("%s/%s", targetURI, queryEndpoint), - } - - http.HandleFunc(proxyEndpoint, server.proxy.proxyQueryHandler) - http.HandleFunc(queryEndpoint, server.target.targetQueryHandler) - http.HandleFunc(healthEndpoint, func(w http.ResponseWriter, r *http.Request) { - fmt.Fprint(w, "ok") - }) - http.HandleFunc(configEndpoint, target.configHandler) - http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { - fmt.Fprint(w, "ODOH service\n") - fmt.Fprint(w, "----------------\n") - fmt.Fprintf(w, "Proxy endpoint: https://%s%s{?targethost,targetpath}\n", r.Host, server.endpoints["Proxy"]) - fmt.Fprintf(w, "Target endpoint: https://%s%s{?dns}\n", r.Host, server.endpoints["Target"]) - fmt.Fprint(w, "----------------\n") + // HTTP handlers + http.HandleFunc("/proxy", proxy.proxyQueryHandler) + http.HandleFunc("/dns-query", target.targetQueryHandler) + http.HandleFunc("/health", func(w http.ResponseWriter, r *http.Request) { + _, _ = fmt.Fprint(w, "ok") }) + http.HandleFunc("/.well-known/odohconfigs", target.configHandler) - log.Infoln("Starting ODoH listener on %s", opts.ListenAddr) + // Start the server + log.Infof("Starting ODoH listener on %s", opts.ListenAddr) log.Fatal(http.ListenAndServeTLS(opts.ListenAddr, opts.Cert, opts.Key, nil)) } diff --git a/proxy_test.go b/proxy_test.go index 84e326d..3a221e4 100644 --- a/proxy_test.go +++ b/proxy_test.go @@ -54,7 +54,7 @@ func TestProxyMethod(t *testing.T) { handler := http.HandlerFunc(proxy.proxyQueryHandler) fakeQueryBody := strings.NewReader("test body") - fakeQueryURL := queryEndpoint + fakeQueryURL := "/dns-query" request, err := http.NewRequest("GET", fakeQueryURL, fakeQueryBody) if err != nil { t.Fatal(err) @@ -79,10 +79,10 @@ func TestProxyQueryParametersMissing(t *testing.T) { fakeQueryBody := strings.NewReader("test body") testURLs := []string{ - queryEndpoint, + "/dns-query", "/not-the-right-endpoint", - queryEndpoint + "?targethost=", - queryEndpoint + "?targetpath=bar", + "/dns-query?targethost=", + "/dns-query?targetpath=bar", } for _, url := range testURLs { request, err := http.NewRequest("POST", url, fakeQueryBody) @@ -102,8 +102,8 @@ func TestProxyQueryParametersMissing(t *testing.T) { } testURLs = []string{ - queryEndpoint + "?targethost=foo", - queryEndpoint + "?targethost=foo&targetpath=", + "/dns-query?targethost=foo", + "/dns-query?targethost=foo&targetpath=", } for _, url := range testURLs { request, err := http.NewRequest("POST", url, fakeQueryBody) @@ -129,7 +129,7 @@ func TestProxyQueryMissingBody(t *testing.T) { handler := http.HandlerFunc(proxy.proxyQueryHandler) emptyQueryBody := strings.NewReader("") - request, err := http.NewRequest("POST", queryEndpoint+"?targethost=foo&targetpath=bar", emptyQueryBody) + request, err := http.NewRequest("POST", "/dns-query?targethost=foo&targetpath=bar", emptyQueryBody) if err != nil { t.Fatal(err) } @@ -153,7 +153,7 @@ func TestProxyIncorrectTarget(t *testing.T) { handler := http.HandlerFunc(proxy.proxyQueryHandler) fakeQueryBody := strings.NewReader("test body") - fakeQueryURL := queryEndpoint + "?targethost=nottherighttarget.com&targetpath=/" + fakeQueryURL := "/dns-query?targethost=nottherighttarget.com&targetpath=/" request, err := http.NewRequest("POST", fakeQueryURL, fakeQueryBody) if err != nil { @@ -187,7 +187,7 @@ func TestProxyStatusCodePropagationOK(t *testing.T) { handler := http.HandlerFunc(proxy.proxyQueryHandler) fakeQueryBody := strings.NewReader("test body") - fakeQueryURL := queryEndpoint + "?targethost=" + testTargetURL + "&targetpath=/" + fakeQueryURL := "/dns-query" + "?targethost=" + testTargetURL + "&targetpath=/" request, err := http.NewRequest("POST", fakeQueryURL, fakeQueryBody) if err != nil { @@ -222,7 +222,7 @@ func TestProxyStatusCodePropagationFailure(t *testing.T) { handler := http.HandlerFunc(proxy.proxyQueryHandler) fakeQueryBody := strings.NewReader("test body") - fakeQueryURL := queryEndpoint + "?targethost=" + testTargetURL + "&targetpath=/" + fakeQueryURL := "/dns-query" + "?targethost=" + testTargetURL + "&targetpath=/" request, err := http.NewRequest("POST", fakeQueryURL, fakeQueryBody) if err != nil { diff --git a/target_test.go b/target_test.go index d9bdca5..00f6e29 100644 --- a/target_test.go +++ b/target_test.go @@ -131,7 +131,7 @@ func TestConfigHandler(t *testing.T) { handler := http.HandlerFunc(target.configHandler) - request, err := http.NewRequest("GET", configEndpoint, nil) + request, err := http.NewRequest("GET", "/.well-known/odohconfigs", nil) if err != nil { t.Fatal(err) } @@ -158,7 +158,7 @@ func TestQueryHandlerInvalidContentType(t *testing.T) { handler := http.HandlerFunc(target.targetQueryHandler) - request, err := http.NewRequest("GET", queryEndpoint, nil) + request, err := http.NewRequest("GET", "/dns-query", nil) if err != nil { t.Fatal(err) } @@ -179,7 +179,7 @@ func TestQueryHandlerDoHWithPOST(t *testing.T) { handler := http.HandlerFunc(target.targetQueryHandler) q := r.queries[0] - request, err := http.NewRequest(http.MethodPost, queryEndpoint, bytes.NewReader([]byte(q))) + request, err := http.NewRequest(http.MethodPost, "/dns-query", bytes.NewReader([]byte(q))) if err != nil { t.Fatal(err) } @@ -213,7 +213,7 @@ func TestQueryHandlerDoHWithGET(t *testing.T) { q := r.queries[0] encodedQuery := base64.RawURLEncoding.EncodeToString([]byte(q)) - request, err := http.NewRequest(http.MethodGet, queryEndpoint+"?dns="+encodedQuery, nil) + request, err := http.NewRequest(http.MethodGet, "/dns-query?dns="+encodedQuery, nil) if err != nil { t.Fatal(err) } @@ -246,7 +246,7 @@ func TestQueryHandlerDoHWithInvalidMethod(t *testing.T) { q := r.queries[0] encodedQuery := base64.RawURLEncoding.EncodeToString([]byte(q)) - request, err := http.NewRequest(http.MethodPut, queryEndpoint+"?dns="+encodedQuery, nil) + request, err := http.NewRequest(http.MethodPut, "/dns-query"+"?dns="+encodedQuery, nil) if err != nil { t.Fatal(err) } @@ -273,7 +273,7 @@ func TestQueryHandlerODoHWithInvalidMethod(t *testing.T) { t.Fatal(err) } - request, err := http.NewRequest(http.MethodGet, queryEndpoint, bytes.NewReader(encryptedQuery.Marshal())) + request, err := http.NewRequest(http.MethodGet, "/dns-query", bytes.NewReader(encryptedQuery.Marshal())) if err != nil { t.Fatal(err) } @@ -300,7 +300,7 @@ func TestQueryHandlerODoH(t *testing.T) { t.Fatal(err) } - request, err := http.NewRequest(http.MethodPost, queryEndpoint, bytes.NewReader(encryptedQuery.Marshal())) + request, err := http.NewRequest(http.MethodPost, "/dns-query", bytes.NewReader(encryptedQuery.Marshal())) if err != nil { t.Fatal(err) } @@ -350,7 +350,7 @@ func TestQueryHandlerODoHWithInvalidKey(t *testing.T) { t.Fatal(err) } - request, err := http.NewRequest(http.MethodPost, queryEndpoint, bytes.NewReader(encryptedQuery.Marshal())) + request, err := http.NewRequest(http.MethodPost, "/dns-query", bytes.NewReader(encryptedQuery.Marshal())) if err != nil { t.Fatal(err) } @@ -379,7 +379,7 @@ func TestQueryHandlerODoHWithCorruptCiphertext(t *testing.T) { queryBytes := encryptedQuery.Marshal() queryBytes[len(queryBytes)-1] ^= 0xFF - request, err := http.NewRequest(http.MethodPost, queryEndpoint, bytes.NewReader(queryBytes)) + request, err := http.NewRequest(http.MethodPost, "/dns-query", bytes.NewReader(queryBytes)) if err != nil { t.Fatal(err) } From fdc966483fc122ad6f33cc626b576049dbcaf309 Mon Sep 17 00:00:00 2001 From: Nate Sales Date: Tue, 20 Apr 2021 17:44:33 -0700 Subject: [PATCH 05/61] testing: cleanup error handling and consistency with Go code style --- target_test.go | 41 ++++++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/target_test.go b/target_test.go index 00f6e29..05ef0c3 100644 --- a/target_test.go +++ b/target_test.go @@ -34,7 +34,7 @@ import ( "net/http/httptest" "testing" - odoh "github.com/cloudflare/odoh-go" + "github.com/cloudflare/odoh-go" "github.com/miekg/dns" ) @@ -55,7 +55,7 @@ func (r localResolver) resolve(query *dns.Msg) (*dns.Msg, error) { packed, ok := r.queryResponseMap[string(packedQuery)] if !ok { - return nil, errors.New("Failed to resolve") + return nil, errors.New("failed to resolve") } response := &dns.Msg{} @@ -103,11 +103,14 @@ func createLocalResolver(t *testing.T) *localResolver { func createKeyPair(t *testing.T) odoh.ObliviousDoHKeyPair { seed := make([]byte, defaultSeedLength) - rand.Read(seed) + _, err := rand.Read(seed) + if err != nil { + t.Fatal(err) + } keyPair, err := odoh.CreateKeyPairFromSeed(kemID, kdfID, aeadID, seed) if err != nil { - t.Fatal("Failed to create a private key. Exiting now.") + t.Fatal("failed to create a private key. Exiting now.") } return keyPair @@ -140,7 +143,7 @@ func TestConfigHandler(t *testing.T) { handler.ServeHTTP(rr, request) if status := rr.Code; status != http.StatusOK { - t.Fatal(fmt.Errorf("Failed request with error code: %d", status)) + t.Fatal(fmt.Errorf("failed request with error code: %d", status)) } body, err := ioutil.ReadAll(rr.Result().Body) @@ -168,7 +171,7 @@ func TestQueryHandlerInvalidContentType(t *testing.T) { handler.ServeHTTP(rr, request) if status := rr.Result().StatusCode; status != http.StatusBadRequest { - t.Fatal(fmt.Errorf("Result did not yield %d, got %d instead", http.StatusBadRequest, status)) + t.Fatal(fmt.Errorf("result did not yield %d, got %d instead", http.StatusBadRequest, status)) } } @@ -189,10 +192,10 @@ func TestQueryHandlerDoHWithPOST(t *testing.T) { handler.ServeHTTP(rr, request) if status := rr.Result().StatusCode; status != http.StatusOK { - t.Fatal(fmt.Errorf("Result did not yield %d, got %d instead", http.StatusOK, status)) + t.Fatal(fmt.Errorf("result did not yield %d, got %d instead", http.StatusOK, status)) } if rr.Result().Header.Get("Content-Type") != dnsMessageContentType { - t.Fatal("Invalid content type response") + t.Fatal("invalid content type response") } responseBody, err := ioutil.ReadAll(rr.Result().Body) @@ -200,7 +203,7 @@ func TestQueryHandlerDoHWithPOST(t *testing.T) { t.Fatal(err) } if !bytes.Equal(responseBody, r.queryResponseMap[q]) { - t.Fatal("Incorrect response received") + t.Fatal("incorrect response received") } } @@ -223,10 +226,10 @@ func TestQueryHandlerDoHWithGET(t *testing.T) { handler.ServeHTTP(rr, request) if status := rr.Result().StatusCode; status != http.StatusOK { - t.Fatal(fmt.Errorf("Result did not yield %d, got %d instead", http.StatusOK, status)) + t.Fatal(fmt.Errorf("result did not yield %d, got %d instead", http.StatusOK, status)) } if rr.Result().Header.Get("Content-Type") != dnsMessageContentType { - t.Fatal("Invalid content type response") + t.Fatal("invalid content type response") } responseBody, err := ioutil.ReadAll(rr.Result().Body) @@ -234,7 +237,7 @@ func TestQueryHandlerDoHWithGET(t *testing.T) { t.Fatal(err) } if !bytes.Equal(responseBody, r.queryResponseMap[q]) { - t.Fatal("Incorrect response received") + t.Fatal("incorrect response received") } } @@ -256,7 +259,7 @@ func TestQueryHandlerDoHWithInvalidMethod(t *testing.T) { handler.ServeHTTP(rr, request) if status := rr.Result().StatusCode; status != http.StatusBadRequest { - t.Fatal(fmt.Errorf("Result did not yield %d, got %d instead", http.StatusBadRequest, status)) + t.Fatal(fmt.Errorf("result did not yield %d, got %d instead", http.StatusBadRequest, status)) } } @@ -283,7 +286,7 @@ func TestQueryHandlerODoHWithInvalidMethod(t *testing.T) { handler.ServeHTTP(rr, request) if status := rr.Result().StatusCode; status != http.StatusBadRequest { - t.Fatal(fmt.Errorf("Result did not yield %d, got %d instead", http.StatusBadRequest, status)) + t.Fatal(fmt.Errorf("result did not yield %d, got %d instead", http.StatusBadRequest, status)) } } @@ -310,10 +313,10 @@ func TestQueryHandlerODoH(t *testing.T) { handler.ServeHTTP(rr, request) if status := rr.Result().StatusCode; status != http.StatusOK { - t.Fatal(fmt.Errorf("Result did not yield %d, got %d instead", http.StatusOK, status)) + t.Fatal(fmt.Errorf("result did not yield %d, got %d instead", http.StatusOK, status)) } if rr.Result().Header.Get("Content-Type") != odohMessageContentType { - t.Fatal("Invalid content type response") + t.Fatal("invalid content type response") } responseBody, err := ioutil.ReadAll(rr.Result().Body) @@ -332,7 +335,7 @@ func TestQueryHandlerODoH(t *testing.T) { } if !bytes.Equal(response, r.queryResponseMap[q]) { - t.Fatal(fmt.Errorf("Incorrect response received. Got %v, expected %v", response, r.queryResponseMap[q])) + t.Fatal(fmt.Errorf("incorrect response received. Got %v, expected %v", response, r.queryResponseMap[q])) } } @@ -360,7 +363,7 @@ func TestQueryHandlerODoHWithInvalidKey(t *testing.T) { handler.ServeHTTP(rr, request) if status := rr.Result().StatusCode; status != http.StatusBadRequest { - t.Fatal(fmt.Errorf("Result did not yield %d, got %d instead", http.StatusBadRequest, status)) + t.Fatal(fmt.Errorf("result did not yield %d, got %d instead", http.StatusBadRequest, status)) } } @@ -389,6 +392,6 @@ func TestQueryHandlerODoHWithCorruptCiphertext(t *testing.T) { handler.ServeHTTP(rr, request) if status := rr.Result().StatusCode; status != http.StatusBadRequest { - t.Fatal(fmt.Errorf("Result did not yield %d, got %d instead", http.StatusBadRequest, status)) + t.Fatal(fmt.Errorf("result did not yield %d, got %d instead", http.StatusBadRequest, status)) } } From defbc4ffffbd977725a9f2d265754950fd68bad2 Mon Sep 17 00:00:00 2001 From: Nate Sales Date: Tue, 20 Apr 2021 17:49:21 -0700 Subject: [PATCH 06/61] move resolver to CLI flag --- odoh_server.go | 23 ++++++----------------- target.go | 16 ++++++---------- 2 files changed, 12 insertions(+), 27 deletions(-) diff --git a/odoh_server.go b/odoh_server.go index c12e956..b2c15be 100644 --- a/odoh_server.go +++ b/odoh_server.go @@ -51,16 +51,12 @@ var version = "dev" // CLI flags var opts struct { ListenAddr string `short:"l" long:"listen" description:"Address to listen on" default:"localhost:8080"` + Resolver string `short:"r" long:"resolver" description:"Upstream DNS resolver to query" default:"1.1.1.1:53"` Cert string `short:"c" long:"cert" description:"TLS certificate file"` Key string `short:"k" long:"key" description:"TLS key file"` Verbose bool `short:"v" long:"verbose" description:"Enable verbose logging"` } -var ( - // DNS constants. Fill in a DNS server to forward to here. - nameServers = []string{"1.1.1.1:53", "8.8.8.8:53", "9.9.9.9:53"} -) - func main() { // Parse cli flags _, err := flags.ParseArgs(&opts, os.Args) @@ -86,19 +82,12 @@ func main() { log.Fatal(err) } - resolversInUse := make([]resolver, len(nameServers)) - - for index := 0; index < len(nameServers); index++ { - resolver := &targetResolver{ - timeout: 2500 * time.Millisecond, - nameserver: nameServers[index], - } - resolversInUse[index] = resolver - } - target := &targetServer{ - verbose: false, - resolver: resolversInUse, + verbose: false, + resolver: &targetResolver{ + timeout: 2500 * time.Millisecond, + nameserver: opts.Resolver, + }, odohKeyPair: keyPair, } diff --git a/target.go b/target.go index 05c8414..f66aee5 100644 --- a/target.go +++ b/target.go @@ -27,17 +27,16 @@ import ( "fmt" "io/ioutil" "log" - "math/rand" "net/http" "time" - odoh "github.com/cloudflare/odoh-go" + "github.com/cloudflare/odoh-go" "github.com/miekg/dns" ) type targetServer struct { verbose bool - resolver []resolver + resolver resolver odohKeyPair odoh.ObliviousDoHKeyPair telemetryClient *telemetry serverInstanceName string @@ -132,9 +131,7 @@ func (s *targetServer) dohQueryHandler(w http.ResponseWriter, r *http.Request) { } timestamp.TargetQueryDecryptionTime = time.Now().UnixNano() - availableResolvers := len(s.resolver) - chosenResolver := rand.Intn(availableResolvers) - packedResponse, err := s.resolveQueryWithResolver(query, s.resolver[chosenResolver]) + packedResponse, err := s.resolveQueryWithResolver(query, s.resolver) if err != nil { log.Println("Failed resolving DNS query:", err) http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError) @@ -146,7 +143,7 @@ func (s *targetServer) dohQueryHandler(w http.ResponseWriter, r *http.Request) { timestamp.EndTime = endTime exp.Timestamp = timestamp - exp.Resolver = s.resolver[chosenResolver].name() + exp.Resolver = s.resolver.name() exp.Status = true if s.telemetryClient.logClient != nil { @@ -217,8 +214,7 @@ func (s *targetServer) odohQueryHandler(w http.ResponseWriter, r *http.Request) queryParseAndDecryptionCompleteTime := time.Now().UnixNano() timestamp.TargetQueryDecryptionTime = queryParseAndDecryptionCompleteTime - chosenResolver := rand.Intn(len(s.resolver)) - packedResponse, err := s.resolveQueryWithResolver(query, s.resolver[chosenResolver]) + packedResponse, err := s.resolveQueryWithResolver(query, s.resolver) if err != nil { log.Println("resolveQueryWithResolver failed:", err) http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError) @@ -257,7 +253,7 @@ func (s *targetServer) odohQueryHandler(w http.ResponseWriter, r *http.Request) timestamp.EndTime = returnResponseTime exp.Timestamp = timestamp - exp.Resolver = s.resolver[chosenResolver].name() + exp.Resolver = s.resolver.name() exp.Status = true if s.telemetryClient.logClient != nil { From 3b4aa6f4fa3010649b6b3829bda10951154fc784 Mon Sep 17 00:00:00 2001 From: Nate Sales Date: Tue, 20 Apr 2021 17:50:17 -0700 Subject: [PATCH 07/61] ignore PEM files and output binary --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 485dee6..11a179a 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ .idea +*.pem +odoh-server \ No newline at end of file From 921ef4c211f1b2b1f5f918e0ec11a3a8e24eb450 Mon Sep 17 00:00:00 2001 From: Nate Sales Date: Tue, 20 Apr 2021 17:51:07 -0700 Subject: [PATCH 08/61] require cert and key flags --- odoh_server.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/odoh_server.go b/odoh_server.go index b2c15be..9907e9f 100644 --- a/odoh_server.go +++ b/odoh_server.go @@ -52,8 +52,8 @@ var version = "dev" var opts struct { ListenAddr string `short:"l" long:"listen" description:"Address to listen on" default:"localhost:8080"` Resolver string `short:"r" long:"resolver" description:"Upstream DNS resolver to query" default:"1.1.1.1:53"` - Cert string `short:"c" long:"cert" description:"TLS certificate file"` - Key string `short:"k" long:"key" description:"TLS key file"` + Cert string `short:"c" long:"cert" description:"TLS certificate file" required:"true"` + Key string `short:"k" long:"key" description:"TLS key file" required:"true"` Verbose bool `short:"v" long:"verbose" description:"Enable verbose logging"` } From efb23da67aceeaef04cb33ff48902e5082cf6278 Mon Sep 17 00:00:00 2001 From: Nate Sales Date: Tue, 20 Apr 2021 17:54:46 -0700 Subject: [PATCH 09/61] proxy: handle errors safely --- proxy.go | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/proxy.go b/proxy.go index 449f0ec..933fdfa 100644 --- a/proxy.go +++ b/proxy.go @@ -26,9 +26,11 @@ import ( "bytes" "errors" "fmt" + "io" "io/ioutil" - "log" "net/http" + + log "github.com/sirupsen/logrus" ) type proxyServer struct { @@ -37,10 +39,10 @@ type proxyServer struct { } var ( - errWrongMethod = fmt.Errorf("Unsupported method") - errMissingTargetHost = fmt.Errorf("Missing proxy targethost query parameter") - errMissingTargetPath = fmt.Errorf("Missing proxy targetpath query parameter") - errEmptyRequestBody = fmt.Errorf("Missing request body") + errWrongMethod = fmt.Errorf("unsupported method") + errMissingTargetHost = fmt.Errorf("missing proxy targethost query parameter") + errMissingTargetPath = fmt.Errorf("missing proxy targetpath query parameter") + errEmptyRequestBody = fmt.Errorf("missing request body") ) func forwardProxyRequest(client *http.Client, targetName string, targetPath string, body []byte, headerContentType string) (*http.Response, error) { @@ -56,8 +58,6 @@ func forwardProxyRequest(client *http.Client, targetName string, targetPath stri } func (p *proxyServer) proxyQueryHandler(w http.ResponseWriter, r *http.Request) { - log.Printf("%s Handling %s\n", r.Method, r.URL.Path) - if r.Method != "POST" { p.lastError = errWrongMethod log.Printf(p.lastError.Error()) @@ -81,7 +81,12 @@ func (p *proxyServer) proxyQueryHandler(w http.ResponseWriter, r *http.Request) return } - defer r.Body.Close() + defer func(body io.ReadCloser) { + err := body.Close() + if err != nil { + log.Warn(err) + } + }(r.Body) body, err := ioutil.ReadAll(r.Body) if err != nil || len(body) == 0 { p.lastError = errEmptyRequestBody @@ -103,6 +108,7 @@ func (p *proxyServer) proxyQueryHandler(w http.ResponseWriter, r *http.Request) return } + //goland:noinspection GoUnhandledErrorResult defer response.Body.Close() responseBody, err := ioutil.ReadAll(response.Body) if err != nil { @@ -111,5 +117,8 @@ func (p *proxyServer) proxyQueryHandler(w http.ResponseWriter, r *http.Request) } w.Header().Set("Content-Type", headerContentType) - w.Write(responseBody) + _, err = w.Write(responseBody) + if err != nil { + log.Warn(err) + } } From ce46005cef3876037b4fe620a9527623bcff2bfe Mon Sep 17 00:00:00 2001 From: Nate Sales Date: Tue, 20 Apr 2021 17:59:50 -0700 Subject: [PATCH 10/61] target: cleanup and handle errors --- target.go | 56 ++++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 41 insertions(+), 15 deletions(-) diff --git a/target.go b/target.go index f66aee5..6b721b1 100644 --- a/target.go +++ b/target.go @@ -24,14 +24,16 @@ package main import ( "encoding/base64" + "errors" "fmt" + "io" "io/ioutil" - "log" "net/http" "time" "github.com/cloudflare/odoh-go" "github.com/miekg/dns" + log "github.com/sirupsen/logrus" ) type targetServer struct { @@ -59,7 +61,7 @@ func (s *targetServer) parseQueryFromRequest(r *http.Request) (*dns.Msg, error) case http.MethodGet: var queryBody string if queryBody = r.URL.Query().Get("dns"); queryBody == "" { - return nil, fmt.Errorf("Missing DNS query parameter in GET request") + return nil, fmt.Errorf("missing DNS query parameter in GET request") } encodedMessage, err := base64.RawURLEncoding.DecodeString(queryBody) @@ -73,7 +75,12 @@ func (s *targetServer) parseQueryFromRequest(r *http.Request) (*dns.Msg, error) return nil, fmt.Errorf("incorrect content type, expected '%s', got %s", dnsMessageContentType, r.Header.Get("Content-Type")) } - defer r.Body.Close() + defer func(body io.ReadCloser) { + err := body.Close() + if err != nil { + log.Warn(err) + } + }(r.Body) encodedMessage, err := ioutil.ReadAll(r.Body) if err != nil { return nil, err @@ -100,10 +107,17 @@ func (s *targetServer) resolveQueryWithResolver(q *dns.Msg, r resolver) ([]byte, response, err := r.resolve(q) elapsed := time.Since(start) - packedResponse, err := response.Pack() - if err != nil { - log.Println("Failed encoding DNS response:", err) - return nil, err + var packedResponse []byte + if response != nil { + packedResponse, err = response.Pack() + if err != nil { + log.Warnf("failed encoding DNS response: %s", err) + return nil, err + } + } else { + errMsg := "empty response from resolver" + log.Warnf(errMsg) + return nil, errors.New(errMsg) } if s.verbose { @@ -153,15 +167,23 @@ func (s *targetServer) dohQueryHandler(w http.ResponseWriter, r *http.Request) { } w.Header().Set("Content-Type", dnsMessageContentType) - w.Write(packedResponse) + _, err = w.Write(packedResponse) + if err != nil { + log.Warn(err) + } } func (s *targetServer) parseObliviousQueryFromRequest(r *http.Request) (odoh.ObliviousDNSMessage, error) { if r.Method != http.MethodPost { - return odoh.ObliviousDNSMessage{}, fmt.Errorf("Unsupported HTTP method for Oblivious DNS query: %s", r.Method) + return odoh.ObliviousDNSMessage{}, fmt.Errorf("unsupported HTTP method for Oblivious DNS query: %s", r.Method) } - defer r.Body.Close() + defer func(body io.ReadCloser) { + err := body.Close() + if err != nil { + log.Warn(err) + } + }(r.Body) encryptedMessageBytes, err := ioutil.ReadAll(r.Body) if err != nil { return odoh.ObliviousDNSMessage{}, err @@ -263,7 +285,10 @@ func (s *targetServer) odohQueryHandler(w http.ResponseWriter, r *http.Request) } w.Header().Set("Content-Type", odohMessageContentType) - w.Write(packedResponseMessage) + _, err = w.Write(packedResponseMessage) + if err != nil { + log.Warn(err) + } } func (s *targetServer) targetQueryHandler(w http.ResponseWriter, r *http.Request) { @@ -281,10 +306,11 @@ func (s *targetServer) targetQueryHandler(w http.ResponseWriter, r *http.Request } } -func (s *targetServer) configHandler(w http.ResponseWriter, r *http.Request) { - log.Printf("%s Handling %s\n", r.Method, r.URL.Path) - +func (s *targetServer) configHandler(w http.ResponseWriter, _ *http.Request) { configSet := []odoh.ObliviousDoHConfig{s.odohKeyPair.Config} configs := odoh.CreateObliviousDoHConfigs(configSet) - w.Write(configs.Marshal()) + _, err := w.Write(configs.Marshal()) + if err != nil { + log.Warn(err) + } } From b229226b1f6570d4790cd5ead1b1483f9e102372 Mon Sep 17 00:00:00 2001 From: Nate Sales Date: Tue, 20 Apr 2021 18:10:13 -0700 Subject: [PATCH 11/61] update readme info --- README.md | 94 ++----------------------------------------------------- 1 file changed, 2 insertions(+), 92 deletions(-) diff --git a/README.md b/README.md index e268f39..e6742fc 100644 --- a/README.md +++ b/README.md @@ -1,95 +1,5 @@ # odoh-server-go -[![Coverage Status](https://coveralls.io/repos/github/cloudflare/odoh-server-go/badge.svg?branch=master)](https://coveralls.io/github/cloudflare/odoh-server-go?branch=master) +[Oblivious DoH Server](https://tools.ietf.org/html/draft-pauly-dprive-oblivious-doh) based on [Cloudflare's odoh-server-go](https://github.com/cloudflare/odoh-server-go) -[Oblivious DoH Server](https://tools.ietf.org/html/draft-pauly-dprive-oblivious-doh) - -# Preconfigured Deployments - -[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy) -[![deploy to Scalingo](https://cdn.scalingo.com/deploy/button.svg)](https://my.scalingo.com/deploy) - -# Local development - -To deploy the server locally, first acquire a TLS certificate using [mkcert](https://github.com/FiloSottile/mkcert) as follows: - -~~~ -$ mkcert -key-file key.pem -cert-file cert.pem 127.0.0.1 localhost -~~~ - -Then build and run the server as follows: - -~~~ -$ make all -$ CERT=cert.pem KEY=key.pem PORT=4567 ./odoh-server -~~~ - -You may then run the [corresponding client](https://github.com/cloudflare/odoh-client-go) as follows: - -~~~ -$ ./odoh-client odoh --proxy localhost:4567 --target odoh.cloudflare-dns.com --domain cloudflare.com -;; opcode: QUERY, status: NOERROR, id: 14306 -;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0 - -;; QUESTION SECTION: -;cloudflare.com. IN AAAA - -;; ANSWER SECTION: -cloudflare.com. 271 IN AAAA 2606:4700::6810:84e5 -cloudflare.com. 271 IN AAAA 2606:4700::6810:85e5 -~~~ - -# Usage - -To deploy, run: - -~~~ -$ gcloud app deploy proxy.yaml -... -$ gcloud app deploy target.yaml -... -~~~ - -To check on its status, run: - -~~~ -$ gcloud app browse -~~~ - -To stream logs when deployed, run - -~~~ -$ gcloud app logs tail -s default -~~~ - -To run locally build and run the project using - -```shell -go build -PORT=8080 ./odoh-server-go -``` - -By default, the proxy listens on `/proxy` and the target listens on `/dns-query`. - -## Reverse proxy - -You need to deploy a reverse proxy with a valid TLS server certificate -for clients to be able to authenticate the target or proxy. - -The simplest option for this is using [Caddy](https://caddyserver.com). -Caddy will automatically provision a TLS certificate using ACME from [Let's Encrypt](https://letsencrypt.org). - -For instance: - -``` -caddy reverse-proxy --from https://odoh.example.net:443 --to 127.0.0.1:8080 -``` - -Alternatively, use a Caddyfile similar to: - -``` -odoh.example.net - -reverse_proxy localhost:8080 -``` -and run `caddy start`. +This fork includes changes for a server suited to Emerald Onion's production deployment. From f333972522c75093d1db7753df953ef103be53bd Mon Sep 17 00:00:00 2001 From: Nate Sales Date: Tue, 20 Apr 2021 18:17:30 -0700 Subject: [PATCH 12/61] ci: fix tests from fork --- .github/workflows/test.yml | 41 ++++++++++---------------------------- 1 file changed, 10 insertions(+), 31 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 33d1b9d..c2763ee 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,41 +7,20 @@ on: branches: [ master ] jobs: - build: name: Build runs-on: ubuntu-latest steps: + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: ^1.14 - - name: Set up Go 1.x - uses: actions/setup-go@v2 - with: - go-version: ^1.13 - - - name: Check out code into the Go module directory - uses: actions/checkout@v2 - - - name: Get dependencies - run: | - go get -v -t -d ./... - if [ -f Gopkg.toml ]; then - curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh - dep ensure - fi - - - name: Build - run: go build -v ./... + - name: Check out code into the Go module directory + uses: actions/checkout@v2 - - name: Test - run: go test -v -race -covermode atomic -coverprofile=covprofile ./... + - name: Build + run: go build -v ./... - - name: Install goveralls - env: - GO111MODULE: off - run: go get github.com/mattn/goveralls - - - name: Send coverage - env: - COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: $(go env GOPATH)/bin/goveralls -coverprofile=covprofile -service=github - + - name: Test + run: go test -v -race -covermode atomic -coverprofile=covprofile ./... From 178566a0b2c738892cfc263697469b2efe14e2d4 Mon Sep 17 00:00:00 2001 From: Nate Sales Date: Tue, 20 Apr 2021 18:20:43 -0700 Subject: [PATCH 13/61] tests: target test consistency --- target_test.go | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/target_test.go b/target_test.go index 51ef0c1..865bf17 100644 --- a/target_test.go +++ b/target_test.go @@ -156,6 +156,7 @@ func TestConfigHandler(t *testing.T) { t.Fatal("Received invalid config") } } + func TestQueryHandlerInvalidContentType(t *testing.T) { r := createLocalResolver(t) target := createTarget(t, r) @@ -405,7 +406,7 @@ func TestQueryHandlerODoHWithMalformedQuery(t *testing.T) { // malformed odoh query queryBytes := []byte{1, 2, 3} - request, err := http.NewRequest(http.MethodPost, queryEndpoint, bytes.NewReader(queryBytes)) + request, err := http.NewRequest(http.MethodPost, "/dns-query", bytes.NewReader(queryBytes)) if err != nil { t.Fatal(err) } @@ -415,7 +416,7 @@ func TestQueryHandlerODoHWithMalformedQuery(t *testing.T) { handler.ServeHTTP(rr, request) if status := rr.Result().StatusCode; status != http.StatusBadRequest { - t.Fatal(fmt.Errorf("Result did not yield %d, got %d instead", http.StatusBadRequest, status)) + t.Fatal(fmt.Errorf("result did not yield %d, got %d instead", http.StatusBadRequest, status)) } } @@ -435,7 +436,7 @@ func TestODoHResolutionWithRealResolver(t *testing.T) { t.Fatal(err) } - request, err := http.NewRequest(http.MethodPost, queryEndpoint, bytes.NewReader(encryptedQuery.Marshal())) + request, err := http.NewRequest(http.MethodPost, "/dns-query", bytes.NewReader(encryptedQuery.Marshal())) if err != nil { t.Fatal(err) } @@ -445,10 +446,10 @@ func TestODoHResolutionWithRealResolver(t *testing.T) { handler.ServeHTTP(rr, request) if status := rr.Result().StatusCode; status != http.StatusBadRequest { - t.Fatal(fmt.Errorf("Result did not yield %d, got %d instead", http.StatusBadRequest, status)) + t.Fatal(fmt.Errorf("result did not yield %d, got %d instead", http.StatusBadRequest, status)) } - handler = http.HandlerFunc(target.targetQueryHandler) + handler = target.targetQueryHandler // valid dns query q := new(dns.Msg) @@ -457,13 +458,13 @@ func TestODoHResolutionWithRealResolver(t *testing.T) { if err != nil { t.Fatal(err) } - obliviousQuery = odoh.CreateObliviousDNSQuery([]byte(packedQuery), 0) + obliviousQuery = odoh.CreateObliviousDNSQuery(packedQuery, 0) encryptedQuery, _, err = target.odohKeyPair.Config.Contents.EncryptQuery(obliviousQuery) if err != nil { t.Fatal(err) } - request, err = http.NewRequest(http.MethodPost, queryEndpoint, bytes.NewReader(encryptedQuery.Marshal())) + request, err = http.NewRequest(http.MethodPost, "/dns-query", bytes.NewReader(encryptedQuery.Marshal())) if err != nil { t.Fatal(err) } @@ -473,7 +474,7 @@ func TestODoHResolutionWithRealResolver(t *testing.T) { handler.ServeHTTP(rr, request) if status := rr.Result().StatusCode; status != http.StatusOK { - t.Fatal(fmt.Errorf("Result did not yield %d, got %d instead", http.StatusOK, status)) + t.Fatal(fmt.Errorf("result did not yield %d, got %d instead", http.StatusOK, status)) } if rr.Result().Header.Get("Content-Type") != odohMessageContentType { t.Fatal("Invalid content type response") From 3992a081e2afeff54aa2002903e508d9b4747bcb Mon Sep 17 00:00:00 2001 From: Nate Sales Date: Tue, 20 Apr 2021 18:21:23 -0700 Subject: [PATCH 14/61] rename master to main --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c2763ee..c76a675 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,9 +2,9 @@ name: Build and Test on: push: - branches: [ master ] + branches: [ main ] pull_request: - branches: [ master ] + branches: [ main ] jobs: build: From b34be968c9ff0d35fda869dfce7949d43ac8d932 Mon Sep 17 00:00:00 2001 From: Nate Sales Date: Tue, 20 Apr 2021 18:27:14 -0700 Subject: [PATCH 15/61] testing: fix resolver slice --- target_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target_test.go b/target_test.go index 865bf17..02141fd 100644 --- a/target_test.go +++ b/target_test.go @@ -119,7 +119,7 @@ func createKeyPair(t *testing.T) odoh.ObliviousDoHKeyPair { func createTarget(t *testing.T, r resolver) targetServer { return targetServer{ - resolver: []resolver{r}, + resolver: r, odohKeyPair: createKeyPair(t), telemetryClient: getTelemetryInstance("LOG"), } From 66bb82fd72bad911db44cabff9eabc3ddcf86c5e Mon Sep 17 00:00:00 2001 From: Nate Sales Date: Tue, 20 Apr 2021 18:27:55 -0700 Subject: [PATCH 16/61] fix error handling --- proxy_test.go | 42 +++++++++++++++++++++++++----------------- resolver.go | 10 +++++++--- 2 files changed, 32 insertions(+), 20 deletions(-) diff --git a/proxy_test.go b/proxy_test.go index 3a221e4..e713ecd 100644 --- a/proxy_test.go +++ b/proxy_test.go @@ -30,6 +30,8 @@ import ( "net/url" "strings" "testing" + + log "github.com/sirupsen/logrus" ) type testTarget struct { @@ -45,7 +47,10 @@ func (t testTarget) handleRequest(w http.ResponseWriter, r *http.Request) { headerContentType := r.Header.Get("Content-Type") w.Header().Set("Content-Type", headerContentType) - w.Write(body) + _, err = w.Write(body) + if err != nil { + log.Warn(err) + } } func TestProxyMethod(t *testing.T) { @@ -64,10 +69,10 @@ func TestProxyMethod(t *testing.T) { handler.ServeHTTP(rr, request) if status := rr.Code; status != http.StatusBadRequest { - t.Fatal(fmt.Errorf("Failed when sent an invalid request method. Expected %d, got %d", http.StatusBadRequest, status)) + t.Fatal(fmt.Errorf("failed when sent an invalid request method. Expected %d, got %d", http.StatusBadRequest, status)) } if proxy.lastError != errWrongMethod { - t.Fatal(fmt.Errorf("Incorrect error. Expected %s", errWrongMethod.Error())) + t.Fatal(fmt.Errorf("incorrect error, expected %s", errWrongMethod.Error())) } } @@ -84,8 +89,8 @@ func TestProxyQueryParametersMissing(t *testing.T) { "/dns-query?targethost=", "/dns-query?targetpath=bar", } - for _, url := range testURLs { - request, err := http.NewRequest("POST", url, fakeQueryBody) + for _, testUrl := range testURLs { + request, err := http.NewRequest("POST", testUrl, fakeQueryBody) if err != nil { t.Fatal(err) } @@ -94,10 +99,10 @@ func TestProxyQueryParametersMissing(t *testing.T) { handler.ServeHTTP(rr, request) if status := rr.Code; status != http.StatusBadRequest { - t.Fatal(fmt.Errorf("Failed when sent invalid parameters. Expected %d, got %d", http.StatusBadRequest, status)) + t.Fatal(fmt.Errorf("failed when sent invalid parameters. Expected %d, got %d", http.StatusBadRequest, status)) } if proxy.lastError != errMissingTargetHost { - t.Fatal(fmt.Errorf("Incorrect error. Expected %s", errMissingTargetHost.Error())) + t.Fatal(fmt.Errorf("incorrect error, expected %s", errMissingTargetHost.Error())) } } @@ -105,8 +110,8 @@ func TestProxyQueryParametersMissing(t *testing.T) { "/dns-query?targethost=foo", "/dns-query?targethost=foo&targetpath=", } - for _, url := range testURLs { - request, err := http.NewRequest("POST", url, fakeQueryBody) + for _, testUrl := range testURLs { + request, err := http.NewRequest("POST", testUrl, fakeQueryBody) if err != nil { t.Fatal(err) } @@ -115,10 +120,10 @@ func TestProxyQueryParametersMissing(t *testing.T) { handler.ServeHTTP(rr, request) if status := rr.Code; status != http.StatusBadRequest { - t.Fatal(fmt.Errorf("Failed when sent invalid parameters. Expected %d, got %d", http.StatusBadRequest, status)) + t.Fatal(fmt.Errorf("failed when sent invalid parameters. Expected %d, got %d", http.StatusBadRequest, status)) } if proxy.lastError != errMissingTargetPath { - t.Fatal(fmt.Errorf("Incorrect error. Expected %s", errMissingTargetPath.Error())) + t.Fatal(fmt.Errorf("incorrect error, expected %s", errMissingTargetPath.Error())) } } } @@ -138,10 +143,10 @@ func TestProxyQueryMissingBody(t *testing.T) { handler.ServeHTTP(rr, request) if status := rr.Code; status != http.StatusBadRequest { - t.Fatal(fmt.Errorf("Failed when sent invalid parameters. Expected %d, got %d", http.StatusBadRequest, status)) + t.Fatal(fmt.Errorf("failed when sent invalid parameters. Expected %d, got %d", http.StatusBadRequest, status)) } if proxy.lastError != errEmptyRequestBody { - t.Fatal(fmt.Errorf("Incorrect error. Expected %s", errEmptyRequestBody.Error())) + t.Fatal(fmt.Errorf("incorrect error, expected %s", errEmptyRequestBody.Error())) } } @@ -164,13 +169,16 @@ func TestProxyIncorrectTarget(t *testing.T) { handler.ServeHTTP(rr, request) if status := rr.Code; status != http.StatusInternalServerError { - t.Fatal(fmt.Errorf("Failed to propagate the desired error code. Expected %d, got %d", http.StatusInternalServerError, status)) + t.Fatal(fmt.Errorf("failed to propagate the desired error code. Expected %d, got %d", http.StatusInternalServerError, status)) } } func TestProxyStatusCodePropagationOK(t *testing.T) { ts := httptest.NewTLSServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - fmt.Fprintln(w, "OK") + _, err := fmt.Fprintln(w, "OK") + if err != nil { + t.Fatal(err) + } })) defer ts.Close() @@ -198,7 +206,7 @@ func TestProxyStatusCodePropagationOK(t *testing.T) { handler.ServeHTTP(rr, request) if status := rr.Code; status != http.StatusOK { - t.Fatal(fmt.Errorf("Failed to propagate the desired error code. Expected %d, got %d", http.StatusOK, status)) + t.Fatal(fmt.Errorf("failed to propagate the desired error code. Expected %d, got %d", http.StatusOK, status)) } } @@ -233,6 +241,6 @@ func TestProxyStatusCodePropagationFailure(t *testing.T) { handler.ServeHTTP(rr, request) if status := rr.Code; status != expectedFailure { - t.Fatal(fmt.Errorf("Failed to propagate the desired error code. Expected %d, got %d", expectedFailure, status)) + t.Fatal(fmt.Errorf("failed to propagate the desired error code. Expected %d, got %d", expectedFailure, status)) } } diff --git a/resolver.go b/resolver.go index 439899a..8d15791 100644 --- a/resolver.go +++ b/resolver.go @@ -48,11 +48,15 @@ func (s targetResolver) resolve(query *dns.Msg) (*dns.Msg, error) { connection := new(dns.Conn) var err error if connection.Conn, err = net.DialTimeout("tcp", s.nameserver, s.timeout*time.Millisecond); err != nil { - return nil, fmt.Errorf("Failed starting resolver connection") + return nil, fmt.Errorf("failed starting resolver connection") } - connection.SetReadDeadline(time.Now().Add(s.timeout * time.Millisecond)) - connection.SetWriteDeadline(time.Now().Add(s.timeout * time.Millisecond)) + if err = connection.SetReadDeadline(time.Now().Add(s.timeout * time.Millisecond)); err != nil { + return nil, err + } + if err = connection.SetWriteDeadline(time.Now().Add(s.timeout * time.Millisecond)); err != nil { + return nil, err + } if err := connection.WriteMsg(query); err != nil { return nil, err From 71c9895cfb4dd6d0701abf079dcf28af71d4f9e2 Mon Sep 17 00:00:00 2001 From: Nate Sales Date: Tue, 20 Apr 2021 18:33:15 -0700 Subject: [PATCH 17/61] fix incorrect status code in test --- target_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target_test.go b/target_test.go index 02141fd..f38c2fd 100644 --- a/target_test.go +++ b/target_test.go @@ -364,7 +364,7 @@ func TestQueryHandlerODoHWithInvalidKey(t *testing.T) { rr := httptest.NewRecorder() handler.ServeHTTP(rr, request) - if status := rr.Result().StatusCode; status != http.StatusBadRequest { + if status := rr.Result().StatusCode; status != http.StatusUnauthorized { t.Fatal(fmt.Errorf("result did not yield %d, got %d instead", http.StatusBadRequest, status)) } } From f8d8dd3353a451fdb7de65c30be8d4421acc8b54 Mon Sep 17 00:00:00 2001 From: Nate Sales Date: Tue, 20 Apr 2021 21:18:44 -0700 Subject: [PATCH 18/61] bump module versions --- go.mod | 14 ++--- go.sum | 161 +++++++++++++++++++++++++++++++++++++++++---------------- 2 files changed, 124 insertions(+), 51 deletions(-) diff --git a/go.mod b/go.mod index 9617245..b87bcfd 100644 --- a/go.mod +++ b/go.mod @@ -1,13 +1,13 @@ -module github.com/cloudflare/odoh-server-go +module github.com/emeraldonion/odoh-server-go -go 1.14 +go 1.16 require ( - cloud.google.com/go/logging v1.1.1 - github.com/cisco/go-hpke v0.0.0-20201215202025-9cebdf8f33d4 - github.com/cloudflare/odoh-go v0.1.4 - github.com/elastic/go-elasticsearch/v8 v8.0.0-20201022194115-1af099fb3eca + cloud.google.com/go/logging v1.4.0 + github.com/cisco/go-hpke v0.0.0-20210215210317-01c430f1f302 + github.com/cloudflare/odoh-go v0.1.6 + github.com/elastic/go-elasticsearch/v8 v8.0.0-20210420155627-a38c8f51b628 github.com/jessevdk/go-flags v1.5.0 - github.com/miekg/dns v1.1.35 + github.com/miekg/dns v1.1.41 github.com/sirupsen/logrus v1.8.1 ) diff --git a/go.sum b/go.sum index 0465369..10bac98 100644 --- a/go.sum +++ b/go.sum @@ -13,8 +13,12 @@ cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKV cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go v0.70.0 h1:ujhG1RejZYi+HYfJNlgBh3j/bVKD8DewM7AkJ5UPyBc= -cloud.google.com/go v0.70.0/go.mod h1:/UTKYRQTWjVnSe7nGvoSzxEFUELzSI/yAYd0JQT6cRo= +cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= +cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= +cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= +cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= +cloud.google.com/go v0.81.0 h1:at8Tk2zUz63cLPR0JPWm5vp77pEZmzxEQBEfRKn1VV8= +cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= @@ -23,8 +27,8 @@ cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4g cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/logging v1.1.1 h1:mU+6wZyP0llWyobJ+aJFqeEfDzMp95R449wEPPILVX0= -cloud.google.com/go/logging v1.1.1/go.mod h1:oShOorPr2XGlPEXXI9VUJQH10md4lW25RYpSJjhE0TM= +cloud.google.com/go/logging v1.4.0 h1:suMj8d7qzDC9Gzm14aBQGWYZl6TGVz9SyOJDxLN3kNE= +cloud.google.com/go/logging v1.4.0/go.mod h1:FKOKd0UX2KtN01HZbMlVug72OgiX27ZE8AG4lktFnGo= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= @@ -33,7 +37,6 @@ cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiy cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0 h1:STgFzyU5/8miMl0//zKh2aQeTyeaUH3WN9bSUiJ09bA= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= git.schwanenlied.me/yawning/x448.git v0.0.0-20170617130356-01b048fb03d6 h1:w8IZgCntCe0RuBJp+dENSMwEBl/k8saTgJ5hPca5IWw= @@ -44,24 +47,29 @@ github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/cisco/go-hpke v0.0.0-20201215202025-9cebdf8f33d4 h1:vucWGQEsuhekt2bY29mxEdaqdGpb7Ij1eio6actPzP4= -github.com/cisco/go-hpke v0.0.0-20201215202025-9cebdf8f33d4/go.mod h1:RSsoIHRMBe69FbF/fIbmWYa3rrC6vuPyC0MbNUpel3Q= +github.com/cisco/go-hpke v0.0.0-20210215210317-01c430f1f302 h1:unAbn7dpE8eeUfWRaOPl1qTfffhIcCNuKQuECGNGWtk= +github.com/cisco/go-hpke v0.0.0-20210215210317-01c430f1f302/go.mod h1:RSsoIHRMBe69FbF/fIbmWYa3rrC6vuPyC0MbNUpel3Q= github.com/cisco/go-tls-syntax v0.0.0-20200617162716-46b0cfb76b9b h1:Ves2turKTX7zruivAcUOQg155xggcbv3suVdbKCBQNM= github.com/cisco/go-tls-syntax v0.0.0-20200617162716-46b0cfb76b9b/go.mod h1:0AZAV7lYvynZQ5ErHlGMKH+4QYMyNCFd+AiL9MlrCYA= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cloudflare/circl v1.0.0 h1:64b6pyfCFbYm623ncIkYGNZaOcmIbyd+CjyMi2L9vdI= github.com/cloudflare/circl v1.0.0/go.mod h1:MhjB3NEEhJbTOdLLq964NIUisXDxaE1WkQPUxtgZXiY= -github.com/cloudflare/odoh-go v0.1.4 h1:z+7+4bFZjk78NUqlw6WKZXhQaOsv2dUUyeQCiczWjU8= -github.com/cloudflare/odoh-go v0.1.4/go.mod h1:SDBrEsRyq5fhkqOqKH5EbOjG4yA+Azx4UOgpaxlQU5k= +github.com/cloudflare/odoh-go v0.1.6 h1:siTTv/pBXztJORDgVNDAYKdTboenwWFMDD1B9YQHkag= +github.com/cloudflare/odoh-go v0.1.6/go.mod h1:J3Doz827YDYvz4hEmJU6q45hRFOqxUBL6NRUuEfjMxA= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/elastic/go-elasticsearch/v8 v8.0.0-20201022194115-1af099fb3eca h1:bQtWepJpVTzze/AcH7r9riu3hAHgjNkIQNePw7gyVu4= -github.com/elastic/go-elasticsearch/v8 v8.0.0-20201022194115-1af099fb3eca/go.mod h1:xe9a/L2aeOgFKKgrO3ibQTnMdpAeL0GC+5/HpGScSa4= +github.com/elastic/go-elasticsearch/v8 v8.0.0-20210420155627-a38c8f51b628 h1:LRgnb2UHW/hSSD1kJ923TTZeVGnKY6k2c/l4Cyraluc= +github.com/elastic/go-elasticsearch/v8 v8.0.0-20210420155627-a38c8f51b628/go.mod h1:xe9a/L2aeOgFKKgrO3ibQTnMdpAeL0GC+5/HpGScSa4= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= +github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -78,6 +86,7 @@ github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -91,8 +100,11 @@ github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:W github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= +github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -102,12 +114,14 @@ github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.2 h1:X2ev0eStA3AbceY54o37/0PQ/UWqKEiiO2dKL5OPaFM= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= +github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.0.0 h1:pMen7vLs8nvgEYhywH3KDWJIJTeEr2ULsVWHWYHQyBs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= @@ -115,8 +129,12 @@ github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20201009210932-67992a1a5a35/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= @@ -130,13 +148,11 @@ github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1 github.com/jstemmer/go-junit-report v0.9.1 h1:6QPYqodiu3GuPL+7mfx+NwDdp2eTkp9IfEUpgAwUN0o= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/miekg/dns v1.1.35 h1:oTfOaDH+mZkdcgdIjH6yBajRGtIwcwcaR+rt23ZSrJs= -github.com/miekg/dns v1.1.35/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= +github.com/miekg/dns v1.1.41 h1:WMszZWJG0XmzbK9FEmzH2TVcqYzFesusSIB41b8KHxY= +github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -146,6 +162,7 @@ github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -157,15 +174,17 @@ go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.5 h1:dntmOdLpSpHlVqbW5Eay97DelsZHe+55D+xC6i0dDS0= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= +go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= +go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a h1:vclmkQCjlDX5OydZ9wv8rBCcS0QyQY66Mpf/7BZbInM= golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83 h1:/ZScEX8SfEmUGRHs0gxpqteO5nfNW6axyZbBdw9A12g= +golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -187,8 +206,9 @@ golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b h1:Wh+f8QHJXR411sJR8/vRBTZ7YapZaRvUcLFFJhusH0k= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5 h1:2M3HP5CCK1Si9FQhwnzYhXdG6DXeebvUHFpre8QvbyI= +golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= @@ -196,8 +216,10 @@ golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.1 h1:Kvvh58BN8Y9/lBi7hTekvtMpm07eUZ0ck5pRHpsMWrY= +golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -210,7 +232,6 @@ golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -225,15 +246,28 @@ golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/ golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20201010224723-4f7140c49acb h1:mUVeFHoDKis5nxCAzoAi7E8Ghb86EXh/RK6wtvJIqRY= -golang.org/x/net v0.0.0-20201010224723-4f7140c49acb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4 h1:b0LrWgu8+q7z4J+0Y3Umo5q1dL7NXBkKBWkaVkAq17E= +golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43 h1:ld7aEMNHoBnnDAX15v1T6z31v8HwR2A9FYOuAhWqkwc= golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210413134643-5e61552d6c78 h1:rPRtHfUb0UKZeZ6GH4K4Nt4YRbE9V1u+QZX5upZXqJQ= +golang.org/x/oauth2 v0.0.0-20210413134643-5e61552d6c78/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -241,8 +275,11 @@ golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208 h1:qwRHBd0NqMbJxfbotnDhm2ByMI1Shq4Y6oRJo21SGJA= golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -253,7 +290,6 @@ golang.org/x/sys v0.0.0-20190602015325-4c4f7f33c9ed/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -273,14 +309,27 @@ golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4 h1:EZ2mChiOa8udjfp6rRmswTbtZN/QzUQp4ptM4rnjHvc= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57 h1:F5Gozwx4I1xtr/sr/8CFbb57iKi3297KFs0QDbGN60A= +golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.5 h1:i6eZZ+zk0SOf0xgBpEpPD18qWcJda6q1sxt3S0kzyUQ= +golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -304,7 +353,6 @@ golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216052735-49a3e744a425/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= @@ -326,8 +374,12 @@ golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= -golang.org/x/tools v0.0.0-20201017001424-6003fad69a88 h1:ZB1XYzdDo7c/O48jzjMkvIjnC120Z9/CwgDWhePjQdQ= -golang.org/x/tools v0.0.0-20201017001424-6003fad69a88/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= +golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.0 h1:po9/4sTYwZU9lPhi1tOrb4hCv3qrhiQ77LZfGa2OjwY= +golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -349,15 +401,21 @@ google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0M google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/api v0.33.0 h1:+gL0XvACeMIvpwLZ5rQZzLn5cwOsgg8dIcfJ2SYfBVw= -google.golang.org/api v0.33.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= +google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= +google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= +google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= +google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= +google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= +google.golang.org/api v0.44.0 h1:URs6qR1lAxDsqWITsQXI4ZkGiYJ5dHtRNiCpfs2OeKA= +google.golang.org/api v0.44.0/go.mod h1:EBOGZqzyhtvMDoxwS97ctnh0zUmYY6CxqXsc1AvkYD8= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6 h1:lMO5rYAqUxkmaj76jAkRUvt5JZgFymx/+Q5Mzfivuhc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= +google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -388,8 +446,17 @@ google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154 h1:bFFRpT+e8JJVY7lMMfvezL1ZIwqiwmPl2bsE2yx4HqM= -google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= +google.golang.org/genproto v0.0.0-20210413151531-c14fb6ef47c3 h1:K+7Ig5hjiLVA/i1UFUUbCGimWz5/Ey0lAQjT3QiLaPY= +google.golang.org/genproto v0.0.0-20210413151531-c14fb6ef47c3/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -403,8 +470,13 @@ google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3Iji google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.32.0 h1:zWTV+LMdc3kaiJMSTOFz2UgSBgx8RNQoTGiZu3fR9S0= -google.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= +google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= +google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.37.0 h1:uSZWeQJX5j11bIQ4AJoj+McDBo29cY1MCoC1wO3ts+c= +google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -414,10 +486,11 @@ google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2 google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= -google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0 h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/lk= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= From 3621823f0e90d09ad932aeebbf1d145f32246082 Mon Sep 17 00:00:00 2001 From: Nate Sales Date: Tue, 20 Apr 2021 21:19:00 -0700 Subject: [PATCH 19/61] pass verbose flag into targetServer --- odoh_server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/odoh_server.go b/odoh_server.go index 9907e9f..3481429 100644 --- a/odoh_server.go +++ b/odoh_server.go @@ -83,7 +83,7 @@ func main() { } target := &targetServer{ - verbose: false, + verbose: opts.Verbose, resolver: &targetResolver{ timeout: 2500 * time.Millisecond, nameserver: opts.Resolver, From 89f8fb0e61b7190e1d4c86d636fa9342490fa60b Mon Sep 17 00:00:00 2001 From: Nate Sales Date: Tue, 20 Apr 2021 21:22:25 -0700 Subject: [PATCH 20/61] replace verbose bool with logging debug level --- odoh_server.go | 2 +- target.go | 21 +++++---------------- 2 files changed, 6 insertions(+), 17 deletions(-) diff --git a/odoh_server.go b/odoh_server.go index 3481429..63314b2 100644 --- a/odoh_server.go +++ b/odoh_server.go @@ -68,6 +68,7 @@ func main() { if //noinspection GoBoolExpressions version == "devel" || opts.Verbose { log.SetLevel(log.DebugLevel) + log.Debugln("Verbose logging enabled") } // Random seed for HPKE keypair @@ -83,7 +84,6 @@ func main() { } target := &targetServer{ - verbose: opts.Verbose, resolver: &targetResolver{ timeout: 2500 * time.Millisecond, nameserver: opts.Resolver, diff --git a/target.go b/target.go index ab00d2d..b81aec6 100644 --- a/target.go +++ b/target.go @@ -38,7 +38,6 @@ import ( ) type targetServer struct { - verbose bool resolver resolver odohKeyPair odoh.ObliviousDoHKeyPair telemetryClient *telemetry @@ -100,9 +99,7 @@ func (s *targetServer) resolveQueryWithResolver(q *dns.Msg, r resolver) ([]byte, return nil, err } - if s.verbose { - log.Printf("Query=%s\n", packedQuery) - } + log.Debugf("Query=%s\n", packedQuery) start := time.Now() response, err := r.resolve(q) @@ -125,9 +122,7 @@ func (s *targetServer) resolveQueryWithResolver(q *dns.Msg, r resolver) ([]byte, return nil, errors.New(errMsg) } - if s.verbose { - log.Printf("Answer=%s elapsed=%s\n", packedResponse, elapsed.String()) - } + log.Debugf("Answer=%s elapsed=%s\n", packedResponse, elapsed.String()) return packedResponse, err } @@ -204,9 +199,7 @@ func (s *targetServer) createObliviousResponseForQuery(context odoh.ResponseCont return odoh.ObliviousDNSMessage{}, err } - if s.verbose { - log.Printf("Encrypted response: %x", odohResponse) - } + log.Debugf("Encrypted response: %x", odohResponse) return odohResponse, err } @@ -282,9 +275,7 @@ func (s *targetServer) odohQueryHandler(w http.ResponseWriter, r *http.Request) answerEncryptionAndSerializeCompletionTime := time.Now().UnixNano() timestamp.TargetAnswerEncryptionTime = answerEncryptionAndSerializeCompletionTime - if s.verbose { - log.Printf("Target response: %x", packedResponseMessage) - } + log.Debugf("target response: %x", packedResponseMessage) returnResponseTime := time.Now().UnixNano() timestamp.EndTime = returnResponseTime @@ -307,9 +298,7 @@ func (s *targetServer) odohQueryHandler(w http.ResponseWriter, r *http.Request) } func (s *targetServer) targetQueryHandler(w http.ResponseWriter, r *http.Request) { - if s.verbose { - log.Printf("%s Handling %s\n", r.Method, r.URL.Path) - } + log.Debugf("%s Handling %s\n", r.Method, r.URL.Path) if r.Header.Get("Content-Type") == dnsMessageContentType { s.dohQueryHandler(w, r) From cc42f5ae31cc092cf5a67d35eec179a2dc4d2522 Mon Sep 17 00:00:00 2001 From: Nate Sales Date: Tue, 20 Apr 2021 21:22:30 -0700 Subject: [PATCH 21/61] cleanup Makefile --- Makefile | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index 8af560c..217fd86 100644 --- a/Makefile +++ b/Makefile @@ -1,17 +1,7 @@ +all: test build + test: go test ./... -all: +build: go build -o odoh-server - -logs-target: - gcloud app logs tail -s odoh-target - -logs-proxy: - gcloud app logs tail -s odoh-proxy - -deploy-target: - gcloud app deploy --stop-previous-version target.yaml - -deploy-proxy: - gcloud app deploy --stop-previous-version proxy.yaml \ No newline at end of file From 160d0bba0950c3c325649da2a230d4967b26b85e Mon Sep 17 00:00:00 2001 From: Nate Sales Date: Tue, 20 Apr 2021 21:25:48 -0700 Subject: [PATCH 22/61] remove target telemetry --- target.go | 67 +---------------------- target_test.go | 5 +- telemetry.go | 146 ------------------------------------------------- 3 files changed, 3 insertions(+), 215 deletions(-) delete mode 100644 telemetry.go diff --git a/target.go b/target.go index b81aec6..12e14c4 100644 --- a/target.go +++ b/target.go @@ -40,7 +40,6 @@ import ( type targetServer struct { resolver resolver odohKeyPair odoh.ObliviousDoHKeyPair - telemetryClient *telemetry serverInstanceName string experimentId string } @@ -128,22 +127,12 @@ func (s *targetServer) resolveQueryWithResolver(q *dns.Msg, r resolver) ([]byte, } func (s *targetServer) dohQueryHandler(w http.ResponseWriter, r *http.Request) { - requestReceivedTime := time.Now() - exp := experiment{} - exp.ExperimentID = s.experimentId - exp.IngestedFrom = s.serverInstanceName - exp.ProtocolType = "ClearText-ODOH" - exp.RequestID = nil - timestamp := runningTime{} - - timestamp.Start = requestReceivedTime.UnixNano() query, err := s.parseQueryFromRequest(r) if err != nil { log.Println("Failed parsing request:", err) http.Error(w, http.StatusText(http.StatusBadRequest), http.StatusBadRequest) return } - timestamp.TargetQueryDecryptionTime = time.Now().UnixNano() packedResponse, err := s.resolveQueryWithResolver(query, s.resolver) if err != nil { @@ -151,20 +140,6 @@ func (s *targetServer) dohQueryHandler(w http.ResponseWriter, r *http.Request) { http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError) return } - endTime := time.Now().UnixNano() - timestamp.TargetQueryResolutionTime = endTime - timestamp.TargetAnswerEncryptionTime = endTime - timestamp.EndTime = endTime - - exp.Timestamp = timestamp - exp.Resolver = s.resolver.name() - exp.Status = true - - if s.telemetryClient.logClient != nil { - go s.telemetryClient.streamTelemetryToGCPLogging([]string{exp.serialize()}) - } else if s.telemetryClient.esClient != nil { - go s.telemetryClient.streamDataToElastic([]string{exp.serialize()}) - } w.Header().Set("Content-Type", dnsMessageContentType) _, err = w.Write(packedResponse) @@ -205,14 +180,6 @@ func (s *targetServer) createObliviousResponseForQuery(context odoh.ResponseCont } func (s *targetServer) odohQueryHandler(w http.ResponseWriter, r *http.Request) { - requestReceivedTime := time.Now() - exp := experiment{} - exp.ExperimentID = s.experimentId - exp.IngestedFrom = s.serverInstanceName - exp.ProtocolType = "ODOH" - timestamp := runningTime{} - - timestamp.Start = requestReceivedTime.UnixNano() odohMessage, err := s.parseObliviousQueryFromRequest(r) if err != nil { log.Println("parseObliviousQueryFromRequest failed:", err) @@ -241,9 +208,6 @@ func (s *targetServer) odohQueryHandler(w http.ResponseWriter, r *http.Request) return } - queryParseAndDecryptionCompleteTime := time.Now().UnixNano() - timestamp.TargetQueryDecryptionTime = queryParseAndDecryptionCompleteTime - packedResponse, err := s.resolveQueryWithResolver(query, s.resolver) if err != nil { log.Println("resolveQueryWithResolver failed:", err) @@ -251,46 +215,17 @@ func (s *targetServer) odohQueryHandler(w http.ResponseWriter, r *http.Request) return } - queryResolutionCompleteTime := time.Now().UnixNano() - timestamp.TargetQueryResolutionTime = queryResolutionCompleteTime - obliviousResponse, err := s.createObliviousResponseForQuery(responseContext, packedResponse) if err != nil { log.Println("createObliviousResponseForQuery failed:", err) - timestamp.TargetAnswerEncryptionTime = 0 - timestamp.EndTime = 0 - exp.Timestamp = timestamp - exp.Status = false - exp.Resolver = "" - if s.telemetryClient.logClient != nil { - go s.telemetryClient.streamTelemetryToGCPLogging([]string{exp.serialize()}) - } else if s.telemetryClient.esClient != nil { - go s.telemetryClient.streamDataToElastic([]string{exp.serialize()}) - } http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError) return } packedResponseMessage := obliviousResponse.Marshal() - - answerEncryptionAndSerializeCompletionTime := time.Now().UnixNano() - timestamp.TargetAnswerEncryptionTime = answerEncryptionAndSerializeCompletionTime - log.Debugf("target response: %x", packedResponseMessage) - returnResponseTime := time.Now().UnixNano() - timestamp.EndTime = returnResponseTime - - exp.Timestamp = timestamp - exp.Resolver = s.resolver.name() - exp.Status = true - - if s.telemetryClient.logClient != nil { - go s.telemetryClient.streamTelemetryToGCPLogging([]string{exp.serialize()}) - } else if s.telemetryClient.esClient != nil { - go s.telemetryClient.streamDataToElastic([]string{exp.serialize()}) - } - w.Header().Set("Content-Type", odohMessageContentType) + log.Debug("sending packedResponseMessage") _, err = w.Write(packedResponseMessage) if err != nil { log.Warn(err) diff --git a/target_test.go b/target_test.go index f38c2fd..2410d89 100644 --- a/target_test.go +++ b/target_test.go @@ -119,9 +119,8 @@ func createKeyPair(t *testing.T) odoh.ObliviousDoHKeyPair { func createTarget(t *testing.T, r resolver) targetServer { return targetServer{ - resolver: r, - odohKeyPair: createKeyPair(t), - telemetryClient: getTelemetryInstance("LOG"), + resolver: r, + odohKeyPair: createKeyPair(t), } } diff --git a/telemetry.go b/telemetry.go deleted file mode 100644 index 62502f6..0000000 --- a/telemetry.go +++ /dev/null @@ -1,146 +0,0 @@ -// The MIT License -// -// Copyright (c) 2020, Cloudflare, Inc. All rights reserved. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -package main - -import ( - "cloud.google.com/go/logging" - "context" - "encoding/json" - "github.com/elastic/go-elasticsearch/v8" - "github.com/elastic/go-elasticsearch/v8/esapi" - "log" - "net/http" - "strings" - "sync" -) - -// This runningTime structure contains the epoch timestamps for the following operations -// 1. Start => Epoch time at which the request is received by the ObliviousDNSHandler -// 2. TargetQueryDecryptionTime => Epoch -type runningTime struct { - Start int64 - TargetQueryDecryptionTime int64 - TargetQueryResolutionTime int64 - TargetAnswerEncryptionTime int64 - EndTime int64 -} - -type experiment struct { - RequestID []byte - Resolver string - Timestamp runningTime - Status bool - IngestedFrom string - ExperimentID string - ProtocolType string -} - -func (e *experiment) serialize() string { - exp := &e - response, err := json.Marshal(exp) - if err != nil { - log.Printf("Unable to log the information correctly.") - } - return string(response) -} - -type telemetry struct { - sync.RWMutex - esClient *elasticsearch.Client - buffer []string - logClient *logging.Client - cloudlogger *logging.Logger -} - -const ( - INDEX = "server_telemetry" - TYPE = "client_localhost" -) - -var telemetryInstance telemetry - -func getTelemetryInstance(telemetryType string) *telemetry { - var err error - if telemetryType == "ELK" { - elasticsearchTransport := elasticsearch.Config{ - Addresses: []string{ - "http://localhost:9200", - }, - Transport: &http.Transport{ - MaxIdleConnsPerHost: 1024, - }, - } - telemetryInstance.esClient, err = elasticsearch.NewClient(elasticsearchTransport) - if err != nil { - log.Fatalf("Unable to create an elasticsearch client connection.") - } - } else if telemetryType == "GCP" { - ctx := context.Background() - projectID := "odoh-target" - telemetryInstance.logClient, err = logging.NewClient(ctx, projectID) - if err != nil { - log.Fatalf("Unable to create a logging instance to Google Cloud %v", err) - } - logName := "odohserver-gcp" - telemetryInstance.cloudlogger = telemetryInstance.logClient.Logger(logName) - } else { - telemetryInstance.cloudlogger = nil - telemetryInstance.esClient = nil - } - return &telemetryInstance -} - -func (t *telemetry) streamTelemetryToGCPLogging(dataItems []string) { - defer t.cloudlogger.Flush() - for _, item := range dataItems { - log.Printf("Logging %v to the GCP instance\n", item) - t.cloudlogger.Log(logging.Entry{Payload: item}) - } -} - -func (t *telemetry) streamDataToElastic(dataItems []string) { - var wg sync.WaitGroup - for index, item := range dataItems { - wg.Add(1) - go func(i int, message string) { - defer wg.Done() - req := esapi.IndexRequest{ - Index: INDEX, - Body: strings.NewReader(message), - Refresh: "true", - } - - res, err := req.Do(context.Background(), t.esClient) - if err != nil { - log.Printf("Unable to send the request to elastic.") - } - defer res.Body.Close() - if res.IsError() { - log.Printf("[%s] Error Indexing Value [%s]", res.Status(), message) - } else { - log.Printf("Successfully Inserted [%s]", message) - } - }(index, item) - } - wg.Wait() -} From 22eef66e798f1723b1cd58917eddd8950c5724fe Mon Sep 17 00:00:00 2001 From: Nate Sales Date: Tue, 20 Apr 2021 21:26:55 -0700 Subject: [PATCH 23/61] remove app deployment manifests --- Procfile | 1 - app.json | 12 ------------ app.yaml | 5 ----- proxy.yaml | 4 ---- scalingo.json | 12 ------------ target.yaml | 9 --------- 6 files changed, 43 deletions(-) delete mode 100644 Procfile delete mode 100644 app.json delete mode 100644 app.yaml delete mode 100644 proxy.yaml delete mode 100644 scalingo.json delete mode 100644 target.yaml diff --git a/Procfile b/Procfile deleted file mode 100644 index c0f90c9..0000000 --- a/Procfile +++ /dev/null @@ -1 +0,0 @@ -web: ./bin/odoh-server diff --git a/app.json b/app.json deleted file mode 100644 index 7527201..0000000 --- a/app.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "ODoH Target and Proxy: Go", - "description": "Deploy and ODoH Target and Proxy", - "keywords": [ - "DNS", - "go", - "ODoH", - "privacy" - ], - "website": "http://github.com/cloudflare/odoh-server-go", - "repository": "http://github.com/cloudflare/odoh-server-go" -} \ No newline at end of file diff --git a/app.yaml b/app.yaml deleted file mode 100644 index 607916a..0000000 --- a/app.yaml +++ /dev/null @@ -1,5 +0,0 @@ -# [START runtime] -# service: odoh-proxy -runtime: go112 -# env: flex -# [END runtime] diff --git a/proxy.yaml b/proxy.yaml deleted file mode 100644 index d9f58a4..0000000 --- a/proxy.yaml +++ /dev/null @@ -1,4 +0,0 @@ -# [START runtime] -service: odoh-proxy -runtime: go114 -# [END runtime] diff --git a/scalingo.json b/scalingo.json deleted file mode 100644 index 7527201..0000000 --- a/scalingo.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "ODoH Target and Proxy: Go", - "description": "Deploy and ODoH Target and Proxy", - "keywords": [ - "DNS", - "go", - "ODoH", - "privacy" - ], - "website": "http://github.com/cloudflare/odoh-server-go", - "repository": "http://github.com/cloudflare/odoh-server-go" -} \ No newline at end of file diff --git a/target.yaml b/target.yaml deleted file mode 100644 index 65390ba..0000000 --- a/target.yaml +++ /dev/null @@ -1,9 +0,0 @@ -# [START runtime] -service: odoh-target -runtime: go114 -env_variables: - SEED_SECRET_KEY: "99fe7e7aa97178f40c8cc145d38b3d25" - GOOGLE_APPLICATION_CREDENTIALS: "odoh-target-service-account.json" - TARGET_INSTANCE_NAME: "server_target_gcp" - EXPERIMENT_ID: "EXP_1" -# [END runtime] From 8742f7d695ceb9696325d03e9d64f5e8efaa22e4 Mon Sep 17 00:00:00 2001 From: Nate Sales Date: Tue, 20 Apr 2021 21:29:21 -0700 Subject: [PATCH 24/61] remove useless name function --- resolver.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/resolver.go b/resolver.go index 8d15791..16f3d99 100644 --- a/resolver.go +++ b/resolver.go @@ -31,7 +31,6 @@ import ( ) type resolver interface { - name() string resolve(query *dns.Msg) (*dns.Msg, error) } @@ -40,10 +39,6 @@ type targetResolver struct { timeout time.Duration } -func (s targetResolver) name() string { - return s.nameserver -} - func (s targetResolver) resolve(query *dns.Msg) (*dns.Msg, error) { connection := new(dns.Conn) var err error From 5c9f8c8d56eae2da775493521f7a5f3c04e03c15 Mon Sep 17 00:00:00 2001 From: Nate Sales Date: Tue, 20 Apr 2021 21:34:01 -0700 Subject: [PATCH 25/61] add badges --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e6742fc..e52b637 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,9 @@ -# odoh-server-go +# odohd [Oblivious DoH Server](https://tools.ietf.org/html/draft-pauly-dprive-oblivious-doh) based on [Cloudflare's odoh-server-go](https://github.com/cloudflare/odoh-server-go) +[![Go Report](https://goreportcard.com/badge/github.com/emeraldonion/odohd?style=for-the-badge)](https://goreportcard.com/report/github.com/emeraldonion/odohd) +[![License](https://img.shields.io/github/license/emeraldonion/odohd?style=for-the-badge)](https://raw.githubusercontent.com/emeraldonion/odohd/main/LICENSE) +[![Release](https://img.shields.io/github/v/release/emeraldonion/odohd?style=for-the-badge)](https://github.com/emeraldonion/odohd/releases) + This fork includes changes for a server suited to Emerald Onion's production deployment. From d23fd69ccd90d5032ed4490b8d79cb1b6f0e7484 Mon Sep 17 00:00:00 2001 From: Nate Sales Date: Tue, 20 Apr 2021 21:36:30 -0700 Subject: [PATCH 26/61] go mod tidy --- go.mod | 4 +- go.sum | 454 --------------------------------------------------------- 2 files changed, 2 insertions(+), 456 deletions(-) diff --git a/go.mod b/go.mod index b87bcfd..7f5131a 100644 --- a/go.mod +++ b/go.mod @@ -3,11 +3,11 @@ module github.com/emeraldonion/odoh-server-go go 1.16 require ( - cloud.google.com/go/logging v1.4.0 github.com/cisco/go-hpke v0.0.0-20210215210317-01c430f1f302 github.com/cloudflare/odoh-go v0.1.6 - github.com/elastic/go-elasticsearch/v8 v8.0.0-20210420155627-a38c8f51b628 github.com/jessevdk/go-flags v1.5.0 github.com/miekg/dns v1.1.41 github.com/sirupsen/logrus v1.8.1 + golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4 // indirect + golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57 // indirect ) diff --git a/go.sum b/go.sum index 10bac98..ed8cf34 100644 --- a/go.sum +++ b/go.sum @@ -1,508 +1,54 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= -cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= -cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= -cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= -cloud.google.com/go v0.81.0 h1:at8Tk2zUz63cLPR0JPWm5vp77pEZmzxEQBEfRKn1VV8= -cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= -cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/logging v1.4.0 h1:suMj8d7qzDC9Gzm14aBQGWYZl6TGVz9SyOJDxLN3kNE= -cloud.google.com/go/logging v1.4.0/go.mod h1:FKOKd0UX2KtN01HZbMlVug72OgiX27ZE8AG4lktFnGo= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= git.schwanenlied.me/yawning/x448.git v0.0.0-20170617130356-01b048fb03d6 h1:w8IZgCntCe0RuBJp+dENSMwEBl/k8saTgJ5hPca5IWw= git.schwanenlied.me/yawning/x448.git v0.0.0-20170617130356-01b048fb03d6/go.mod h1:wQaGCqEu44ykB17jZHCevrgSVl3KJnwQBObUtrKU4uU= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/cisco/go-hpke v0.0.0-20210215210317-01c430f1f302 h1:unAbn7dpE8eeUfWRaOPl1qTfffhIcCNuKQuECGNGWtk= github.com/cisco/go-hpke v0.0.0-20210215210317-01c430f1f302/go.mod h1:RSsoIHRMBe69FbF/fIbmWYa3rrC6vuPyC0MbNUpel3Q= github.com/cisco/go-tls-syntax v0.0.0-20200617162716-46b0cfb76b9b h1:Ves2turKTX7zruivAcUOQg155xggcbv3suVdbKCBQNM= github.com/cisco/go-tls-syntax v0.0.0-20200617162716-46b0cfb76b9b/go.mod h1:0AZAV7lYvynZQ5ErHlGMKH+4QYMyNCFd+AiL9MlrCYA= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cloudflare/circl v1.0.0 h1:64b6pyfCFbYm623ncIkYGNZaOcmIbyd+CjyMi2L9vdI= github.com/cloudflare/circl v1.0.0/go.mod h1:MhjB3NEEhJbTOdLLq964NIUisXDxaE1WkQPUxtgZXiY= github.com/cloudflare/odoh-go v0.1.6 h1:siTTv/pBXztJORDgVNDAYKdTboenwWFMDD1B9YQHkag= github.com/cloudflare/odoh-go v0.1.6/go.mod h1:J3Doz827YDYvz4hEmJU6q45hRFOqxUBL6NRUuEfjMxA= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/elastic/go-elasticsearch/v8 v8.0.0-20210420155627-a38c8f51b628 h1:LRgnb2UHW/hSSD1kJ923TTZeVGnKY6k2c/l4Cyraluc= -github.com/elastic/go-elasticsearch/v8 v8.0.0-20210420155627-a38c8f51b628/go.mod h1:xe9a/L2aeOgFKKgrO3ibQTnMdpAeL0GC+5/HpGScSa4= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= -github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e h1:1r7pUrabqp18hOBcwBwiTsbnFeTZHV9eER/QT5JVZxY= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= -github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= -github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/jessevdk/go-flags v1.5.0 h1:1jKYvbxEjfUl0fmqTCOfonvskHHXMjBySTLW4y9LFvc= github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1 h1:6QPYqodiu3GuPL+7mfx+NwDdp2eTkp9IfEUpgAwUN0o= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/miekg/dns v1.1.41 h1:WMszZWJG0XmzbK9FEmzH2TVcqYzFesusSIB41b8KHxY= github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= -go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= -go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83 h1:/ZScEX8SfEmUGRHs0gxpqteO5nfNW6axyZbBdw9A12g= golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5 h1:2M3HP5CCK1Si9FQhwnzYhXdG6DXeebvUHFpre8QvbyI= -golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= -golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.1 h1:Kvvh58BN8Y9/lBi7hTekvtMpm07eUZ0ck5pRHpsMWrY= -golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4 h1:b0LrWgu8+q7z4J+0Y3Umo5q1dL7NXBkKBWkaVkAq17E= golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210413134643-5e61552d6c78 h1:rPRtHfUb0UKZeZ6GH4K4Nt4YRbE9V1u+QZX5upZXqJQ= -golang.org/x/oauth2 v0.0.0-20210413134643-5e61552d6c78/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190602015325-4c4f7f33c9ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57 h1:F5Gozwx4I1xtr/sr/8CFbb57iKi3297KFs0QDbGN60A= golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.5 h1:i6eZZ+zk0SOf0xgBpEpPD18qWcJda6q1sxt3S0kzyUQ= -golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= -golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.0 h1:po9/4sTYwZU9lPhi1tOrb4hCv3qrhiQ77LZfGa2OjwY= -golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= -google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= -google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= -google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= -google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= -google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= -google.golang.org/api v0.44.0 h1:URs6qR1lAxDsqWITsQXI4ZkGiYJ5dHtRNiCpfs2OeKA= -google.golang.org/api v0.44.0/go.mod h1:EBOGZqzyhtvMDoxwS97ctnh0zUmYY6CxqXsc1AvkYD8= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= -google.golang.org/genproto v0.0.0-20210413151531-c14fb6ef47c3 h1:K+7Ig5hjiLVA/i1UFUUbCGimWz5/Ey0lAQjT3QiLaPY= -google.golang.org/genproto v0.0.0-20210413151531-c14fb6ef47c3/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= -google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.37.0 h1:uSZWeQJX5j11bIQ4AJoj+McDBo29cY1MCoC1wO3ts+c= -google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= -google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= -google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= -google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0 h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/lk= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= From 2cf438f840af2eb4f2e18acea9a28b3c0ad5b6de Mon Sep 17 00:00:00 2001 From: Nate Sales Date: Tue, 20 Apr 2021 21:36:52 -0700 Subject: [PATCH 27/61] add coverage badge --- README.md | 1 + coverage_badge.png | Bin 0 -> 1569 bytes 2 files changed, 1 insertion(+) create mode 100644 coverage_badge.png diff --git a/README.md b/README.md index e52b637..c9bb318 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ [Oblivious DoH Server](https://tools.ietf.org/html/draft-pauly-dprive-oblivious-doh) based on [Cloudflare's odoh-server-go](https://github.com/cloudflare/odoh-server-go) +![Coverage Badge](coverage_badge.png) [![Go Report](https://goreportcard.com/badge/github.com/emeraldonion/odohd?style=for-the-badge)](https://goreportcard.com/report/github.com/emeraldonion/odohd) [![License](https://img.shields.io/github/license/emeraldonion/odohd?style=for-the-badge)](https://raw.githubusercontent.com/emeraldonion/odohd/main/LICENSE) [![Release](https://img.shields.io/github/v/release/emeraldonion/odohd?style=for-the-badge)](https://github.com/emeraldonion/odohd/releases) diff --git a/coverage_badge.png b/coverage_badge.png new file mode 100644 index 0000000000000000000000000000000000000000..87fdffe9fb1808ea8c6e2dd393faa6ebac23c400 GIT binary patch literal 1569 zcmah}Yd8}M7@kXu5pr2On_>^VQq&vSl!-}`>wulISr_xQv|>doGfq3|Wb(pfM>4)EoEF+q)nsa6 zF@SBm4+Hu5_(*q88H}Bzs3)gkW@gW^ZTbjx5{VQL5O8T>q@r|-!NbPK$H$@3g)TO@ zl~6OV(!o>#peN2285pRgCF#kM!@KB?{|?if`5{_EPj!|>TGb9Y+1OC#Sht!9!g!0Y zr_~*?IdiME_`xD3cNSMW5P>0Pv2dCBlM-vc{ySb){i6pd1H0V3`rTxs#)a#hi67G5~=cJZzFO$*G-GLk!PXb2T0ssvyvu_RIP0$#ur3vH%P^|hv(cjEYV z&yKtGO?|wje2X$@HTqH5+?-cVoo8nd2+sHX6sV)j;X4kCi;Mhsb*TEY+~w3hzExmg zV9MpoZ#bNM=4_PU!xIBzV>jD@oQg#0ZBkNGlO*dHmA!{_cE>gT)P_PKZbTRGb;F|c zprBjvOm=o}J<_KC3Z*5_46-1 z&fF%7#bQUocbHA=E662RxpA|SP+h}BU|Gle2PwkT)guhC&h^a?>+7jLaIyZW?L3uV^-N8bnmOK{o_=m7 z-nb(WibA1q>sfvD+yF^i8bhh+t)SZ`yzh%+it@7lGqMo7_~M$|uGo3*iT3numGtbT zzcA*RCu^< z*#@D@f4Gn}HzSp!Eky CJOxSs literal 0 HcmV?d00001 From 89be5e211eb4fd622bcd99d14bd0866c5527ec08 Mon Sep 17 00:00:00 2001 From: Nate Sales Date: Tue, 20 Apr 2021 21:51:50 -0700 Subject: [PATCH 28/61] add coverage testing --- .github/workflows/coverage.yml | 33 +++++++++++++++++++++++++++++++++ .github/workflows/test.yml | 2 +- 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/coverage.yml diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml new file mode 100644 index 0000000..c51ca19 --- /dev/null +++ b/.github/workflows/coverage.yml @@ -0,0 +1,33 @@ +name: Build and Test + +on: + push: + branches: + - main + paths: + - "*.go" + +jobs: + build: + name: Build + runs-on: ubuntu-latest + steps: + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: ^1.14 + + - name: Check out code into the Go module directory + uses: actions/checkout@v2 + + - name: Build + run: go build -v ./... + + - name: Run test + run: gopherbadger -style=for-the-badge -covercmd "go test -v -race -covermode atomic -coverprofile=coverage.out ./... && go tool cover -func=coverage.out" + + - name: Commit coverage badge + uses: EndBug/add-and-commit@v7 + with: + message: "ci: update coverage" + add: "coverage_badge.png" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c76a675..7781b54 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -23,4 +23,4 @@ jobs: run: go build -v ./... - name: Test - run: go test -v -race -covermode atomic -coverprofile=covprofile ./... + run: go test -v -race -covermode atomic ./... From 8fd31175dc4be054260a12671af9c735b0861906 Mon Sep 17 00:00:00 2001 From: Nate Sales Date: Tue, 20 Apr 2021 21:52:36 -0700 Subject: [PATCH 29/61] ci: fix coverage workflow name --- .github/workflows/coverage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index c51ca19..36d47ea 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -1,4 +1,4 @@ -name: Build and Test +name: Run coverage testing on: push: From 7265c9bd5cb6876223b3d4581039e389cfdbe7c9 Mon Sep 17 00:00:00 2001 From: Nate Sales Date: Tue, 20 Apr 2021 21:54:01 -0700 Subject: [PATCH 30/61] update repo name --- .gitignore | 2 +- go.mod | 2 +- odoh_server.go => main.go | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename odoh_server.go => main.go (100%) diff --git a/.gitignore b/.gitignore index 11a179a..1afc8c7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ .idea *.pem -odoh-server \ No newline at end of file +odohd \ No newline at end of file diff --git a/go.mod b/go.mod index 7f5131a..0a317d0 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/emeraldonion/odoh-server-go +module github.com/emeraldonion/odohd go 1.16 diff --git a/odoh_server.go b/main.go similarity index 100% rename from odoh_server.go rename to main.go From a7f5d38d6f8f28742574090a5ecbaa07f0f1dc75 Mon Sep 17 00:00:00 2001 From: Nate Sales Date: Tue, 20 Apr 2021 21:58:09 -0700 Subject: [PATCH 31/61] add goreleaser release automation --- .github/workflows/release.yml | 26 ++++++++++++++++++++++++++ .gitignore | 3 ++- .goreleaser.yml | 26 ++++++++++++++++++++++++++ Makefile | 7 ------- 4 files changed, 54 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/release.yml create mode 100644 .goreleaser.yml delete mode 100644 Makefile diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..e6c2da4 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,26 @@ +name: Release + +on: + push: + tags: + - "v*" + +jobs: + goreleaser: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.16 + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v2 + with: + version: latest + args: release --rm-dist + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index 1afc8c7..413a35f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ .idea *.pem -odohd \ No newline at end of file +odohd +dist/ \ No newline at end of file diff --git a/.goreleaser.yml b/.goreleaser.yml new file mode 100644 index 0000000..063dda5 --- /dev/null +++ b/.goreleaser.yml @@ -0,0 +1,26 @@ +before: + hooks: + - go mod download +builds: + - + env: + - CGO_ENABLED=0 + goos: + - linux + - freebsd + goarch: + - amd64 + - arm64 +nfpms: + - id: odohd + package_name: odohd + vendor: Emerald Onion + homepage: https://packetframe.com + maintainer: Nate Sales + description: Oblivious DNS over HTTPS server + license: GNU GPL-3.0 + section: utils + priority: extra + formats: + - deb + - rpm diff --git a/Makefile b/Makefile deleted file mode 100644 index 217fd86..0000000 --- a/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -all: test build - -test: - go test ./... - -build: - go build -o odoh-server From 241ad266dba26aac8b4cbd47c74f8a894dda1b59 Mon Sep 17 00:00:00 2001 From: Nate Sales Date: Tue, 20 Apr 2021 22:00:23 -0700 Subject: [PATCH 32/61] ci: get gopherbadger --- .github/workflows/coverage.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 36d47ea..75a28b6 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -23,6 +23,9 @@ jobs: - name: Build run: go build -v ./... + - name: Get gopherbadger + run: go get github.com/jpoles1/gopherbadger + - name: Run test run: gopherbadger -style=for-the-badge -covercmd "go test -v -race -covermode atomic -coverprofile=coverage.out ./... && go tool cover -func=coverage.out" From f03650db77c4e6b67c21544d371599c0fa397ac8 Mon Sep 17 00:00:00 2001 From: Nate Sales Date: Tue, 20 Apr 2021 22:03:51 -0700 Subject: [PATCH 33/61] add optional TLS --- main.go | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/main.go b/main.go index 63314b2..4236f54 100644 --- a/main.go +++ b/main.go @@ -51,9 +51,10 @@ var version = "dev" // CLI flags var opts struct { ListenAddr string `short:"l" long:"listen" description:"Address to listen on" default:"localhost:8080"` - Resolver string `short:"r" long:"resolver" description:"Upstream DNS resolver to query" default:"1.1.1.1:53"` - Cert string `short:"c" long:"cert" description:"TLS certificate file" required:"true"` - Key string `short:"k" long:"key" description:"TLS key file" required:"true"` + Resolver string `short:"r" long:"resolver" description:"Target DNS resolver to query" default:"1.1.1.1:53"` + DisableTls bool `short:"t" long:"no-tls" description:"Disable TLS"` + Cert string `short:"c" long:"cert" description:"TLS certificate file"` + Key string `short:"k" long:"key" description:"TLS key file"` Verbose bool `short:"v" long:"verbose" description:"Enable verbose logging"` } @@ -71,6 +72,11 @@ func main() { log.Debugln("Verbose logging enabled") } + // Validate TLS cert/key + if !opts.DisableTls && (opts.Cert == "" || opts.Key == "") { + log.Fatal("--cert and --key must be set when TLS is enabled") + } + // Random seed for HPKE keypair seed := make([]byte, defaultSeedLength) _, err = rand.Read(seed) @@ -110,5 +116,9 @@ func main() { // Start the server log.Infof("Starting ODoH listener on %s", opts.ListenAddr) - log.Fatal(http.ListenAndServeTLS(opts.ListenAddr, opts.Cert, opts.Key, nil)) + if opts.DisableTls { // HTTP listener + log.Fatal(http.ListenAndServe(opts.ListenAddr, nil)) + } else { // HTTPS listener + log.Fatal(http.ListenAndServeTLS(opts.ListenAddr, opts.Cert, opts.Key, nil)) + } } From cca6f25a78d746258980f328224bd10782c33dd0 Mon Sep 17 00:00:00 2001 From: natesales Date: Wed, 21 Apr 2021 05:04:34 +0000 Subject: [PATCH 34/61] ci: update coverage --- coverage_badge.png | Bin 1569 -> 1721 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/coverage_badge.png b/coverage_badge.png index 87fdffe9fb1808ea8c6e2dd393faa6ebac23c400..1f0625bc78aeff6491c7956f63b742ec451a36aa 100644 GIT binary patch delta 1693 zcmV;O24eZ447m-EFnK2f9CY>(&*dC37~*_mw<;PD#{mKfIzSw!lZ(*N0?L)_6U;-!X9B#LD(ZqDhPXoNd;k#FsUHy5hfLcJ;J1d zut&9#lVW3IF&d2+3`vmg(;9rlFw$m&>(o4y{&8 zQBe^Fg8@mB=zr?!!eX)TtYmrx_U;3AtzM)$%;is&u@ut&+?y z$y1k zHUK|NuI8~kO}(>fL$xVF{dTWXsi>~5#%{OM+}zCK;v%W3sbpqmVzF3!I!ThKsj1=K zy?fYfHY7=+u&|K0xHu{+E1#J|k|e6Cs_5?S#%8l2%Q9J6S$Mr(+S}WMj=z8ZesXeh zsIIQ|#ec4=tK;0cb3St@l}Z{K8Za7-tJd=G>uR-{qM{-sN#fF_O99%7iVAvqdeG@~ zT)A>3U{oxk8h+J`KyEb_V| zn-!J;C`&#^TtosE=g+v9{t-pJnZ&CTcq_SvH-G!Tj_mbp=z2na+^46f<954gY;0s^ zW`@PZMIJnO;MZ&bgTa8uzx1@XQ?lyfa?Ac8%HDSr!%+ zxPAM!&!EA^@9gYk$BrFnwOU{8^Yilocl=OLC=|He?ttTZy&hSXvDs|w+O-R{S{-uF zUVjw3qBGeY{W8(g=edyfAx#;5d`tfWKaD~2RTL<2EPTwIJk8KzKii^G`QoNDKb=CM zKvMkU0j*X>VM?i`cIZbNHYjYsq&l4rr_<@%HWf|C(3hzQet_7II>b@Vm@m%zuX8 zvn?t$BPhYiHV86{kpn3ii?W_bd!^lBqb&J9g`#pyw{G1c zH#ZlJM#J8{d%1h}Za^%L$3sCufp2SWZeDf0w6qkL%SA>;MnK-&++5C_IfK<|rMS45 z!-o&Ac|B|OESOrJ2ea}N0DpP%fPaPMIUEZg1Na&0{^K?pAJuSB`x=%#U97MIz}V8T zPxEkTkdu91<4AWhZ8N_iJ0_nSQ;ihp%Q*GNZ{mFV2?hGMLar}lllJxXp;oIoapDBA zv9YLBDiRYD@p}DVZ5<8=YPFi<$B(1YXo!i4;pEAa3=a?U=+UER=5RP1sDD%{j7B3d zF)?T~8V(*jNKQ^p$nnR<#+aI#qO`P>j*gC1AJxG!Jw1)tY^JcV5T){8t=qS6A9lOl z&s+dow{8uoXD^EWh5Jl-oO~%d1C6v9gXR@hSmsYIyPwYD{5jwLLn?3f=iy#?%KgV} ztG>TV3Kiws-{V)qr&wB91b;xKP@_~x8>%nl!3q2))u^Z_hK7c?e*HTA{r!Hr`1p8A zN=isiPe+zz>~?#|)BT=3dypiF&dyHi>+Aid`(Wc|XJ=zFnJ6zW516`Fo2WZFI;gF! z^{xNsFk>>A=G5gu^YhW^biQ8^g6Y|MwSNT5Mh2&yoAy$c zQp1i-2Btk@)H|!VHS@lorX_0zfN9SdopY^R9DSRG<+*@Z#)NX>B3|O%k#YcDPkM(V zy6-dY{*<5mwS-SUdvyqw4VhFB-iUwZ3k3gTgh>Tqk1(kq>=7mvggwHfg0M%JR1o$E nlM2EfVNyZZBTOm?dlvoayzSB zhDL5>u~0{vHKP%taf*g*$=P#0oR8=HKmDHnr}xAAcI;LQ^VD(QzUCH;VEQB$;LMxY-gD!r%P2%u%(e&4`M zr|OM;!`gSlviICMd#6FM(X2*CJo#6R;_$1D((!7T2wiH716 z49^*l#}_*$7^r1u=H}+!sxX4L^Dy4!j_J%<_W~njW##i7iN?APC|s;6yZ~Zu{;;kt z$NuvB`w(U1Bk$-BEphM0$6pG%>2zRrzozk@0s+baGYQf;q^CBU%+pV+5XZzXhv)4~WWQEL@f!}hB{143Up9g& z1wbmHC_yO>Ct!+&w$tbOT2n1Mv3&dIr`-CcKHgQmOBu8t{U~g1&Mv3Uv(xZ+=LbHD z)KTVe8EkQJk^im^Ss%eAE+_Z#t^NJ|ldfNX%i-iOXTt>(PmN4X-RuT3D-sq)Dw2|u z6D8|twS7nQG-Dfo>Vm-_H-ZcBwsApfK)~I2COe}yY`?a0-2mD_H@DI!BxJY>PRWlB zyf*y(=)LPo-v&%4c=X?|Qt=g;;ntvhRpLro6I7NxkvMdSc65=bqV8lmY|t9?M+=?q zxe{WvhtN$$bLn*gT4)#8z6PR-7$y3+NM*eqbGxcz=ZCLbN&3QPl($Du~_Vg{|>Q@c@4ViDnD*f6s&KY04V8r zU!5dOUOmPjiiK{V=@xW&mCH?as^}gMO|`i+;o@rrcBtzEX!x>mRN_0E+GBlXmaHNur0tLQ8LKwcUt zcQ1+t9tu5+KEl&A6hS~lip5F z<_$(kOD-rbzQsYsyl)JAUG9Wz-u}XVJofgjI~=Yg6biSV*GJ9`kaVRrO4YXpZ=3PH zFODfG$obC5f$ZZ8Yf4=)^W4+zsoQF)8B2emEl&Zos%MYz9~SvfGN$Ek4DOG#J9TXJ z5@_hbLN~TvNl7V~*onIn!bnb77jPg9et$MHIQXp8)Z9u9MFl(T2F3JO&jKSb7+l-f zn76bNDWsN^8PC;k)d-oQ8k*_ovn=|X=qXXF;}Y53LKR*mmuBcaucELG^{A5L86G!# d?tEX_zCahG>@>1zX8Mu19|`e From 400fea9d321b64573a325bd57541f56f691378c3 Mon Sep 17 00:00:00 2001 From: Nate Sales Date: Tue, 20 Apr 2021 22:06:26 -0700 Subject: [PATCH 35/61] ci: set coverage bot account --- .github/workflows/coverage.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 75a28b6..f998e2a 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -34,3 +34,5 @@ jobs: with: message: "ci: update coverage" add: "coverage_badge.png" + author_name: "github-actions[bot]" + author_email: "github-actions[bot]@users.noreply.github.com" From c9d09ccba9817b9954a94434a89745751d72d7de Mon Sep 17 00:00:00 2001 From: Nate Sales Date: Tue, 20 Apr 2021 22:09:55 -0700 Subject: [PATCH 36/61] set default target DNS resolver to localhost --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index 4236f54..0355a33 100644 --- a/main.go +++ b/main.go @@ -51,7 +51,7 @@ var version = "dev" // CLI flags var opts struct { ListenAddr string `short:"l" long:"listen" description:"Address to listen on" default:"localhost:8080"` - Resolver string `short:"r" long:"resolver" description:"Target DNS resolver to query" default:"1.1.1.1:53"` + Resolver string `short:"r" long:"resolver" description:"Target DNS resolver" default:"127.0.0.1:53"` DisableTls bool `short:"t" long:"no-tls" description:"Disable TLS"` Cert string `short:"c" long:"cert" description:"TLS certificate file"` Key string `short:"k" long:"key" description:"TLS key file"` From 149830d8d561080708ccb87eeb43ce75d5444de5 Mon Sep 17 00:00:00 2001 From: Nate Sales Date: Tue, 20 Apr 2021 22:10:08 -0700 Subject: [PATCH 37/61] add usage info --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.md b/README.md index c9bb318..36531a1 100644 --- a/README.md +++ b/README.md @@ -8,3 +8,21 @@ [![Release](https://img.shields.io/github/v/release/emeraldonion/odohd?style=for-the-badge)](https://github.com/emeraldonion/odohd/releases) This fork includes changes for a server suited to Emerald Onion's production deployment. + +## Usage: + +``` +Usage: + odohd [OPTIONS] + +Application Options: + -l, --listen= Address to listen on (default: localhost:8080) + -r, --resolver= Target DNS resolver to query (default: 127.0.0.1:53) + -t, --no-tls Disable TLS + -c, --cert= TLS certificate file + -k, --key= TLS key file + -v, --verbose Enable verbose logging + +Help Options: + -h, --help Show this help message +``` From a8fae9267ea27beca8a74165e1981a8f6f043148 Mon Sep 17 00:00:00 2001 From: Nate Sales Date: Tue, 20 Apr 2021 22:33:16 -0700 Subject: [PATCH 38/61] add in flight debug logs --- proxy.go | 4 ++++ target.go | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/proxy.go b/proxy.go index 933fdfa..6d0dc97 100644 --- a/proxy.go +++ b/proxy.go @@ -58,6 +58,8 @@ func forwardProxyRequest(client *http.Client, targetName string, targetPath stri } func (p *proxyServer) proxyQueryHandler(w http.ResponseWriter, r *http.Request) { + log.Debug("handling proxy request") + if r.Method != "POST" { p.lastError = errWrongMethod log.Printf(p.lastError.Error()) @@ -81,6 +83,8 @@ func (p *proxyServer) proxyQueryHandler(w http.ResponseWriter, r *http.Request) return } + log.Debugf("targethost: %s targetpath: %s", targetName, targetPath) + defer func(body io.ReadCloser) { err := body.Close() if err != nil { diff --git a/target.go b/target.go index 12e14c4..7f2e1ca 100644 --- a/target.go +++ b/target.go @@ -233,7 +233,7 @@ func (s *targetServer) odohQueryHandler(w http.ResponseWriter, r *http.Request) } func (s *targetServer) targetQueryHandler(w http.ResponseWriter, r *http.Request) { - log.Debugf("%s Handling %s\n", r.Method, r.URL.Path) + log.Debugf("handling target request") if r.Header.Get("Content-Type") == dnsMessageContentType { s.dohQueryHandler(w, r) From fa5fa148ee3cc2a3712f94a8b611a38dc76a9e15 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 21 Apr 2021 05:34:14 +0000 Subject: [PATCH 39/61] ci: update coverage --- coverage_badge.png | Bin 1721 -> 1690 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/coverage_badge.png b/coverage_badge.png index 1f0625bc78aeff6491c7956f63b742ec451a36aa..aac96f2c363f58aa76644f317f609eef53f7c69a 100644 GIT binary patch delta 1660 zcmV-?27~#z4Vn#*F@ID^L_t(|ob8%zOjPL=$A2?-xL`XL25?4R#ICM3GHOeVtCB5Z z(fvRZ{IHRgj6+CwLrdDFlMS(PrQM`!+lZFX*6xcFjWC$S>2|YCI~ZRRsjVnsAhKxV zwyuDp3`mC^aM*ca`oZ*Wr-L#>YrScnUve|K&vWiMXHNcko_~Apy_y|6c0>^TU-9=J zoPF9U{8!OF?F0mZxey{1s2(9wf$9+=6{sE|Qi19bA{D3}AyR?r5h4|+9wAbJ>JcIp zs2<&XE=o^N$6~QyHk(OKPUgmq8#o*eZr{EgV^>vGh1qN-6bjMP(}Tm|U}|b=&KL%R z0jt%D*=$CVB!9ZQyJ>E2=D~vpar>{Yujk~+lXQ1?E7xq_z8!(;F!5{b~!(Gj=*jT<*o zR8&MmLw|$fyQ!&(g9i^P;?QcfI2;Zv7R#);{Oi0d%UG>eBuV1%;lnYu_4W1i_V!{l z8aaCOXu>s{E0=irPu|@xlnlJL_9G_4UaWlu1S0_e(sYYxS<_9Q?-D=zq?$LMeUE1r zfZDu+WF%$LJp5DM&Hp3Tz5+7kEPr0jJHU6Ze}hmYIIo-%-tP1B^9ck3 zw6?Y~K0c1$@8{~(t5L-UFq_Q;gF)Kb+VJ^&c)ecib~{U#E+s1~>#;HZxiTI8E>E21i_(`^pSm^bdW}YdqBfKO7Fz(b2({En5I6DJkLX+1OPkDSs&mr_-q%rKP2_&bPLM_<~jsz<&bi;qQ2GM6tQ^*-fgiJx^Ir9_Pk?Lt$DeC&yYT zH`VgmU%tuk^e2>?UQIZ!ghhJo+BIZZX4kG=q^GB&)9J|0&L$FxzP0V|??;wpcJADX zUau!DEsg5xY6b=dxO?~RV`KF9_oLJ4uvjdlrKO?Q>)E_{Get#33H!fy?|&X+V`J3R z)X>@4IqOy(FZb`?$8NV%QBi?b`+4csuV0Vb?T!)`KyGesLN$BZylARndgcKidSdUl zFHf9idS;5}Qn#U(QrVFD0#o5n>6(b$nIw&lx-b8VUktp)XES~PbQ&40Mw(Y%2{%p< z-KnOeq;TujEl!*`!S(Ccqkrr&Gc&2GsvpHL`-+wD%cyI;L}HIgLJ)zw8yOG{LD zAFuzy!a{5|8+CPcF)rojV7>-o1Nqxm@)2_9`}| zrKK2+M&&6&JT;pumw1^^i~Eq=MBn?FEbJt;>Ulhih5!Y5AzbKK;4Kh^96$cF+!vQ z)gweIP(4DV0@Wi#Do{N_qyp6=L@H1{LZkxKBSb1tJ^uh4V)myrUs3J=0000`FF@JMOL_t(|ob8%_Oq2N?$6xJJ3bJle!1e$Ir$Yx-7LK@6vLFsG zOIV_pY%*DeuSz zx`h8K$`@ULK(HRdq=K+Vm{bt<2$KrJ9$`{J*dt6T2z!J{1!0dcsUYkTCKZG|!lZ(* zN41fYVq;@58jTnX1|lOP85kI#p`n4%(a`{1Nl6I?g8^BV>F(~Pp`ihn%e8I}tyW7> zQ4t1%0ZEeR>VN9OVzKb#$&;YtS5#DRxlFTpU zpjGK`EkEY9p6z~`Z^Rk-Zo(XMNs_3kso~ze zd)RC?BuS#Mu#mX8I4UbEpP56FB&w>a=uX0sv7GFe$!c)ecQ+uMVVzkmOJa&mI0 zuCDgQu79hm6)ux#Yp{rR+3Bvkx#@OwCyJ_%Ug9sM%zrM2+ECdmcDre8Y-DC; zhQ-B29z1y9*K7cT!GOo(p{c2f`T2QfXJ;{+&7`EHkdTn@%pCu`GhVxPjoH~*78Vw` zefzf0puxuP?CfO6jvZ*VT3_w+^Ya0B{7_IR6u8~)fa7|-9$A*L*=+3EwF|Xc9dgfJ z6o0#-Gua*eGSSlKxsdiDO&NWBOaB8ujY0EO6ew^ke9W9Y&Cp^$+oDqW;-)k|okF2N zQvBlqtyV^1N~xuG=tmniC~Ux_I-L%u)9KqcnM_!%RxV$@9H4vn@S)!^S(X_eA7{&! zEg|JtOS4}5<>h7C+uJ#G=nw#Td3m(927lgVA|fKNTCKh)}N2SLm7lh&Q%Y^5xHE`7|R> z{|taZ^9q|)acuw0oSP%!eVX5nU*IKmGQZsY0q>9hnpfk#!@ao{a$=A0yUbzChJW9) zEh;tS`a(A8#KZ)NiHW}by1F`wi;DwvlarGqB_;VClOzefUeDy@WJozyBiQ)2Zrvg` zHy4dY!`{7nxqJ6+KrD~PLqS1-Z)tgr&W*wV01 z^Kfa9lYL*~NOv-AGru7_CZ8KqjTGq1IQ7SG;(YoE1^Tx_t}kSh_Vx9lR;xL2;smj= zv8Yrk5)%{gdi`H*9S#R-wVLC{kE79Oh>3~e;0ztVB=?JXJay%C@(J$n7UV+s5?43sI9H_ zt^emRV=|fO?d_$ltqp*)XU}4@+34x%@oDn&^U>*azF!f7>DhX<1b@p$2B)2y_EMHo z!;Vb`rafcSJFB=g^S+;^C2IzNY0ns)bFEw)eVc{lxqw*4gmU5{UgF)6asXaWdWR#r z?=$ZHl%M>ygik+vbqJOXnN$$oh=1k_1pi}%Nd;k#FsUHy5hfLcJ;J1dut%6w5cUX@ m3c?;?QbE`wOezR_{uK^hp9|GJPp#Yl0000 Date: Wed, 21 Apr 2021 20:37:50 -0700 Subject: [PATCH 40/61] update package license --- .goreleaser.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index 063dda5..c0bd9f7 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -18,7 +18,7 @@ nfpms: homepage: https://packetframe.com maintainer: Nate Sales description: Oblivious DNS over HTTPS server - license: GNU GPL-3.0 + license: MIT section: utils priority: extra formats: From 5e1a4dc5b97b0553a795a53b3a9bddc16ca70d08 Mon Sep 17 00:00:00 2001 From: Nate Sales Date: Wed, 21 Apr 2021 21:02:05 -0700 Subject: [PATCH 41/61] add target and proxy timeouts --- README.md | 2 ++ main.go | 20 ++++++++++++-------- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 36531a1..561bba8 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,8 @@ Application Options: -t, --no-tls Disable TLS -c, --cert= TLS certificate file -k, --key= TLS key file + --resolver-timeout= Resolver timeout (seconds) (default: 2.5) + --proxy-timeout= Proxy timeout (seconds) (default: 2.5) -v, --verbose Enable verbose logging Help Options: diff --git a/main.go b/main.go index 0355a33..67e65a1 100644 --- a/main.go +++ b/main.go @@ -50,12 +50,14 @@ var version = "dev" // CLI flags var opts struct { - ListenAddr string `short:"l" long:"listen" description:"Address to listen on" default:"localhost:8080"` - Resolver string `short:"r" long:"resolver" description:"Target DNS resolver" default:"127.0.0.1:53"` - DisableTls bool `short:"t" long:"no-tls" description:"Disable TLS"` - Cert string `short:"c" long:"cert" description:"TLS certificate file"` - Key string `short:"k" long:"key" description:"TLS key file"` - Verbose bool `short:"v" long:"verbose" description:"Enable verbose logging"` + ListenAddr string `short:"l" long:"listen" description:"Address to listen on" default:"localhost:8080"` + Resolver string `short:"r" long:"resolver" description:"Target DNS resolver" default:"127.0.0.1:53"` + DisableTls bool `short:"t" long:"no-tls" description:"Disable TLS"` + Cert string `short:"c" long:"cert" description:"TLS certificate file"` + Key string `short:"k" long:"key" description:"TLS key file"` + ResolverTimeout float32 `long:"resolver-timeout" description:"Resolver timeout (seconds)" default:"2.5"` + ProxyTimeout float32 `long:"proxy-timeout" description:"Proxy timeout (seconds)" default:"2.5"` + Verbose bool `short:"v" long:"verbose" description:"Enable verbose logging"` } func main() { @@ -89,19 +91,21 @@ func main() { log.Fatal(err) } + log.Debugf("resolver timeout: %+v", opts.ResolverTimeout) target := &targetServer{ resolver: &targetResolver{ - timeout: 2500 * time.Millisecond, + timeout: time.Duration(opts.ResolverTimeout) * time.Second, nameserver: opts.Resolver, }, odohKeyPair: keyPair, } + log.Debugf("proxy timeout: %+v", opts.ProxyTimeout) proxy := &proxyServer{ client: &http.Client{ Transport: &http.Transport{ MaxIdleConnsPerHost: 1024, - TLSHandshakeTimeout: 0 * time.Second, + TLSHandshakeTimeout: time.Duration(opts.ProxyTimeout) * time.Second, }, }, } From e76c21073a5bad18143a344b3ed18171bf1349ba Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 22 Apr 2021 04:02:57 +0000 Subject: [PATCH 42/61] ci: update coverage --- coverage_badge.png | Bin 1690 -> 1721 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/coverage_badge.png b/coverage_badge.png index aac96f2c363f58aa76644f317f609eef53f7c69a..1f0625bc78aeff6491c7956f63b742ec451a36aa 100644 GIT binary patch delta 1692 zcmV;N24ne}4Y>`FF@JMOL_t(|ob8%_Oq2N?$6xJJ3bJle!1e$Ir$Yx-7LK@6vLFsG zOIV_pY%*DeuSz zx`h8K$`@ULK(HRdq=K+Vm{bt<2$KrJ9$`{J*dt6T2z!J{1!0dcsUYkTCKZG|!lZ(* zN41fYVq;@58jTnX1|lOP85kI#p`n4%(a`{1Nl6I?g8^BV>F(~Pp`ihn%e8I}tyW7> zQ4t1%0ZEeR>VN9OVzKb#$&;YtS5#DRxlFTpU zpjGK`EkEY9p6z~`Z^Rk-Zo(XMNs_3kso~ze zd)RC?BuS#Mu#mX8I4UbEpP56FB&w>a=uX0sv7GFe$!c)ecQ+uMVVzkmOJa&mI0 zuCDgQu79hm6)ux#Yp{rR+3Bvkx#@OwCyJ_%Ug9sM%zrM2+ECdmcDre8Y-DC; zhQ-B29z1y9*K7cT!GOo(p{c2f`T2QfXJ;{+&7`EHkdTn@%pCu`GhVxPjoH~*78Vw` zefzf0puxuP?CfO6jvZ*VT3_w+^Ya0B{7_IR6u8~)fa7|-9$A*L*=+3EwF|Xc9dgfJ z6o0#-Gua*eGSSlKxsdiDO&NWBOaB8ujY0EO6ew^ke9W9Y&Cp^$+oDqW;-)k|okF2N zQvBlqtyV^1N~xuG=tmniC~Ux_I-L%u)9KqcnM_!%RxV$@9H4vn@S)!^S(X_eA7{&! zEg|JtOS4}5<>h7C+uJ#G=nw#Td3m(927lgVA|fKNTCKh)}N2SLm7lh&Q%Y^5xHE`7|R> z{|taZ^9q|)acuw0oSP%!eVX5nU*IKmGQZsY0q>9hnpfk#!@ao{a$=A0yUbzChJW9) zEh;tS`a(A8#KZ)NiHW}by1F`wi;DwvlarGqB_;VClOzefUeDy@WJozyBiQ)2Zrvg` zHy4dY!`{7nxqJ6+KrD~PLqS1-Z)tgr&W*wV01 z^Kfa9lYL*~NOv-AGru7_CZ8KqjTGq1IQ7SG;(YoE1^Tx_t}kSh_Vx9lR;xL2;smj= zv8Yrk5)%{gdi`H*9S#R-wVLC{kE79Oh>3~e;0ztVB=?JXJay%C@(J$n7UV+s5?43sI9H_ zt^emRV=|fO?d_$ltqp*)XU}4@+34x%@oDn&^U>*azF!f7>DhX<1b@p$2B)2y_EMHo z!;Vb`rafcSJFB=g^S+;^C2IzNY0ns)bFEw)eVc{lxqw*4gmU5{UgF)6asXaWdWR#r z?=$ZHl%M>ygik+vbqJOXnN$$oh=1k_1pi}%Nd;k#FsUHy5hfLcJ;J1dut%6w5cUX@ m3c?;?QbE`wOezR_{uK^hp9|GJPp#Yl00002|YCI~ZRRsjVnsAhKxV zwyuDp3`mC^aM*ca`oZ*Wr-L#>YrScnUve|K&vWiMXHNcko_~Apy_y|6c0>^TU-9=J zoPF9U{8!OF?F0mZxey{1s2(9wf$9+=6{sE|Qi19bA{D3}AyR?r5h4|+9wAbJ>JcIp zs2<&XE=o^N$6~QyHk(OKPUgmq8#o*eZr{EgV^>vGh1qN-6bjMP(}Tm|U}|b=&KL%R z0jt%D*=$CVB!9ZQyJ>E2=D~vpar>{Yujk~+lXQ1?E7xq_z8!(;F!5{b~!(Gj=*jT<*o zR8&MmLw|$fyQ!&(g9i^P;?QcfI2;Zv7R#);{Oi0d%UG>eBuV1%;lnYu_4W1i_V!{l z8aaCOXu>s{E0=irPu|@xlnlJL_9G_4UaWlu1S0_e(sYYxS<_9Q?-D=zq?$LMeUE1r zfZDu+WF%$LJp5DM&Hp3Tz5+7kEPr0jJHU6Ze}hmYIIo-%-tP1B^9ck3 zw6?Y~K0c1$@8{~(t5L-UFq_Q;gF)Kb+VJ^&c)ecib~{U#E+s1~>#;HZxiTI8E>E21i_(`^pSm^bdW}YdqBfKO7Fz(b2({En5I6DJkLX+1OPkDSs&mr_-q%rKP2_&bPLM_<~jsz<&bi;qQ2GM6tQ^*-fgiJx^Ir9_Pk?Lt$DeC&yYT zH`VgmU%tuk^e2>?UQIZ!ghhJo+BIZZX4kG=q^GB&)9J|0&L$FxzP0V|??;wpcJADX zUau!DEsg5xY6b=dxO?~RV`KF9_oLJ4uvjdlrKO?Q>)E_{Get#33H!fy?|&X+V`J3R z)X>@4IqOy(FZb`?$8NV%QBi?b`+4csuV0Vb?T!)`KyGesLN$BZylARndgcKidSdUl zFHf9idS;5}Qn#U(QrVFD0#o5n>6(b$nIw&lx-b8VUktp)XES~PbQ&40Mw(Y%2{%p< z-KnOeq;TujEl!*`!S(Ccqkrr&Gc&2GsvpHL`-+wD%cyI;L}HIgLJ)zw8yOG{LD zAFuzy!a{5|8+CPcF)rojV7>-o1Nqxm@)2_9`}| zrKK2+M&&6&JT;pumw1^^i~Eq=MBn?FEbJt;>Ulhih5!Y5AzbKK;4Kh^96$cF+!vQ z)gweIP(4DV0@Wi#Do{N_qyp6=L@H1{LZkxKBSb1tJ^uh4V)myrUs3J=0000 Date: Wed, 21 Apr 2021 21:47:51 -0700 Subject: [PATCH 43/61] fix homepage URL --- .goreleaser.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index c0bd9f7..a7e90ab 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -15,7 +15,7 @@ nfpms: - id: odohd package_name: odohd vendor: Emerald Onion - homepage: https://packetframe.com + homepage: https://github.com/emeraldonion/odohd maintainer: Nate Sales description: Oblivious DNS over HTTPS server license: MIT From d9998715f3952740c2383dd87513fa7c583b2ae0 Mon Sep 17 00:00:00 2001 From: Nate Sales Date: Wed, 21 Apr 2021 23:53:38 -0700 Subject: [PATCH 44/61] add target timeout test --- target_test.go | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/target_test.go b/target_test.go index 2410d89..8efae53 100644 --- a/target_test.go +++ b/target_test.go @@ -479,3 +479,34 @@ func TestODoHResolutionWithRealResolver(t *testing.T) { t.Fatal("Invalid content type response") } } + +func TestTargetTimeout(t *testing.T) { + r := &targetResolver{ + timeout: time.Second, + nameserver: "127.127.127.127:0", + } + target := createTarget(t, r) + handler := http.HandlerFunc(target.targetQueryHandler) + + // valid dns query + q := new(dns.Msg) + q.SetQuestion("example.com.", dns.TypeA) + packedQuery, err := q.Pack() + if err != nil { + t.Fatal(err) + } + obliviousQuery := odoh.CreateObliviousDNSQuery(packedQuery, 0) + encryptedQuery, _, err := target.odohKeyPair.Config.Contents.EncryptQuery(obliviousQuery) + if err != nil { + t.Fatal(err) + } + + request, err := http.NewRequest(http.MethodPost, "/dns-query", bytes.NewReader(encryptedQuery.Marshal())) + if err != nil { + t.Fatal(err) + } + request.Header.Add("Content-Type", odohMessageContentType) + + rr := httptest.NewRecorder() + handler.ServeHTTP(rr, request) +} From 252304187b152b2397ef68f87416729d2fc5025a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 22 Apr 2021 07:04:37 +0000 Subject: [PATCH 45/61] ci: update coverage --- coverage_badge.png | Bin 1721 -> 1645 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/coverage_badge.png b/coverage_badge.png index 1f0625bc78aeff6491c7956f63b742ec451a36aa..3f50bac662a8a8b8fc05fa11d63b2aa5ea56453e 100644 GIT binary patch delta 1615 zcmah}`#aMM92Uhfw@4zlZjxNGFioO5n29-4%e9+k?i?oDT=qTWQWm+C+p?+Umf3Sy zEQS+uO*i)$iEJmz+-FQ2=P&5}>3!b!r}uq6pSNCNPCgS1=)>(UT){t?D-3s5#U1Rl zWisVojtf0Lj!UX(8n4_Oe5CHJ=lHcMc|%r#L@N6Fk9h*0 zKq2tS1q1+d)r*O7QE!<~3#V{_%1a^?cx+a3cjC<6Bm2MU9Ck|(DF1?db&hs|!&|~w zx0xJAXXokZ?wnUXCMhW?=ETR3ACH7UuAoZF%4G81wu?lfm(X5}8IQ-?k4Q=;r@AYR8cfH=^sx2VG zWF($0SV&84(*nQQ$8=a7+0wWVEE58WW(YtE;Q{rt70zuIz3}w4YyAULFjK#lCUP^{Wfvw0@$&7V*|yHO`)%8Wj~4A)g!9 zQ=mKH7>o=GMaNo4>BWm0{GxB`q^Y*HHn{UfLzKauJ$nX*hhe^!5CBqh=ljsTGxE|> zCV6t~ahpJ6+gii4iv$9+#;AW_;Q3-zRaFU#b%4~~nxTDmO2CP#ebaMlJsKzr;WycD z^OlmROU>37CyP7u%?!w)P_gVarKJ)7HT$7TGgfwCro-|=Wg}TE%Zn%Uy7l3$uyU?N z_}vy-g-Dl(2>}+sVr8Z8zO1W@oaxh(Opxfz&?W^z{(6TwstWovG}JLNqE7rrx2(T= ztR4%$bcuZ{LznS@9X;1NzlL33@>A5dQdJJ1FR~jN@-4%4FifbMcw{7>pQfvneN0(C z$o0u!kUa{uQv!#>IgzG<`>=BUK2KIffwj2R<(&gk1rC{lGj?gf`+8v6$Ivrk&6mE8 ztzcF{N`gPe=#TsaM`Ja)wzjsc3B^#kKAQNlClM!f;&rV6MIfd0~06TqsofGY_1+A+|lA`@mfO3XHP_T~fmt z7Ht090+zSB$aJUpC$tFx?NCY5!zJm6Q5zoRIsMi5H1Fp&)Q2l8D_!#)9S$c?o-`-Y zXf!k$ZCBM@^I$N@FDlBMp_QW?ym?m!P;&F|xYv#Loor3kf=1fyGgJj3y}S-`cCJmo z)*Xcc+t|E+W=}FF$jQlZUPT-YW0BL+Kvx+)P~M{RAk!nLzJTr=uf_b-n%aDvaeer` z0zBm`-r{XKs(U*5)OPQ!?M|eSIgF^@5>ZdgbWgu70WzsRy%f2sM_!c#A+QY7Xx^|W z87lkAFbvDmu_bERBRyDQ+6D#&>gf)B{r$43G~H0KSd3Int_>dcJze04Kwy4utja4Y zMheF2HTmD>=Q{(;eOX*M0?~m!T^+X`2?BwpGJvg3f{D+o^C;B*qN1Xl&o6HCrrJqo ziV!_LJ*Mi!knwE2OAA0u6LLy2-^?H3bB;Y|jj5WNT{VpR)^8L3HajctUsmQFvD85P zwRWKStf`-t=V>?Wyk;XrWHii>kuY@vNy90~YY|F_z2_>9>*;|_O%unZ-30JlfjF)rRr{0}u6 BFoOU9 delta 1692 zcmV;N24nf{47m-EF@JMOL_t(|ob8%_Oq2N?$6xJJ3bJle!1e$Ir$Yx-7LK@6vLFsG zOIV_pY%*DeuSz zx`h8K$`@ULK(HRdq=K+Vm{bt<2$KrJ9$`{J*dt6T2z!J{1!0dcsUYkTCKZG|!lZ(* zN41fYVq;@58jTnX1|lOP85kI#p`n4%(a`{1Nl6I?g8^BV>F(~Pp`ihn%e8I}tyW7> zQ4t1%0ZEeR>VN9OVzKb#$&;YtS5#DRxlFTpU zpjGK`EkEY9p6z~`Z^Rk-Zo(XMNs_3kso~ze zd)RC?BuS#Mu#mX8I4UbEpP56FB&w>a=uX0sv7GFe$!c)ecQ+uMVVzkmOJa&mI0 zuCDgQu79hm6)ux#Yp{rR+3Bvkx#@OwCyJ_%Ug9sM%zrM2+ECdmcDre8Y-DC; zhQ-B29z1y9*K7cT!GOo(p{c2f`T2QfXJ;{+&7`EHkdTn@%pCu`GhVxPjoH~*78Vw` zefzf0puxuP?CfO6jvZ*VT3_w+^Ya0B{7_IR6u8~)fa7|-9$A*L*=+3EwF|Xc9dgfJ z6o0#-Gua*eGSSlKxsdiDO&NWBOaB8ujY0EO6ew^ke9W9Y&Cp^$+oDqW;-)k|okF2N zQvBlqtyV^1N~xuG=tmniC~Ux_I-L%u)9KqcnM_!%RxV$@9H4vn@S)!^S(X_eA7{&! zEg|JtOS4}5<>h7C+uJ#G=nw#Td3m(927lgVA|fKNTCKh)}N2SLm7lh&Q%Y^5xHE`7|R> z{|taZ^9q|)acuw0oSP%!eVX5nU*IKmGQZsY0q>9hnpfk#!@ao{a$=A0yUbzChJW9) zEh;tS`a(A8#KZ)NiHW}by1F`wi;DwvlarGqB_;VClOzefUeDy@WJozyBiQ)2Zrvg` zHy4dY!`{7nxqJ6+KrD~PLqS1-Z)tgr&W*wV01 z^Kfa9lYL*~NOv-AGru7_CZ8KqjTGq1IQ7SG;(YoE1^Tx_t}kSh_Vx9lR;xL2;smj= zv8Yrk5)%{gdi`H*9S#R-wVLC{kE79Oh>3~e;0ztVB=?JXJay%C@(J$n7UV+s5?43sI9H_ zt^emRV=|fO?d_$ltqp*)XU}4@+34x%@oDn&^U>*azF!f7>DhX<1b@p$2B)2y_EMHo z!;Vb`rafcSJFB=g^S+;^C2IzNY0ns)bFEw)eVc{lxqw*4gmU5{UgF)6asXaWdWR#r z?=$ZHl%M>ygik+vbqJOXnN$$oh=1k_1pi}%Nd;k#FsUHy5hfLcJ;J1dut%6w5cUX@ m3c?;?QbE`wOezR_{uK^hp9|GJPp#Yl0000 Date: Sun, 25 Apr 2021 13:18:22 -0700 Subject: [PATCH 46/61] add main unit tests --- main.go | 81 +++++++++++++++++++++++++++++++++------------------- main_test.go | 46 +++++++++++++++++++++++++++++ 2 files changed, 98 insertions(+), 29 deletions(-) create mode 100644 main_test.go diff --git a/main.go b/main.go index 67e65a1..7c45ae9 100644 --- a/main.go +++ b/main.go @@ -60,37 +60,24 @@ var opts struct { Verbose bool `short:"v" long:"verbose" description:"Enable verbose logging"` } -func main() { - // Parse cli flags - _, err := flags.ParseArgs(&opts, os.Args) - if err != nil { - os.Exit(1) - } - - // Enable debug logging in development releases - if //noinspection GoBoolExpressions - version == "devel" || opts.Verbose { - log.SetLevel(log.DebugLevel) - log.Debugln("Verbose logging enabled") - } - - // Validate TLS cert/key - if !opts.DisableTls && (opts.Cert == "" || opts.Key == "") { - log.Fatal("--cert and --key must be set when TLS is enabled") - } - +func keyPair() (*odoh.ObliviousDoHKeyPair, error) { // Random seed for HPKE keypair seed := make([]byte, defaultSeedLength) - _, err = rand.Read(seed) + _, err := rand.Read(seed) if err != nil { - log.Fatal(err) + return nil, err } - keyPair, err := odoh.CreateKeyPairFromSeed(hpke.DHKEM_X25519, hpke.KDF_HKDF_SHA256, hpke.AEAD_AESGCM128, seed) + kp, err := odoh.CreateKeyPairFromSeed(hpke.DHKEM_X25519, hpke.KDF_HKDF_SHA256, hpke.AEAD_AESGCM128, seed) if err != nil { - log.Fatal(err) + return nil, err } + return &kp, err +} + +// serverPair returns a target and proxy server +func serverPair(keyPair odoh.ObliviousDoHKeyPair) (*targetServer, *proxyServer) { log.Debugf("resolver timeout: %+v", opts.ResolverTimeout) target := &targetServer{ resolver: &targetResolver{ @@ -110,19 +97,55 @@ func main() { }, } - // HTTP handlers + return target, proxy +} + +// setupHandlers configures HTTP handlers +func setupHandlers(target *targetServer, proxy *proxyServer) { http.HandleFunc("/proxy", proxy.proxyQueryHandler) http.HandleFunc("/dns-query", target.targetQueryHandler) http.HandleFunc("/health", func(w http.ResponseWriter, r *http.Request) { _, _ = fmt.Fprint(w, "ok") }) http.HandleFunc("/.well-known/odohconfigs", target.configHandler) +} +// serve starts the HTTP server +func serve(listenAddr string, tls bool) { // Start the server - log.Infof("Starting ODoH listener on %s", opts.ListenAddr) - if opts.DisableTls { // HTTP listener - log.Fatal(http.ListenAndServe(opts.ListenAddr, nil)) - } else { // HTTPS listener - log.Fatal(http.ListenAndServeTLS(opts.ListenAddr, opts.Cert, opts.Key, nil)) + log.Infof("Starting ODoH listener on %s", listenAddr) + if tls { // HTTPS listener + log.Fatal(http.ListenAndServeTLS(listenAddr, opts.Cert, opts.Key, nil)) + } else { // HTTP listener + log.Fatal(http.ListenAndServe(listenAddr, nil)) } } + +func main() { + // Parse cli flags + _, err := flags.ParseArgs(&opts, os.Args) + if err != nil { + os.Exit(1) + } + + // Enable debug logging in development releases + if //noinspection GoBoolExpressions + version == "devel" || opts.Verbose { + log.SetLevel(log.DebugLevel) + log.Debugln("Verbose logging enabled") + } + + // Validate TLS cert/key + if !opts.DisableTls && (opts.Cert == "" || opts.Key == "") { + log.Fatal("--cert and --key must be set when TLS is enabled") + } + + kp, err := keyPair() + if err != nil { + log.Fatal(err) + } + + proxy, target := serverPair(*kp) + setupHandlers(proxy, target) + serve(opts.ListenAddr, !opts.DisableTls) +} diff --git a/main_test.go b/main_test.go new file mode 100644 index 0000000..83501d7 --- /dev/null +++ b/main_test.go @@ -0,0 +1,46 @@ +package main + +import ( + "io" + "net/http" + "testing" + "time" +) + +func TestGenKeyPair(t *testing.T) { + _, err := keyPair() + if err != nil { + t.Error(err) + } +} + +func TestHTTPServer(t *testing.T) { + kp, err := keyPair() + if err != nil { + t.Error(err) + } + proxy, target := serverPair(*kp) + setupHandlers(proxy, target) + go serve("127.0.0.1:8081", false) + + // Wait for server startup + time.Sleep(time.Second) + + httpClient := http.Client{} + req, err := http.NewRequest("GET", "http://127.0.0.1:8081/health", nil) + if err != nil { + t.Fatal(err) + } + resp, err := httpClient.Do(req) + if err != nil { + t.Fatal(err) + } + body, err := io.ReadAll(resp.Body) + if err != nil { + t.Fatal(err) + } + + if string(body) != "ok" { + t.Fatalf("healthcheck response mismatch, expected \"ok\" got \"%s\"", body) + } +} From 53a7f3f5ad55c4d22700bb7465e3f419c7f22245 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 25 Apr 2021 20:19:47 +0000 Subject: [PATCH 47/61] ci: update coverage --- coverage_badge.png | Bin 1645 -> 1687 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/coverage_badge.png b/coverage_badge.png index 3f50bac662a8a8b8fc05fa11d63b2aa5ea56453e..2f51bfde41374833a438e932c3875c07608fd78c 100644 GIT binary patch delta 1657 zcmah}`B&139@TM~PF7PcW#U+-4jCRbE%)e^E0ei^GB~4#sffkt1Q$vKQe1KyHJ_zJN-nsuxP?6ag7-c@-E%%a+|Rl9bFbu3$>E~&Krqbf zO31I}l1G5Q;o?cb<)$VZ)E3ERc6CEETLrGOd9NSMsP^{g0NS+o7OHAbn4_8^St6MG8&J%Hj7)3hC#%P>6`;h_crB|MOmxf zt7};Lg*9;L<`G3V?DdpEXR7E^zq2LkyKToCrr%O2?Ud(69Az7*Zp zg`>-D4F3@aB06jbHcV-sSeB2CkIxa?7e9YS6N$7I>_qXyhn@sNQ#@GcAeYN!GTCf0 zt0=Z~WCX5nVDP-IjvRL=jOLm+tD#gX+rn)Py`x0@eC^CDY&QFhf|Dx6Y;JBoV=xe8 zXTZrRd42XusHq#hKrIi>Y5EQ;J@o_HJ_w1-wh@{_(_Q*oYiqMJGBo=!j=qIv`E1O! zd3|eDFLMtZV{i(;os}kq_URH1Xe%|Uc~IfkQYfkGg9oR5J&{RBcF5dDLL z$vd0#MK`t74t|xPA(2S@0|Q0UokSPYn3$NN^71e5j8)+$3%_;G9ukW_bf$&3C0;R# ztKLsbOAG5HUHtALY=BH6x#4()y0GH)J!O>Wc&?6ja3U)_27|e2Z(LOmlpa6p!14ME zuX8G&^W>l*8nbV^KWnOy#BO*NP59>OZEsj{Q4N55ryF6a$kR2!cd&68-40&yPGu)S zAjFV_=pOL&p@nZj)>M8$L3W;XPWSe<3jDo?ZW#v-_Blp&Ht7cG8&}$Z9 zj^Xd`e<%W`RnH)tL z)I@c72;Aj2^l`AbB&cUCIXelZdOMngeKH7%e?amugTvutfRxYo=@SaMD;<$`&!0ax zkA7tn{SviK>I~+g?)xb#F9Q`{zNF{*SS(L8h(~I!MRlp2u(GmR8Xg{gIh!6EYvt(Z zh?{IQx4}~=&^?8OyO;uxj2u)*rcZQM^5T!fYzvDezuDa!DRZ57HEq3$0Xa*#%|AjF zl-GKzhJYJ5a6O(s{a4t7y7zgMB>JTvx;%pcH#!3RHs9`(%nM{iI~Tb(s+TvQr0NSH z!D6EpzlLzuoi}LoM16#%rRC#^Wf%-*ZhVN`{H=*eH`>0DAP!L9yRoscGSzf%ZY~P{ zu}k^R*wfSVvz(;v2=&4^-=`Hn^L=DwBrvwW_8%6vr$?JgrKa4zZPym++xO{{<&k@t z>NKUW0V;m9_IlgQ>d_?4>Y5tw&?dpamJPN4QrnPq;I>rp{SHIJ&#z|*c^am#U+lIY z8v_fJJ8~9ExD6Y;%rFgEu_oQp4$|-p1U?`M5&iQ|TarjuPzxQy4k-C~Sb%X9cH?x{#N9#i`3vqHpq)uE zak4YtNPb`DQL;|1NFD>vAv(%Sw~K0DGP`lNddDsK9=rxTQmfHjemJM!?))l;H>83e z+vK0tr&+->T8{w>dfKY!EI*w`zV|~Or~VJHe`KpcQUAwXn@kP$z`O&z>aU{j{1>^N BQHTHl delta 1615 zcmah}`9ISQ92do7u1Iq0lH|x7(@IniW@4VHR^S(EeM%Yhc%FpzLQv6TU$0J7S6TKMhE|BzL9mQ z6j2q%g~Z!ZOZc0c@h>YXIDg-iDs`h~vIF`DqnP*+-xktxOz_Zl-}c@B265M$O|IGk zB3wq|*@Bg{)HW^Xt3z!2>BCzZ_kd+W5Yb}jZCs#U*wpy50}`ST%-PBE13?-LGBUxv zVN#Iccw}{T72kMml*^UfEs6H`&(6<>VX@e^Zh8K-p`4ap8f+17(^>7}<)u+xULHEp zu$~It3CCb$QYgAMx=Jr!R^u1_TBgi&bacQS*XyGV_w3m-Fgy(NvxWeW>f7Ik?w*pD zmNLzkV~^Vgnb_4BrC%Trpw-6x0|PG>D=RCDS*!!3ww6qtGt&Z2bj{oDlj|`+X(+$Z zVVk#S@mG)z#YviN=3t+Lb(sy3f)<(_t=}RU`bY$v~f+2ss#~e`w^$rcSkBq1j|IsV$ z?;5Ma!Y^KA-^|ow+-Jwkwal+!*O&Yibxx})2htbW_4NhT5xN*A)LlF>Qov8wQ_4B2 zEFbLlWH8tPh1w~B!{HoHSHXQ;Id_jItD?YK-0Jkn1*rlD&A^$vG~j*Ru$-glS+UkD zKc^NjD={@O0Au_|L86n1np|sZYxbmKniPxsUO30KA_jb9)-!tyT`(DXd_co%D}|vs51hg7|!z9N89lmrsm=Y%J;NdfI(aq@#D>Bv!A9_0o7_4jn27q-*~D=RCV^X=`9Cr+HO zB+_U!G#YJR*;RdiFxWpj+LEE2s~oaBmh4!0jNzsNz+3zz_1tGn?H90%i zW>DjSLV;~FJ;=3|}a3(Pfb78C+LLcS+D@_O_%o9b;S@ z{-6L)J%hJ;mx1b->C2prs#+3r8T@(dJe0>ro&OXgU+v+9a6zzCMRS?Jp`S%AI(5i#Ody zI#q<|?(Q~ICx(va=wDm_VjGduk_8q42;Z~pK^siv^tV-`_^3F6<8yib_4W0EK|%K(3vOjlsZ`)W>(tYd5=V>MZV)6c zCZ_Mxr@d9%@dc5mv{zPFBR{`cGYIZ4amCx{#>T}Rv2AN>^EA%u^hx%NgJpFhHKi{%G7~mHsNQqf`l8U!G7lf z9Fqd@yo&BlEvGx4h1pJfHXJuCt{)U-{Az3e-{W;VKkF$L+?8b{u>-gR!k%&AM$&&? CjWA&V From 7210175886d984e1e9350b45240b35c0726bd888 Mon Sep 17 00:00:00 2001 From: Nate Sales Date: Sun, 25 Apr 2021 13:58:50 -0700 Subject: [PATCH 48/61] ignore cover.out --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 413a35f..7221182 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .idea *.pem odohd -dist/ \ No newline at end of file +dist/ +cover.out \ No newline at end of file From 817b60dcf79978afda08de73f3a932744d96ab40 Mon Sep 17 00:00:00 2001 From: Nate Sales Date: Thu, 16 Sep 2021 09:31:49 -0700 Subject: [PATCH 49/61] feat: add TLS server test --- go.mod | 3 +- go.sum | 131 ++++++++++++++++++++++++++++++++++++++++++++++++++- main.go | 10 ++-- main_test.go | 72 ++++++++++++++++++---------- 4 files changed, 183 insertions(+), 33 deletions(-) diff --git a/go.mod b/go.mod index 0a317d0..5416bc3 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,8 @@ require ( github.com/cloudflare/odoh-go v0.1.6 github.com/jessevdk/go-flags v1.5.0 github.com/miekg/dns v1.1.41 + github.com/prometheus/client_golang v1.11.0 github.com/sirupsen/logrus v1.8.1 + github.com/stretchr/testify v1.6.1 golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4 // indirect - golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57 // indirect ) diff --git a/go.sum b/go.sum index ed8cf34..e73d6a7 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,17 @@ +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= git.schwanenlied.me/yawning/x448.git v0.0.0-20170617130356-01b048fb03d6 h1:w8IZgCntCe0RuBJp+dENSMwEBl/k8saTgJ5hPca5IWw= git.schwanenlied.me/yawning/x448.git v0.0.0-20170617130356-01b048fb03d6/go.mod h1:wQaGCqEu44ykB17jZHCevrgSVl3KJnwQBObUtrKU4uU= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cisco/go-hpke v0.0.0-20210215210317-01c430f1f302 h1:unAbn7dpE8eeUfWRaOPl1qTfffhIcCNuKQuECGNGWtk= github.com/cisco/go-hpke v0.0.0-20210215210317-01c430f1f302/go.mod h1:RSsoIHRMBe69FbF/fIbmWYa3rrC6vuPyC0MbNUpel3Q= github.com/cisco/go-tls-syntax v0.0.0-20200617162716-46b0cfb76b9b h1:Ves2turKTX7zruivAcUOQg155xggcbv3suVdbKCBQNM= @@ -11,44 +23,159 @@ github.com/cloudflare/odoh-go v0.1.6/go.mod h1:J3Doz827YDYvz4hEmJU6q45hRFOqxUBL6 github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/jessevdk/go-flags v1.5.0 h1:1jKYvbxEjfUl0fmqTCOfonvskHHXMjBySTLW4y9LFvc= github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/miekg/dns v1.1.41 h1:WMszZWJG0XmzbK9FEmzH2TVcqYzFesusSIB41b8KHxY= github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= +github.com/prometheus/client_golang v1.11.0 h1:HNkLOAEQMIDv/K+04rukrLx6ch7msSRwf3/SASFAGtQ= +github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= +github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= +github.com/prometheus/common v0.26.0 h1:iMAkS2TDoNWnKM+Kopnx/8tnEStIfpYA0ur0xQzzhMQ= +github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.6.0 h1:mxy4L2jP6qMonqmq+aTtOx1ifVWUgG/TAmntgbh3xv4= +github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83 h1:/ZScEX8SfEmUGRHs0gxpqteO5nfNW6axyZbBdw9A12g= golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4 h1:b0LrWgu8+q7z4J+0Y3Umo5q1dL7NXBkKBWkaVkAq17E= golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190602015325-4c4f7f33c9ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57 h1:F5Gozwx4I1xtr/sr/8CFbb57iKi3297KFs0QDbGN60A= -golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40 h1:JWgyZ1qgdTaF3N3oxC+MdTV7qvEEgHo3otj+HB5CM7Q= +golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.26.0-rc.1 h1:7QnIQpGRHE5RnLKnESfDoxm2dTapTZua5a0kS0A+VXQ= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/main.go b/main.go index 7c45ae9..ea7ce50 100644 --- a/main.go +++ b/main.go @@ -104,18 +104,16 @@ func serverPair(keyPair odoh.ObliviousDoHKeyPair) (*targetServer, *proxyServer) func setupHandlers(target *targetServer, proxy *proxyServer) { http.HandleFunc("/proxy", proxy.proxyQueryHandler) http.HandleFunc("/dns-query", target.targetQueryHandler) - http.HandleFunc("/health", func(w http.ResponseWriter, r *http.Request) { - _, _ = fmt.Fprint(w, "ok") - }) + http.HandleFunc("/health", func(w http.ResponseWriter, r *http.Request) { _, _ = fmt.Fprint(w, "ok") }) http.HandleFunc("/.well-known/odohconfigs", target.configHandler) } // serve starts the HTTP server -func serve(listenAddr string, tls bool) { +func serve(listenAddr string, tls bool, tlsCert, tlsKey string) { // Start the server log.Infof("Starting ODoH listener on %s", listenAddr) if tls { // HTTPS listener - log.Fatal(http.ListenAndServeTLS(listenAddr, opts.Cert, opts.Key, nil)) + log.Fatal(http.ListenAndServeTLS(listenAddr, tlsCert, tlsKey, nil)) } else { // HTTP listener log.Fatal(http.ListenAndServe(listenAddr, nil)) } @@ -147,5 +145,5 @@ func main() { proxy, target := serverPair(*kp) setupHandlers(proxy, target) - serve(opts.ListenAddr, !opts.DisableTls) + serve(opts.ListenAddr, !opts.DisableTls, opts.Cert, opts.Key) } diff --git a/main_test.go b/main_test.go index 83501d7..cb444d4 100644 --- a/main_test.go +++ b/main_test.go @@ -1,46 +1,70 @@ package main import ( + "crypto/tls" "io" "net/http" + "os" "testing" "time" -) -func TestGenKeyPair(t *testing.T) { - _, err := keyPair() - if err != nil { - t.Error(err) - } -} + "github.com/stretchr/testify/assert" +) -func TestHTTPServer(t *testing.T) { +func TestMain(m *testing.M) { kp, err := keyPair() if err != nil { - t.Error(err) + panic(err) } + + // Disable TLS strict certificate checking for local self signed cert + http.DefaultTransport.(*http.Transport).TLSClientConfig = &tls.Config{InsecureSkipVerify: true} + proxy, target := serverPair(*kp) setupHandlers(proxy, target) - go serve("127.0.0.1:8081", false) + + os.Exit(m.Run()) +} + +func TestGenKeyPair(t *testing.T) { + _, err := keyPair() + assert.Nil(t, err) +} + +func TestServeHTTP(t *testing.T) { + go serve("127.0.0.1:8080", false, "", "") // Wait for server startup - time.Sleep(time.Second) + time.Sleep(50 * time.Millisecond) httpClient := http.Client{} - req, err := http.NewRequest("GET", "http://127.0.0.1:8081/health", nil) - if err != nil { - t.Fatal(err) - } + req, err := http.NewRequest("GET", "http://127.0.0.1:8080/health", nil) + assert.Nil(t, err) + resp, err := httpClient.Do(req) - if err != nil { - t.Fatal(err) - } + assert.Nil(t, err) + body, err := io.ReadAll(resp.Body) - if err != nil { - t.Fatal(err) - } + assert.Nil(t, err) - if string(body) != "ok" { - t.Fatalf("healthcheck response mismatch, expected \"ok\" got \"%s\"", body) - } + assert.Equal(t, "ok", string(body)) +} + +func TestServeHTTPS(t *testing.T) { + go serve("127.0.0.1:8443", true, "cert.pem", "key.pem") + + // Wait for server startup + time.Sleep(50 * time.Millisecond) + + httpClient := http.Client{} + req, err := http.NewRequest("GET", "https://127.0.0.1:8443/health", nil) + assert.Nil(t, err) + + resp, err := httpClient.Do(req) + assert.Nil(t, err) + + body, err := io.ReadAll(resp.Body) + assert.Nil(t, err) + + assert.Equal(t, "ok", string(body)) } From 6947aea41c05c4ec6b5d40eee221ebd31495f6ba Mon Sep 17 00:00:00 2001 From: Nate Sales Date: Thu, 16 Sep 2021 09:32:48 -0700 Subject: [PATCH 50/61] feat: add prometheus metrics --- main.go | 25 ++++++++++++++++--------- metrics.go | 34 ++++++++++++++++++++++++++++++++++ metrics_test.go | 28 ++++++++++++++++++++++++++++ 3 files changed, 78 insertions(+), 9 deletions(-) create mode 100644 metrics.go create mode 100644 metrics_test.go diff --git a/main.go b/main.go index ea7ce50..9ad1dca 100644 --- a/main.go +++ b/main.go @@ -50,14 +50,15 @@ var version = "dev" // CLI flags var opts struct { - ListenAddr string `short:"l" long:"listen" description:"Address to listen on" default:"localhost:8080"` - Resolver string `short:"r" long:"resolver" description:"Target DNS resolver" default:"127.0.0.1:53"` - DisableTls bool `short:"t" long:"no-tls" description:"Disable TLS"` - Cert string `short:"c" long:"cert" description:"TLS certificate file"` - Key string `short:"k" long:"key" description:"TLS key file"` - ResolverTimeout float32 `long:"resolver-timeout" description:"Resolver timeout (seconds)" default:"2.5"` - ProxyTimeout float32 `long:"proxy-timeout" description:"Proxy timeout (seconds)" default:"2.5"` - Verbose bool `short:"v" long:"verbose" description:"Enable verbose logging"` + ListenAddr string `short:"l" long:"listen" description:"Address to listen on" default:"localhost:8080"` + MetricsListenAddr string `short:"m" long:"metrics-listen" description:"Address to listen metrics server on" default:"localhost:8081"` + Resolver string `short:"r" long:"resolver" description:"Target DNS resolver" default:"127.0.0.1:53"` + DisableTls bool `short:"t" long:"no-tls" description:"Disable TLS"` + Cert string `short:"c" long:"cert" description:"TLS certificate file"` + Key string `short:"k" long:"key" description:"TLS key file"` + ResolverTimeout float32 `long:"resolver-timeout" description:"Resolver timeout (seconds)" default:"2.5"` + ProxyTimeout float32 `long:"proxy-timeout" description:"Proxy timeout (seconds)" default:"2.5"` + Verbose bool `short:"v" long:"verbose" description:"Enable verbose logging"` } func keyPair() (*odoh.ObliviousDoHKeyPair, error) { @@ -128,7 +129,7 @@ func main() { // Enable debug logging in development releases if //noinspection GoBoolExpressions - version == "devel" || opts.Verbose { + version == "dev" || opts.Verbose { log.SetLevel(log.DebugLevel) log.Debugln("Verbose logging enabled") } @@ -138,6 +139,12 @@ func main() { log.Fatal("--cert and --key must be set when TLS is enabled") } + // Start metrics server + go func() { + log.Infof("Starting metrics server on %s", opts.MetricsListenAddr) + log.Fatal(metricsServe(opts.MetricsListenAddr)) + }() + kp, err := keyPair() if err != nil { log.Fatal(err) diff --git a/metrics.go b/metrics.go new file mode 100644 index 0000000..7cd938f --- /dev/null +++ b/metrics.go @@ -0,0 +1,34 @@ +package main + +import ( + "net/http" + + "github.com/prometheus/client_golang/prometheus" + "github.com/prometheus/client_golang/prometheus/promauto" + "github.com/prometheus/client_golang/prometheus/promhttp" +) + +var ( + metricTargetQueries = promauto.NewGauge(prometheus.GaugeOpts{ + Name: "odohd_target_queries", + Help: "Total queries as a target", + }) + metricProxyQueries = promauto.NewGauge(prometheus.GaugeOpts{ + Name: "odohd_proxy_queries", + Help: "Total queries as a proxy", + }) + metricTargetValidQueries = promauto.NewGauge(prometheus.GaugeOpts{ + Name: "odohd_target_valid_queries", + Help: "Total valid queries as a target", + }) + metricProxyValidQueries = promauto.NewGauge(prometheus.GaugeOpts{ + Name: "odohd_proxy_valid_queries", + Help: "Total valid queries as a proxy", + }) +) + +// metricsServe starts the metrics HTTP server +func metricsServe(listenAddr string) error { + http.Handle("/metrics", promhttp.Handler()) + return http.ListenAndServe(listenAddr, nil) +} diff --git a/metrics_test.go b/metrics_test.go new file mode 100644 index 0000000..8627ba3 --- /dev/null +++ b/metrics_test.go @@ -0,0 +1,28 @@ +package main + +import ( + "net/http" + "testing" + "time" + + "github.com/stretchr/testify/assert" +) + +func TestMetricsServe(t *testing.T) { + go func() { + err := metricsServe("127.0.0.1:8081") + assert.Nil(t, err) + }() + + // Wait for server startup + time.Sleep(50 * time.Millisecond) + + httpClient := http.Client{} + req, err := http.NewRequest("GET", "http://127.0.0.1:8081/metrics", nil) + assert.Nil(t, err) + + resp, err := httpClient.Do(req) + assert.Nil(t, err) + + assert.Equal(t, 200, resp.StatusCode) +} From 2d2a58889682d651c9a34a47c7fbc1fa36daaa25 Mon Sep 17 00:00:00 2001 From: Nate Sales Date: Thu, 16 Sep 2021 09:32:59 -0700 Subject: [PATCH 51/61] feat: add prometheus metrics --- proxy.go | 3 +++ target.go | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/proxy.go b/proxy.go index 6d0dc97..b4337c3 100644 --- a/proxy.go +++ b/proxy.go @@ -60,6 +60,8 @@ func forwardProxyRequest(client *http.Client, targetName string, targetPath stri func (p *proxyServer) proxyQueryHandler(w http.ResponseWriter, r *http.Request) { log.Debug("handling proxy request") + metricProxyQueries.Inc() + if r.Method != "POST" { p.lastError = errWrongMethod log.Printf(p.lastError.Error()) @@ -101,6 +103,7 @@ func (p *proxyServer) proxyQueryHandler(w http.ResponseWriter, r *http.Request) headerContentType := r.Header.Get("Content-Type") + metricProxyValidQueries.Inc() response, err := forwardProxyRequest(p.client, targetName, targetPath, body, headerContentType) if err != nil { http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError) diff --git a/target.go b/target.go index 7f2e1ca..cd2b726 100644 --- a/target.go +++ b/target.go @@ -134,6 +134,7 @@ func (s *targetServer) dohQueryHandler(w http.ResponseWriter, r *http.Request) { return } + metricTargetValidQueries.Inc() packedResponse, err := s.resolveQueryWithResolver(query, s.resolver) if err != nil { log.Println("Failed resolving DNS query:", err) @@ -208,6 +209,7 @@ func (s *targetServer) odohQueryHandler(w http.ResponseWriter, r *http.Request) return } + metricTargetValidQueries.Inc() packedResponse, err := s.resolveQueryWithResolver(query, s.resolver) if err != nil { log.Println("resolveQueryWithResolver failed:", err) @@ -235,6 +237,8 @@ func (s *targetServer) odohQueryHandler(w http.ResponseWriter, r *http.Request) func (s *targetServer) targetQueryHandler(w http.ResponseWriter, r *http.Request) { log.Debugf("handling target request") + metricTargetQueries.Inc() + if r.Header.Get("Content-Type") == dnsMessageContentType { s.dohQueryHandler(w, r) } else if r.Header.Get("Content-Type") == odohMessageContentType { From c19f7d670d1c0fb9034d6239ae5e54a82f6ca5e2 Mon Sep 17 00:00:00 2001 From: Nate Sales Date: Thu, 16 Sep 2021 09:36:14 -0700 Subject: [PATCH 52/61] refactor: remove extra ci workflow --- .github/workflows/coverage.yml | 38 ---------------------------------- .github/workflows/test.yml | 30 +++++++++++++++++++-------- 2 files changed, 21 insertions(+), 47 deletions(-) delete mode 100644 .github/workflows/coverage.yml diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml deleted file mode 100644 index f998e2a..0000000 --- a/.github/workflows/coverage.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: Run coverage testing - -on: - push: - branches: - - main - paths: - - "*.go" - -jobs: - build: - name: Build - runs-on: ubuntu-latest - steps: - - name: Set up Go - uses: actions/setup-go@v2 - with: - go-version: ^1.14 - - - name: Check out code into the Go module directory - uses: actions/checkout@v2 - - - name: Build - run: go build -v ./... - - - name: Get gopherbadger - run: go get github.com/jpoles1/gopherbadger - - - name: Run test - run: gopherbadger -style=for-the-badge -covercmd "go test -v -race -covermode atomic -coverprofile=coverage.out ./... && go tool cover -func=coverage.out" - - - name: Commit coverage badge - uses: EndBug/add-and-commit@v7 - with: - message: "ci: update coverage" - add: "coverage_badge.png" - author_name: "github-actions[bot]" - author_email: "github-actions[bot]@users.noreply.github.com" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7781b54..c2d9d0b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,20 +1,21 @@ -name: Build and Test +name: Test on: push: - branches: [ main ] - pull_request: - branches: [ main ] + branches: + - main + paths: + - "*.go" jobs: - build: - name: Build + test: + name: Test runs-on: ubuntu-latest steps: - name: Set up Go uses: actions/setup-go@v2 with: - go-version: ^1.14 + go-version: ^1.16 - name: Check out code into the Go module directory uses: actions/checkout@v2 @@ -22,5 +23,16 @@ jobs: - name: Build run: go build -v ./... - - name: Test - run: go test -v -race -covermode atomic ./... + - name: Get gopherbadger + run: go get github.com/jpoles1/gopherbadger + + - name: Run test + run: gopherbadger -style=for-the-badge -covercmd "go test -v -race -covermode atomic -coverprofile=coverage.out ./... && go tool cover -func=coverage.out" + + - name: Commit coverage badge + uses: EndBug/add-and-commit@v7 + with: + message: "ci: update coverage" + add: "coverage_badge.png" + author_name: "github-actions[bot]" + author_email: "github-actions[bot]@users.noreply.github.com" From 28b14bf80fc9cb1bf71103d5ac64e5f4d21e0b2b Mon Sep 17 00:00:00 2001 From: Nate Sales Date: Thu, 16 Sep 2021 09:37:01 -0700 Subject: [PATCH 53/61] fix: generate self signed cert before test --- .github/workflows/test.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c2d9d0b..01a1197 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -20,6 +20,9 @@ jobs: - name: Check out code into the Go module directory uses: actions/checkout@v2 + - name: Generate self signed cert + run: openssl req -x509 -newkey rsa:4096 -sha256 -days 356 -nodes -keyout key.pem -out cert.pem -subj "/CN=localhost" + - name: Build run: go build -v ./... From 2647235239ac111425868b8211c579d3aa84d97f Mon Sep 17 00:00:00 2001 From: Nate Sales Date: Sat, 25 Sep 2021 20:46:18 -0700 Subject: [PATCH 54/61] feat: add version flag --- README.md | 20 +++++++++++--------- main.go | 12 +++++++++++- 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 561bba8..7c48459 100644 --- a/README.md +++ b/README.md @@ -16,15 +16,17 @@ Usage: odohd [OPTIONS] Application Options: - -l, --listen= Address to listen on (default: localhost:8080) - -r, --resolver= Target DNS resolver to query (default: 127.0.0.1:53) - -t, --no-tls Disable TLS - -c, --cert= TLS certificate file - -k, --key= TLS key file - --resolver-timeout= Resolver timeout (seconds) (default: 2.5) - --proxy-timeout= Proxy timeout (seconds) (default: 2.5) - -v, --verbose Enable verbose logging + -l, --listen= Address to listen on (default: localhost:8080) + -m, --metrics-listen= Address to listen metrics server on (default: localhost:8081) + -r, --resolver= Target DNS resolver (default: 127.0.0.1:53) + -t, --no-tls Disable TLS + -c, --cert= TLS certificate file + -k, --key= TLS key file + --resolver-timeout= Resolver timeout (seconds) (default: 2.5) + --proxy-timeout= Proxy timeout (seconds) (default: 2.5) + -v, --verbose Enable verbose logging + -V, --version Show version and exit Help Options: - -h, --help Show this help message + -h, --help Show this help message ``` diff --git a/main.go b/main.go index 9ad1dca..d02bfbb 100644 --- a/main.go +++ b/main.go @@ -46,7 +46,11 @@ const ( ) // Set by build process -var version = "dev" +var ( + version = "dev" + commit = "unknown" + date = "unknown" +) // CLI flags var opts struct { @@ -59,6 +63,7 @@ var opts struct { ResolverTimeout float32 `long:"resolver-timeout" description:"Resolver timeout (seconds)" default:"2.5"` ProxyTimeout float32 `long:"proxy-timeout" description:"Proxy timeout (seconds)" default:"2.5"` Verbose bool `short:"v" long:"verbose" description:"Enable verbose logging"` + ShowVersion bool `short:"V" long:"version" description:"Show version and exit"` } func keyPair() (*odoh.ObliviousDoHKeyPair, error) { @@ -134,6 +139,11 @@ func main() { log.Debugln("Verbose logging enabled") } + if opts.ShowVersion { + log.Printf("odohd %s commit %s date %s\n", version, commit, date) + os.Exit(0) + } + // Validate TLS cert/key if !opts.DisableTls && (opts.Cert == "" || opts.Key == "") { log.Fatal("--cert and --key must be set when TLS is enabled") From c63310183fa934dd78425c87c6148e29d733319a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 26 Sep 2021 03:47:38 +0000 Subject: [PATCH 55/61] ci: update coverage --- coverage_badge.png | Bin 1687 -> 1516 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/coverage_badge.png b/coverage_badge.png index 2f51bfde41374833a438e932c3875c07608fd78c..08e94d69d1f24173b2bfa8407b1049662c9c3052 100644 GIT binary patch literal 1516 zcmah}_g4}M7)1?t<|@;$rDX{YawX=%iJ+OI1e}Sci9Qi$J~LOt5o)G5$;p$zZCZ+3 z%bZ1K;wn>YVa~K%kAL8u_rrJZJ>R)M+;hKkz6bVpRtH5DL;(Q6L4>ur1COb^0SOE8 z@W8QZ43GGT4pwkL)iCHQ0068&n43C97I5=oQ8G7WBh3;A7)TKp|UXAwp zpmyRMI%-dqEYxgw(}?POh2c zo=b*DM;q{V85tSp8`X}80f9iCR~b>lV5G6xn4sA<#oF+wD1BR7+lI!*Bo5u3sgTm! z6(=AB&{Rm%*4F-KDdxuqsH=L;O^BrM==Ai^(sawp_AYHJHC5aOiJYkO5zEo=c<)NB z42jHY_3K}ljuPssYJb0R>Dtl`U0?nDEu+cB@#`r?X5O)i(ba7N9mo0)?-YwWjJFUm zQ3?%hSiM}7latfOwcmbtJT5deD=SO(EsIsjU;s@rl~uuD{pep1_i8yr=Btqr6(ge} zMT2k@O${M!5V2IoWGYsVr<9z7pz9JnHLZz6Vh?*DTTMwz>k+Sj^zg7SotAK}gM2qP z{B!WduGOtYGGstjR`w)9T1Q8R*1WnJ0)xS7FpM9w?HC8z zf8UQE4(*HQ8zPkVx7;V$JbAV$@T=nXWz!olt@#7GXRfXONy@R0_h!AeU3*rPmuGWQ z@=04;QNG?^7htg0&xwn0pb+m0scC6%Mn^lAmo?4I%$i-*Im3lWIJ~Qj9m_}*I&>W8 z=XW356h!#;t}-2}G!_&X=rhwA4J5NNjR*-;pzVcza&eqEE*cnw- zQPN8pSV%}nSKqhq-_gy%r;d}Xbo2}i@=L8q(&B>pF@LlNax^Hb=(99dLP+F0b9vlV ztlou7Mm-U`pC%*92p$_;uk3=sdn308KDAwr(!Z^CBi7i`*HwMCZ1ZE?en$aWcIdai zE_L>&3KR+rb$4^K_3|oKt!Qtjl$9xu=^!#|Ch+T&FIfg7Z`)VbUjc2{JMdhg;|B?_n+{R?j!c5ABjCiv4ZbCMT&2TaK9G@oEmmamNXF3lVRcHq*X z3T6Ha)aR%8!{iiXWV*|dITu5}NXn_Z3il3@p$R1=ryU#}ugC%^Bh*T)M}wbKrt%v$ z+s4hUkcK5W87L_UP+15x8ttNIc!fIk_AT7mc`Pw4nf0}-zW$Mnid{|Mq;9LbhN7Zk z@k&7fh<-KT%lIAZZ`#fh7_yz&`jn%_+Md?EE%v@X#Vu;P_%i?`;?rX_H1~PH2Y^Sh z?W)2AV&cH9o5&1WH!0CS*YSx)kMSp9{QgldySN}Jj_j8s|1GkO`JNu0|2xq9ffet4 O0}vK==2dXd_{oQ-+hkMWc-Q{6`pZ8H+kS+iK zIEwJ`K&r7$Ef5``T7$+am(`#_M0#HXGz>%34loemaW&{)<&q~o8`~9F`?>LyeiR*vG-Ju8xbL25-$;T6cK)Cfvb= z)JqOsd}F>xtXW3Wapx9sE7~xClrfv5!*Xp`K3kTx>Ak)l$GErwExoctu1u-;wIW^G zEgj5ji4+u^y{m%3RsC!MqlaoVC-VFI*$`b*WX95ob4D>H|Hl}$5m#kpY2h8fXeMoX zI;0`2!z(ThW@cseZDqF!L*&|ul8~3@9X9$5 zBXJjOhx@m7oR(95V)*BW@xXCUUiHFn+-Kd}@umRZ6ppX9GkwSGNLb7sVwBP`wJM*O zoLnGvEPwfeC6VZ@aZ|;QAG;HY&9P9Som?)L$z=0M?4sz>u`#5+fk9n;JvrtGhVGm& z4^S$V?V;9&o)MzHe67r@91iE4f}0}6ZEtVCU@}o;M+b+b&H1ar5En*)x;J=-*}LrY zl#f{305m$=N(h0cI}Ntg)@Em9Xbj@)y$en9Ik@YK`j)DG)&Vri;0$3mD@_U?01|by zlz?hJT==({%QF9)^YSYjRdA`{&715;jFNg^AVD*LMk(t3E$WGY^7a5jeTuieZ|-i_ zSUn|u#vJ)wOH(*txgvqXV0zq7{=fVJMxjuH!^25?+lxiFG}Y{VlL3%OB)w9BW=;^}mT(d{SqK{o^q3sD*jbf?~)6&u~U8$G8e~cI+r>45#`Gr74 z@#cXtLUb}$+cPkM9U6th-Lf^VYA8K<-j3_>2SNKxKKGffAr^ONeK-#RByt*GL=wNf zcE=M@TvS8FzXygv6nQ`pp_7Bp=&|#NbtpRx2BStKBv-%ZkIlRbvS#uN3bOMob9#1n zotWtQoC|%o9Io$GR#rY|GIMXwwrK}>76Q%kBf_(HHATU)!_nV5~WeaFu|HS;=JShdp}GIXwgF;L&^w0drEsUHP`kMAWaBA+)p`g8Z5 zhY7TM%d!+kOvvl(AN(3Nxx^A}Z2sGn!Qv{?;2_n}5oov1$fx1rl7QZgr0m2H)w}V; zxM#z#*hi^uCP*Z5LfY5oH6Rr7);hy&>gwuDBVSuZz6#k)?F!_FJn&IgUZGZe{hFTV zWwtuiC?2c19?`9)!NS5~Wps4()qHw%w1vIBJ$|~$)QUi%zz-A>-f}WBJbYLonLX82 z$&WpWur4f?JhZtrR_46u3~9TD13OB2EkDB*ls9_ohAvS5&Dg%#KQNE#Kjcvo8JB0LpeMd<4nyBtPGA^hd`+@%s;;}$;?1CSMKFwAXWjW57Z z9Z8VrufN(8MLGYy?I8w!C zv!^AbmrN#)vwqKIWqq9h0)Zy>sPVWpl51vWW-^KNO%qi`3AH|@sj2z$Mnr@ut{Fql zJ&qWn4_F}S<4)w&esRj`jHq1JDd=EPKn^yhTS*_v+)6gd6%)_}RA+hVZc*(kRuBGm z|D<`J8^4i&)@*W>AI%xG`C*;QA5kGsZ1 Date: Sat, 6 Nov 2021 17:13:26 -0700 Subject: [PATCH 56/61] bump to go 1.17 and update deps --- go.mod | 31 +++++++++++++++++++++++++------ go.sum | 18 +++++++++--------- 2 files changed, 34 insertions(+), 15 deletions(-) diff --git a/go.mod b/go.mod index 5416bc3..86e8fc3 100644 --- a/go.mod +++ b/go.mod @@ -1,14 +1,33 @@ module github.com/emeraldonion/odohd -go 1.16 +go 1.17 require ( - github.com/cisco/go-hpke v0.0.0-20210215210317-01c430f1f302 - github.com/cloudflare/odoh-go v0.1.6 + github.com/cisco/go-hpke v0.0.0-20210524174249-dd22b38cf960 + github.com/cloudflare/odoh-go v1.0.0 github.com/jessevdk/go-flags v1.5.0 - github.com/miekg/dns v1.1.41 + github.com/miekg/dns v1.1.43 github.com/prometheus/client_golang v1.11.0 github.com/sirupsen/logrus v1.8.1 - github.com/stretchr/testify v1.6.1 - golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4 // indirect + github.com/stretchr/testify v1.7.0 +) + +require ( + git.schwanenlied.me/yawning/x448.git v0.0.0-20170617130356-01b048fb03d6 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/cespare/xxhash/v2 v2.1.1 // indirect + github.com/cisco/go-tls-syntax v0.0.0-20200617162716-46b0cfb76b9b // indirect + github.com/cloudflare/circl v1.0.0 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/golang/protobuf v1.4.3 // indirect + github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/prometheus/client_model v0.2.0 // indirect + github.com/prometheus/common v0.26.0 // indirect + github.com/prometheus/procfs v0.6.0 // indirect + golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83 // indirect + golang.org/x/net v0.0.0-20210226172049-e18ecbb05110 // indirect + golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40 // indirect + google.golang.org/protobuf v1.26.0-rc.1 // indirect + gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c // indirect ) diff --git a/go.sum b/go.sum index e73d6a7..9c3b68b 100644 --- a/go.sum +++ b/go.sum @@ -12,14 +12,15 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cisco/go-hpke v0.0.0-20210215210317-01c430f1f302 h1:unAbn7dpE8eeUfWRaOPl1qTfffhIcCNuKQuECGNGWtk= github.com/cisco/go-hpke v0.0.0-20210215210317-01c430f1f302/go.mod h1:RSsoIHRMBe69FbF/fIbmWYa3rrC6vuPyC0MbNUpel3Q= +github.com/cisco/go-hpke v0.0.0-20210524174249-dd22b38cf960 h1:eh0zzzreqmFagQ5lzYQmVUrPqJ9moWAn7zz4NiEqsGA= +github.com/cisco/go-hpke v0.0.0-20210524174249-dd22b38cf960/go.mod h1:RSsoIHRMBe69FbF/fIbmWYa3rrC6vuPyC0MbNUpel3Q= github.com/cisco/go-tls-syntax v0.0.0-20200617162716-46b0cfb76b9b h1:Ves2turKTX7zruivAcUOQg155xggcbv3suVdbKCBQNM= github.com/cisco/go-tls-syntax v0.0.0-20200617162716-46b0cfb76b9b/go.mod h1:0AZAV7lYvynZQ5ErHlGMKH+4QYMyNCFd+AiL9MlrCYA= github.com/cloudflare/circl v1.0.0 h1:64b6pyfCFbYm623ncIkYGNZaOcmIbyd+CjyMi2L9vdI= github.com/cloudflare/circl v1.0.0/go.mod h1:MhjB3NEEhJbTOdLLq964NIUisXDxaE1WkQPUxtgZXiY= -github.com/cloudflare/odoh-go v0.1.6 h1:siTTv/pBXztJORDgVNDAYKdTboenwWFMDD1B9YQHkag= -github.com/cloudflare/odoh-go v0.1.6/go.mod h1:J3Doz827YDYvz4hEmJU6q45hRFOqxUBL6NRUuEfjMxA= +github.com/cloudflare/odoh-go v1.0.0 h1:4ZRBHNFC0wefDpWKuSXDuw6SsEulP3QrS/rqG9RVCgo= +github.com/cloudflare/odoh-go v1.0.0/go.mod h1:J3Doz827YDYvz4hEmJU6q45hRFOqxUBL6NRUuEfjMxA= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -67,8 +68,8 @@ github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/miekg/dns v1.1.41 h1:WMszZWJG0XmzbK9FEmzH2TVcqYzFesusSIB41b8KHxY= -github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= +github.com/miekg/dns v1.1.43 h1:JKfpVSCB84vrAmHzyrsxB5NAr5kLoMXZArPSw7Qlgyg= +github.com/miekg/dns v1.1.43/go.mod h1:+evo5L0630/F6ca/Z9+GAqzhjGyn8/c+TBaOyfEl0V4= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= @@ -108,8 +109,9 @@ github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -122,9 +124,8 @@ golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110 h1:qWPm9rbaAMKs8Bq/9LRpbMqxWRVUAQwMI9fVrssnTfw= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4 h1:b0LrWgu8+q7z4J+0Y3Umo5q1dL7NXBkKBWkaVkAq17E= -golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -147,7 +148,6 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40 h1:JWgyZ1qgdTaF3N3oxC+MdTV7qvEEgHo3otj+HB5CM7Q= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= From 952e8b03fc0ac61a820d701f69b89873a5e49f2f Mon Sep 17 00:00:00 2001 From: Nate Sales Date: Sat, 6 Nov 2021 17:19:02 -0700 Subject: [PATCH 57/61] refactor: defer proxy response error handler --- proxy.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/proxy.go b/proxy.go index b4337c3..4b0bc6c 100644 --- a/proxy.go +++ b/proxy.go @@ -115,8 +115,13 @@ func (p *proxyServer) proxyQueryHandler(w http.ResponseWriter, r *http.Request) return } - //goland:noinspection GoUnhandledErrorResult - defer response.Body.Close() + defer func(body io.ReadCloser) { + err := body.Close() + if err != nil { + log.Warn(err) + } + }(response.Body) + responseBody, err := ioutil.ReadAll(response.Body) if err != nil { http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError) From ee6beb22e3df76419527343d24d12e6bee5e033a Mon Sep 17 00:00:00 2001 From: Nate Sales Date: Sat, 6 Nov 2021 17:26:57 -0700 Subject: [PATCH 58/61] feat: add docker build --- .github/workflows/release.yml | 8 +++++++- .goreleaser.yml | 23 +++++++++++++++++++++-- Dockerfile | 3 +++ 3 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 Dockerfile diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e6c2da4..9f4c3bc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,7 +16,13 @@ jobs: - name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.16 + go-version: 1.17 + - name: Docker Login + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Run GoReleaser uses: goreleaser/goreleaser-action@v2 with: diff --git a/.goreleaser.yml b/.goreleaser.yml index a7e90ab..c8611c3 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -2,8 +2,7 @@ before: hooks: - go mod download builds: - - - env: + - env: - CGO_ENABLED=0 goos: - linux @@ -24,3 +23,23 @@ nfpms: formats: - deb - rpm +dockers: + - image_templates: ["ghcr.io/emeraldonion/odohd:{{ .Version }}-amd64"] + dockerfile: Dockerfile + use: buildx + build_flag_templates: + - --platform=linux/amd64 + - --label=org.opencontainers.image.title=odohd + - --label=org.opencontainers.image.description=Oblivious DNS over HTTPS Server + - --label=org.opencontainers.image.url=https://github.com/emeraldonion/odohd + - --label=org.opencontainers.image.source=https://github.com/emeraldonion/odohd + - --label=org.opencontainers.image.version={{ .Version }} + - --label=org.opencontainers.image.revision={{ .FullCommit }} + - --label=org.opencontainers.image.licenses=MIT +docker_manifests: + - name_template: ghcr.io/emeraldonion/odohd:{{ .Version }} + image_templates: + - ghcr.io/emeraldonion/odohd:{{ .Version }}-amd64 + - name_template: ghcr.io/emeraldonion/odohd:latest + image_templates: + - ghcr.io/emeraldonion/odohd:{{ .Version }}-amd64 diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..c397aa0 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,3 @@ +FROM alpine +COPY odohd /usr/bin/odohd +ENTRYPOINT ["/usr/bin/odohd"] From d5fbba68723f46e827b1dd116f3c99073ae6f83f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 7 Nov 2021 00:28:03 +0000 Subject: [PATCH 59/61] ci: update coverage --- coverage_badge.png | Bin 1516 -> 1795 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/coverage_badge.png b/coverage_badge.png index 08e94d69d1f24173b2bfa8407b1049662c9c3052..579906919b7654341eba5aa590384d1ae5603563 100644 GIT binary patch literal 1795 zcmV+e2mJVnP)uHG*QL^Ri!FTg1RJX@YI&kfr8x^oTgPfVBNB5+7^sG)ggiqY>2Qi zPCXL{$(f6N!QLMyooE2tY10?U_xbC&-#yRw_xzskz4(z2(P%Wla$lJ}^tT^-3bEk) z*b`v+pgo!GLd%L^7*<_ftxzZc!0Yu|ESBNn;TQ^y zjg9BepSRg;^zd!lwh4tolgY&8a?NHlK@fD@<#HW6b_@XM`0VT~0C+r}*4EaWH*Yf8 z%gf94dVNz zpQ<&lJ}IsbM?>#=oBlEL2>=|Bo)+@5n#ZaVPkj%TA2@Kp=kpm1hEOP!ot?dN=T07v zM^O|296Wf?;cys@Mh=Ig)oSn2z>19P48X6`hCiHrJG#XvMe!WyGr7d4c!D_WC zl}g5PrBd0^(LuLKlB}(*U7CU>P~-${G3NJpK2I=?4D95`d}|EE*6W$ot>TZ%{M(g-P+npuS-!;QEF=HxpU_h78WRq z>gebwD=QNUg-b;W3kz`^H=E513k#7*K)!#*G_!JRSguL?V$$G(J9_ z$b_TO=*Y+jj^j)uEiElCFVAE$DV0hDLE_f+y%GpdnXbKMy7tx=fsQq3;oP0;f1j}c zKsqn;v23mT_GqK)NsIpvC*1p)Are%I05U}Mj|6S0+|@!}=2H*6G(=cOg8#jz)QR5Z zQmNGGbVeePrKj@p@~&RJ${bP@<@I_c63N`$++98M^YdLU7yT|sP$3u$j*pLT*s#Ij za3~atfq?<08-`(RZEbYh<#M&Ov@F)-^Z8r1ZXFyPWFlL(Y;iaoe!qWye!jT4*yVD? zt}AYe`$E;4S1``1E?)~72?9Vt%7a{lhw~+EKl={=_`{x;uKaSA3IM?M@Yet!7Ubs$ z)>6?B2e`k=e(tsLs=D0QAIZ`XcjkFAr| zE*B95S?VhQpeVYMehh{F{(hB8<#0GuDwWx6X8MpMsnh9}N?{mw>eQ*s%*_7&{=U9G zCazYidwY8Uz;3szR4Ur?*mbRx;(mb(a(|6KKT8EZ3;dCeWbkkR`1g&^+o#^Bku+6g zKU;~{b^4A1fcy67U$1|7RMrguZQj?ni**y^m2f2Vbk6=GS8KP5D)$%s{`p}=+@y&< z*xhcoTrTHwxd3qZ@L`=!M^O~LSW{C|MMXtSPd=ZYo15$N`Id@!JRX@$#w;;IYz4dB zzG>5@jEoE%$H&IT;!c$$NrS;~{P^*bl9KfFbUL_d)vA(`5}i(GG#bmx%T+2>+`4`M zo?CN>kDwpF)ITvO+wNHV=jqN$y!L~yPe{;0 z02rA2a+t75P-!Ab6SdswbozY0y1F_H!vG*HEsb6#02mt^3xz^EcI@DCxqLo<_wL=7 zE?rvuJ9)7PNs_yE?c($K91ce=mseCn^&!tHizwOYH~zU;$eS%!y)`}+DC8XD+% zDin$f7cSJ-*YDf6Z|~l{;c%F~$YRv>eUq0`^k~*IGnD^}z@M1lmEc#?)U}^yR90j^ z`?&Z80I@x3_DxS~_kp7=poITU%RWV`Fb`@5PH3>9|It5eNh(lPN}B z-+Ggl;3pDI>)wA@^c&;kZ$JItdyC`iu+kR`j>}RXnxXs_zwz_H`*#gQIVoKm2H%-% zK0os@0K8mq;$hMD`3Uj0=heHek7cc3v}6DP002ovPDHLkV1gGbg=hc( literal 1516 zcmah}_g4}M7)1?t<|@;$rDX{YawX=%iJ+OI1e}Sci9Qi$J~LOt5o)G5$;p$zZCZ+3 z%bZ1K;wn>YVa~K%kAL8u_rrJZJ>R)M+;hKkz6bVpRtH5DL;(Q6L4>ur1COb^0SOE8 z@W8QZ43GGT4pwkL)iCHQ0068&n43C97I5=oQ8G7WBh3;A7)TKp|UXAwp zpmyRMI%-dqEYxgw(}?POh2c zo=b*DM;q{V85tSp8`X}80f9iCR~b>lV5G6xn4sA<#oF+wD1BR7+lI!*Bo5u3sgTm! z6(=AB&{Rm%*4F-KDdxuqsH=L;O^BrM==Ai^(sawp_AYHJHC5aOiJYkO5zEo=c<)NB z42jHY_3K}ljuPssYJb0R>Dtl`U0?nDEu+cB@#`r?X5O)i(ba7N9mo0)?-YwWjJFUm zQ3?%hSiM}7latfOwcmbtJT5deD=SO(EsIsjU;s@rl~uuD{pep1_i8yr=Btqr6(ge} zMT2k@O${M!5V2IoWGYsVr<9z7pz9JnHLZz6Vh?*DTTMwz>k+Sj^zg7SotAK}gM2qP z{B!WduGOtYGGstjR`w)9T1Q8R*1WnJ0)xS7FpM9w?HC8z zf8UQE4(*HQ8zPkVx7;V$JbAV$@T=nXWz!olt@#7GXRfXONy@R0_h!AeU3*rPmuGWQ z@=04;QNG?^7htg0&xwn0pb+m0scC6%Mn^lAmo?4I%$i-*Im3lWIJ~Qj9m_}*I&>W8 z=XW356h!#;t}-2}G!_&X=rhwA4J5NNjR*-;pzVcza&eqEE*cnw- zQPN8pSV%}nSKqhq-_gy%r;d}Xbo2}i@=L8q(&B>pF@LlNax^Hb=(99dLP+F0b9vlV ztlou7Mm-U`pC%*92p$_;uk3=sdn308KDAwr(!Z^CBi7i`*HwMCZ1ZE?en$aWcIdai zE_L>&3KR+rb$4^K_3|oKt!Qtjl$9xu=^!#|Ch+T&FIfg7Z`)VbUjc2{JMdhg;|B?_n+{R?j!c5ABjCiv4ZbCMT&2TaK9G@oEmmamNXF3lVRcHq*X z3T6Ha)aR%8!{iiXWV*|dITu5}NXn_Z3il3@p$R1=ryU#}ugC%^Bh*T)M}wbKrt%v$ z+s4hUkcK5W87L_UP+15x8ttNIc!fIk_AT7mc`Pw4nf0}-zW$Mnid{|Mq;9LbhN7Zk z@k&7fh<-KT%lIAZZ`#fh7_yz&`jn%_+Md?EE%v@X#Vu;P_%i?`;?rX_H1~PH2Y^Sh z?W)2AV&cH9o5&1WH!0CS*YSx)kMSp9{QgldySN}Jj_j8s|1GkO`JNu0|2xq9ffet4 O0}vK==2dXd_ Date: Thu, 14 Apr 2022 19:08:34 -0700 Subject: [PATCH 60/61] chore: bump dependencies --- go.mod | 27 ++-- go.sum | 388 ++++++++++++++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 387 insertions(+), 28 deletions(-) diff --git a/go.mod b/go.mod index 86e8fc3..85b6498 100644 --- a/go.mod +++ b/go.mod @@ -3,11 +3,11 @@ module github.com/emeraldonion/odohd go 1.17 require ( - github.com/cisco/go-hpke v0.0.0-20210524174249-dd22b38cf960 + github.com/cisco/go-hpke v0.0.0-20220110164554-aec202176774 github.com/cloudflare/odoh-go v1.0.0 github.com/jessevdk/go-flags v1.5.0 - github.com/miekg/dns v1.1.43 - github.com/prometheus/client_golang v1.11.0 + github.com/miekg/dns v1.1.48 + github.com/prometheus/client_golang v1.12.1 github.com/sirupsen/logrus v1.8.1 github.com/stretchr/testify v1.7.0 ) @@ -15,19 +15,22 @@ require ( require ( git.schwanenlied.me/yawning/x448.git v0.0.0-20170617130356-01b048fb03d6 // indirect github.com/beorn7/perks v1.0.1 // indirect - github.com/cespare/xxhash/v2 v2.1.1 // indirect + github.com/cespare/xxhash/v2 v2.1.2 // indirect github.com/cisco/go-tls-syntax v0.0.0-20200617162716-46b0cfb76b9b // indirect - github.com/cloudflare/circl v1.0.0 // indirect + github.com/cloudflare/circl v1.1.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/golang/protobuf v1.4.3 // indirect + github.com/golang/protobuf v1.5.2 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_model v0.2.0 // indirect - github.com/prometheus/common v0.26.0 // indirect - github.com/prometheus/procfs v0.6.0 // indirect - golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83 // indirect - golang.org/x/net v0.0.0-20210226172049-e18ecbb05110 // indirect - golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40 // indirect - google.golang.org/protobuf v1.26.0-rc.1 // indirect + github.com/prometheus/common v0.33.0 // indirect + github.com/prometheus/procfs v0.7.3 // indirect + golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 // indirect + golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 // indirect + golang.org/x/net v0.0.0-20220412020605-290c469a71a5 // indirect + golang.org/x/sys v0.0.0-20220412211240-33da011f77ad // indirect + golang.org/x/tools v0.1.10 // indirect + golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f // indirect + google.golang.org/protobuf v1.28.0 // indirect gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c // indirect ) diff --git a/go.sum b/go.sum index 9c3b68b..9b0de0f 100644 --- a/go.sum +++ b/go.sum @@ -1,6 +1,40 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= +cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= +cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= git.schwanenlied.me/yawning/x448.git v0.0.0-20170617130356-01b048fb03d6 h1:w8IZgCntCe0RuBJp+dENSMwEBl/k8saTgJ5hPca5IWw= git.schwanenlied.me/yawning/x448.git v0.0.0-20170617130356-01b048fb03d6/go.mod h1:wQaGCqEu44ykB17jZHCevrgSVl3KJnwQBObUtrKU4uU= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= @@ -10,54 +44,114 @@ github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24 github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= +github.com/bwesterb/go-ristretto v1.2.0/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= +github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/cisco/go-hpke v0.0.0-20210215210317-01c430f1f302/go.mod h1:RSsoIHRMBe69FbF/fIbmWYa3rrC6vuPyC0MbNUpel3Q= -github.com/cisco/go-hpke v0.0.0-20210524174249-dd22b38cf960 h1:eh0zzzreqmFagQ5lzYQmVUrPqJ9moWAn7zz4NiEqsGA= -github.com/cisco/go-hpke v0.0.0-20210524174249-dd22b38cf960/go.mod h1:RSsoIHRMBe69FbF/fIbmWYa3rrC6vuPyC0MbNUpel3Q= +github.com/cisco/go-hpke v0.0.0-20220110164554-aec202176774 h1:qh4/iQM+NF66UCzC6vcSs+MGBnQeyrcr6Sbv5ObAOIQ= +github.com/cisco/go-hpke v0.0.0-20220110164554-aec202176774/go.mod h1:RSsoIHRMBe69FbF/fIbmWYa3rrC6vuPyC0MbNUpel3Q= github.com/cisco/go-tls-syntax v0.0.0-20200617162716-46b0cfb76b9b h1:Ves2turKTX7zruivAcUOQg155xggcbv3suVdbKCBQNM= github.com/cisco/go-tls-syntax v0.0.0-20200617162716-46b0cfb76b9b/go.mod h1:0AZAV7lYvynZQ5ErHlGMKH+4QYMyNCFd+AiL9MlrCYA= -github.com/cloudflare/circl v1.0.0 h1:64b6pyfCFbYm623ncIkYGNZaOcmIbyd+CjyMi2L9vdI= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cloudflare/circl v1.0.0/go.mod h1:MhjB3NEEhJbTOdLLq964NIUisXDxaE1WkQPUxtgZXiY= +github.com/cloudflare/circl v1.1.0 h1:bZgT/A+cikZnKIwn7xL2OBj012Bmvho/o6RpRvv3GKY= +github.com/cloudflare/circl v1.1.0/go.mod h1:prBCrKB9DV4poKZY1l9zBXg2QJY7mvgRvtMxxK7fi4I= github.com/cloudflare/odoh-go v1.0.0 h1:4ZRBHNFC0wefDpWKuSXDuw6SsEulP3QrS/rqG9RVCgo= github.com/cloudflare/odoh-go v1.0.0/go.mod h1:J3Doz827YDYvz4hEmJU6q45hRFOqxUBL6NRUuEfjMxA= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= +github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= +github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/jessevdk/go-flags v1.5.0 h1:1jKYvbxEjfUl0fmqTCOfonvskHHXMjBySTLW4y9LFvc= github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= @@ -68,12 +162,13 @@ github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/miekg/dns v1.1.43 h1:JKfpVSCB84vrAmHzyrsxB5NAr5kLoMXZArPSw7Qlgyg= -github.com/miekg/dns v1.1.43/go.mod h1:+evo5L0630/F6ca/Z9+GAqzhjGyn8/c+TBaOyfEl0V4= +github.com/miekg/dns v1.1.48 h1:Ucfr7IIVyMBz4lRE8qmGUuZ4Wt3/ZGu9hmcMT3Uu4tQ= +github.com/miekg/dns v1.1.48/go.mod h1:e3IlAVfNqAllflbibAZEWOXOQ+Ynzk/dDozDxY7XnME= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -84,21 +179,27 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.11.0 h1:HNkLOAEQMIDv/K+04rukrLx6ch7msSRwf3/SASFAGtQ= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= +github.com/prometheus/client_golang v1.12.1 h1:ZiaPsmm9uiBeaSMRznKsCDNtPCS0T3JVDGF+06gjBzk= +github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.26.0 h1:iMAkS2TDoNWnKM+Kopnx/8tnEStIfpYA0ur0xQzzhMQ= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= +github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= +github.com/prometheus/common v0.33.0 h1:rHgav/0a6+uYgGdNt3jwz8FNSesO/Hsang3O0T9A5SE= +github.com/prometheus/common v0.33.0/go.mod h1:gB3sOl7P0TvJabZpLY5uQMpUqRCPPCyRLCZYc7JZTNE= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.6.0 h1:mxy4L2jP6qMonqmq+aTtOx1ifVWUgG/TAmntgbh3xv4= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU= +github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= @@ -112,70 +213,325 @@ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81P github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83 h1:/ZScEX8SfEmUGRHs0gxpqteO5nfNW6axyZbBdw9A12g= golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 h1:kUhD7nTDoI3fVd9G4ORWrbV5NY0liEs/Jg2pv5f+bBA= +golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 h1:kQgndtyPBW/JIYERgdxfwMYh3AVStj88WQTlNDi2a+o= +golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110 h1:qWPm9rbaAMKs8Bq/9LRpbMqxWRVUAQwMI9fVrssnTfw= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210726213435-c6fcb2dbf985/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220412020605-290c469a71a5 h1:bRb386wvrE+oBNdF1d/Xh9mQrfQ4ecYhW5qJ5GvTGT4= +golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190602015325-4c4f7f33c9ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40 h1:JWgyZ1qgdTaF3N3oxC+MdTV7qvEEgHo3otj+HB5CM7Q= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220412211240-33da011f77ad h1:ntjMns5wyP/fN65tdBD4g8J5w8n015+iIIs9rtjXkY0= +golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.1.6-0.20210726203631-07bc1bf47fb2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.10 h1:QjFRCZxdOhBJ/UNgnBZLbNV13DlbnK0quyivTnXJM20= +golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f h1:GGU+dLjvlC3qDwqYgL6UgRmHXhOOgns0bZu2Ty5mm6U= +golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= +google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.26.0-rc.1 h1:7QnIQpGRHE5RnLKnESfDoxm2dTapTZua5a0kS0A+VXQ= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= +google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= From d9989f681a9ca5fa12ee07561075526856f80a11 Mon Sep 17 00:00:00 2001 From: Nate Sales Date: Thu, 14 Apr 2022 19:09:20 -0700 Subject: [PATCH 61/61] refactor: remove ioutil and unused test code --- proxy.go | 8 +++----- proxy_test.go | 22 ---------------------- target.go | 11 ++++------- target_test.go | 14 +++++--------- 4 files changed, 12 insertions(+), 43 deletions(-) diff --git a/proxy.go b/proxy.go index 4b0bc6c..e5baea9 100644 --- a/proxy.go +++ b/proxy.go @@ -27,7 +27,6 @@ import ( "errors" "fmt" "io" - "io/ioutil" "net/http" log "github.com/sirupsen/logrus" @@ -46,8 +45,7 @@ var ( ) func forwardProxyRequest(client *http.Client, targetName string, targetPath string, body []byte, headerContentType string) (*http.Response, error) { - targetURL := "https://" + targetName + targetPath - req, err := http.NewRequest("POST", targetURL, bytes.NewReader(body)) + req, err := http.NewRequest("POST", "https://"+targetName+targetPath, bytes.NewReader(body)) if err != nil { log.Println("Failed creating target POST request") return nil, errors.New("failed creating target POST request") @@ -93,7 +91,7 @@ func (p *proxyServer) proxyQueryHandler(w http.ResponseWriter, r *http.Request) log.Warn(err) } }(r.Body) - body, err := ioutil.ReadAll(r.Body) + body, err := io.ReadAll(r.Body) if err != nil || len(body) == 0 { p.lastError = errEmptyRequestBody log.Printf(p.lastError.Error()) @@ -122,7 +120,7 @@ func (p *proxyServer) proxyQueryHandler(w http.ResponseWriter, r *http.Request) } }(response.Body) - responseBody, err := ioutil.ReadAll(response.Body) + responseBody, err := io.ReadAll(response.Body) if err != nil { http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError) return diff --git a/proxy_test.go b/proxy_test.go index e713ecd..360cb9c 100644 --- a/proxy_test.go +++ b/proxy_test.go @@ -24,35 +24,13 @@ package main import ( "fmt" - "io/ioutil" "net/http" "net/http/httptest" "net/url" "strings" "testing" - - log "github.com/sirupsen/logrus" ) -type testTarget struct { - expectedStatusCode int -} - -func (t testTarget) handleRequest(w http.ResponseWriter, r *http.Request) { - body, err := ioutil.ReadAll(r.Body) - if err != nil { - http.Error(w, http.StatusText(http.StatusBadRequest), http.StatusBadRequest) - return - } - - headerContentType := r.Header.Get("Content-Type") - w.Header().Set("Content-Type", headerContentType) - _, err = w.Write(body) - if err != nil { - log.Warn(err) - } -} - func TestProxyMethod(t *testing.T) { proxy := proxyServer{} diff --git a/target.go b/target.go index cd2b726..3c65bb1 100644 --- a/target.go +++ b/target.go @@ -28,7 +28,6 @@ import ( "errors" "fmt" "io" - "io/ioutil" "net/http" "time" @@ -38,10 +37,8 @@ import ( ) type targetServer struct { - resolver resolver - odohKeyPair odoh.ObliviousDoHKeyPair - serverInstanceName string - experimentId string + resolver resolver + odohKeyPair odoh.ObliviousDoHKeyPair } const ( @@ -80,7 +77,7 @@ func (s *targetServer) parseQueryFromRequest(r *http.Request) (*dns.Msg, error) log.Warn(err) } }(r.Body) - encodedMessage, err := ioutil.ReadAll(r.Body) + encodedMessage, err := io.ReadAll(r.Body) if err != nil { return nil, err } @@ -160,7 +157,7 @@ func (s *targetServer) parseObliviousQueryFromRequest(r *http.Request) (odoh.Obl log.Warn(err) } }(r.Body) - encryptedMessageBytes, err := ioutil.ReadAll(r.Body) + encryptedMessageBytes, err := io.ReadAll(r.Body) if err != nil { return odoh.ObliviousDNSMessage{}, err } diff --git a/target_test.go b/target_test.go index 8efae53..b7c70b6 100644 --- a/target_test.go +++ b/target_test.go @@ -28,7 +28,7 @@ import ( "encoding/base64" "errors" "fmt" - "io/ioutil" + "io" "net" "net/http" "net/http/httptest" @@ -44,10 +44,6 @@ type localResolver struct { queryResponseMap map[string][]byte // Packed DNS queries to responses } -func (r localResolver) name() string { - return "localResolver" -} - func (r localResolver) resolve(query *dns.Msg) (*dns.Msg, error) { packedQuery, err := query.Pack() if err != nil { @@ -146,7 +142,7 @@ func TestConfigHandler(t *testing.T) { t.Fatal(fmt.Errorf("failed request with error code: %d", status)) } - body, err := ioutil.ReadAll(rr.Result().Body) + body, err := io.ReadAll(rr.Result().Body) if err != nil { t.Fatal("Failed to read body:", err) } @@ -199,7 +195,7 @@ func TestQueryHandlerDoHWithPOST(t *testing.T) { t.Fatal("invalid content type response") } - responseBody, err := ioutil.ReadAll(rr.Result().Body) + responseBody, err := io.ReadAll(rr.Result().Body) if err != nil { t.Fatal(err) } @@ -233,7 +229,7 @@ func TestQueryHandlerDoHWithGET(t *testing.T) { t.Fatal("invalid content type response") } - responseBody, err := ioutil.ReadAll(rr.Result().Body) + responseBody, err := io.ReadAll(rr.Result().Body) if err != nil { t.Fatal(err) } @@ -320,7 +316,7 @@ func TestQueryHandlerODoH(t *testing.T) { t.Fatal("invalid content type response") } - responseBody, err := ioutil.ReadAll(rr.Result().Body) + responseBody, err := io.ReadAll(rr.Result().Body) if err != nil { t.Fatal(err) }