String proxy = "proxy.mydomain.com",
port = "8080";
URL url = new URL( "http://www.google.com/" );
Properties systemProperties = System.getProperties();
systemProperties.setProperty("http.proxyHost",proxy);
systemProperties.setProperty("http.proxyPort",port);
HttpURLConnection connection = (HttpURLConnection)url.openConnection();
connection.connect();
Không có nhận xét nào:
Đăng nhận xét