I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit e6717413 authored by zzz's avatar zzz
Browse files

DoH: Set user agent

parent ab55f27e
No related branches found
No related tags found
No related merge requests found
......@@ -49,6 +49,9 @@ public class DNSOverHTTPS implements EepGet.StatusListener {
// consecutive failures
private static final ObjectCounter<String> fails = new ObjectCounter<String>();
// ESR version of Firefox, same as Tor Browser
private static final String UA_CLEARNET = "Mozilla/5.0 (Windows NT 10.0; rv:78.0) Gecko/20100101 Firefox/78.0";
// Don't look up any of these TLDs
// RFC 2606, 6303, 7393
// https://www.iana.org/assignments/locally-served-dns-zones/locally-served-dns-zones.xhtml
......@@ -269,6 +272,7 @@ public class DNSOverHTTPS implements EepGet.StatusListener {
baos.reset();
SSLEepGet eepget = new SSLEepGet(ctx, baos, furl, state);
eepget.forceDNSOverHTTPS(false);
eepget.addHeader("User-Agent", UA_CLEARNET);
if (ctx.isRouterContext())
eepget.addStatusListener(this);
else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment