From 7b1ccd1053818c38d907d118836ffac105efcae9 Mon Sep 17 00:00:00 2001 From: Krish De Souza Date: Sun, 28 Jun 2020 17:20:20 +0100 Subject: [PATCH] Issue #1380: Reenable HTTP/2 for local DoH (#1384) +Updated ci-test number 25 looking for invalid 404 to reflect changes here --- .ci/ci-test.sh | 2 +- dnscrypt-proxy/local-doh.go | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/.ci/ci-test.sh b/.ci/ci-test.sh index 60ed11d9..d2095c53 100755 --- a/.ci/ci-test.sh +++ b/.ci/ci-test.sh @@ -82,7 +82,7 @@ t || dig -p${DNS_PORT} tracker.xdebian.org @127.0.0.1 | grep -Fq 'locally blocke t || dig -p${DNS_PORT} tracker.debian.org @127.0.0.1 | grep -Fqv 'locally blocked' || fail section -t || curl --insecure -siL https://127.0.0.1:${HTTP_PORT}/ | grep -Fq '404 Not Found' || fail +t || curl --insecure -siL https://127.0.0.1:${HTTP_PORT}/ | grep -Fq 'HTTP/2 404' || fail t || curl --insecure -sL https://127.0.0.1:${HTTP_PORT}/dns-query | grep -Fq 'dnscrypt-proxy local DoH server' || fail t || echo yv4BAAABAAAAAAABAAACAAEAACkQAAAAgAAAAA== | base64 -d | diff --git a/dnscrypt-proxy/local-doh.go b/dnscrypt-proxy/local-doh.go index b1abed22..00ed6bee 100644 --- a/dnscrypt-proxy/local-doh.go +++ b/dnscrypt-proxy/local-doh.go @@ -1,7 +1,6 @@ package main import ( - "crypto/tls" "io" "io/ioutil" "net" @@ -86,11 +85,9 @@ func (proxy *Proxy) localDoHListener(acceptPc *net.TCPListener) { if len(proxy.localDoHCertFile) == 0 || len(proxy.localDoHCertKeyFile) == 0 { dlog.Fatal("A certificate and a key are required to start a local DoH service") } - noh2 := make(map[string]func(*http.Server, *tls.Conn, http.Handler)) httpServer := &http.Server{ ReadTimeout: proxy.timeout, WriteTimeout: proxy.timeout, - TLSNextProto: noh2, Handler: localDoHHandler{proxy: proxy}, } httpServer.SetKeepAlivesEnabled(true)