- anged user agent for outproxy from Wget/1.11.4 to Firefox 3.6.6 on WinXP to avoid getting blocked as a crawler

This commit is contained in:
privateer
2010-07-05 14:35:22 +00:00
parent 5dee6cb3d5
commit 826951536b

View File

@@ -644,12 +644,13 @@ public class I2PTunnelHTTPClient extends I2PTunnelClientBase implements Runnable
}
if (!Boolean.valueOf(getTunnel().getClientOptions().getProperty(PROP_USER_AGENT)).booleanValue()) {
// let's not advertise to external sites that we are from I2P
UASwitcher ua_switcher = new UASwitcher();
if (usingWWWProxy)
newRequest.append("User-Agent: Wget/1.11.4\r\n");
newRequest.append("User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.6) Gecko/20100625 Firefox/3.6.6\r\n");
else
newRequest.append("User-Agent: MYOB/6.66 (AN/ON)\r\n");
}
newRequest.append("Connection: close\r\n\r\n");
newRequest.append("Connection: close\r\n\r\n");
break;
} else {
newRequest.append(line).append("\r\n"); // HTTP spec