HttpHost proxy = new HttpHost(proxyHost, proxyPort);
httpclient.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY, proxy);
}
public static void setProxy(String proxyHost, int proxyPort, String username, String password) {
httpclient.getCredentialsProvider().setCredentials(new AuthScope(proxyHost, proxyPort),
new UsernamePasswordCredentials(username, password));
setProxy(proxyHost, proxyPort);
}