Sunday, May 11, 2008

การ set Proxy

โดยสามารถ แทรกเข้าไปใน code ได้เลย

1. กรณีเป็น https
Properties systemProperties = System.getProperties();
systemProperties.setProperty("https.proxyHost","111.111.2.60");
systemProperties.setProperty("https.proxyPort","9090");

2. กรณีเป็น http
Properties systemProperties = System.getProperties();
systemProperties.setProperty("http.proxyHost","111.111.2.60");
systemProperties.setProperty("http.proxyPort","9090");

No comments: