java:set-proxy
This is an old revision of the document!
Table of Contents
在Java程序中如何设置代理
http代理设置
System.getProperties().put("proxySet", "true"); System.getProperties().put("proxyHost", "172.31.170.14"); System.getProperties().put("proxyPort", "8080");如果上面的不行,用下面这段:
System.getProperties().setProperty("http.proxyHost", Const.proxyHost); System.getProperties().setProperty("http.proxyPort", ""+Const.proxyPort);
https代理设置
/var/www/dokuwiki/wiki/data/attic/java/set-proxy.1273665526.txt.gz · Last modified: 2016/05/05 13:06 (external edit)