use a different user agent for outproxy traffic

This commit is contained in:
zzz
2010-06-13 16:04:28 +00:00
parent c460ac8ade
commit 34a1085604

View File

@ -643,8 +643,13 @@ public class I2PTunnelHTTPClient extends I2PTunnelClientBase implements Runnable
newRequest.append("Accept-Encoding: \r\n");
newRequest.append("X-Accept-Encoding: x-i2p-gzip;q=1.0, identity;q=0.5, deflate;q=0, gzip;q=0, *;q=0\r\n");
}
if (!Boolean.valueOf(getTunnel().getClientOptions().getProperty(PROP_USER_AGENT)).booleanValue())
newRequest.append("User-Agent: MYOB/6.66 (AN/ON)\r\n");
if (!Boolean.valueOf(getTunnel().getClientOptions().getProperty(PROP_USER_AGENT)).booleanValue()) {
// let's not advertise to external sites that we are from I2P
if (usingWWWProxy)
newRequest.append("User-Agent: Wget/1.11.4\r\n");
else
newRequest.append("User-Agent: MYOB/6.66 (AN/ON)\r\n");
}
newRequest.append("Connection: close\r\n\r\n");
break;
} else {