Util, i2ptunnel: Update firefox user-agent

This commit is contained in:
zzz
2022-02-23 07:08:34 -05:00
parent 9c3f8602da
commit 265f5ee5df
2 changed files with 8 additions and 3 deletions

View File

@@ -38,6 +38,7 @@ import net.i2p.data.Destination;
import net.i2p.data.Hash;
import net.i2p.i2ptunnel.localServer.LocalHTTPServer;
import net.i2p.util.ConvertToHash;
import net.i2p.util.DNSOverHTTPS;
import net.i2p.util.EventDispatcher;
import net.i2p.util.Log;
import net.i2p.util.PortMapper;
@@ -92,7 +93,7 @@ public class I2PTunnelHTTPClient extends I2PTunnelHTTPClientBase implements Runn
"\r\n";
// ESR version of Firefox, same as Tor Browser
private static final String UA_CLEARNET = "User-Agent: " +
"Mozilla/5.0 (Windows NT 10.0; rv:78.0) Gecko/20100101 Firefox/78.0" +
DNSOverHTTPS.UA_CLEARNET +
"\r\n";
// overrides
private static final String PROP_UA_I2P = "httpclient.userAgent.i2p";

View File

@@ -64,8 +64,12 @@ 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";
/**
* ESR version of Firefox, same as Tor Browser
*
* @since public since 0.9.54 for i2ptunnel
*/
public static final String UA_CLEARNET = "Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0";
private static final int MAX_RESPONSE_SIZE = 2048;
private static final boolean DEBUG = false;