From f9019f46a46ef4839af711495b88a1d4290d1a9f Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Fri, 29 Nov 2019 21:24:06 +0100 Subject: [PATCH 1/2] 2019 --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index dcff33ad..318d18cc 100644 --- a/LICENSE +++ b/LICENSE @@ -1,7 +1,7 @@ /* * ISC License * - * Copyright (c) 2018 + * Copyright (c) 2018-2019 * Frank Denis * * Permission to use, copy, modify, and/or distribute this software for any From 21c63a5608106617697861817748b92ca2cd7d51 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Fri, 29 Nov 2019 21:34:16 +0100 Subject: [PATCH 2/2] Local-DoH: pad responses --- dnscrypt-proxy/local-doh.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dnscrypt-proxy/local-doh.go b/dnscrypt-proxy/local-doh.go index a0d8e130..4b64b3b1 100644 --- a/dnscrypt-proxy/local-doh.go +++ b/dnscrypt-proxy/local-doh.go @@ -6,6 +6,7 @@ import ( "io/ioutil" "net" "net/http" + "strings" "time" "github.com/jedisct1/dlog" @@ -46,7 +47,9 @@ func (handler localDoHHandler) ServeHTTP(writer http.ResponseWriter, request *ht writer.WriteHeader(500) return } + padLen := 127 - (len(response)+127)&127 writer.Header().Set("Content-Type", dataType) + writer.Header().Set("X-Pad", strings.Repeat("X", padLen)) writer.WriteHeader(200) writer.Write(response) }