int port = 80;
try
{
Integer.parseInt(System.getProperty("http.proxyPort", "80"));
}
catch (NumberFormatException e)
{
log.warn("System property 'http.proxyPort' is not a number. Defaulting to 80.");
}
client.getHostConfiguration().setProxy(host, port);