java:set-proxy
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/pages/java/set-proxy.txt · Last modified: 2016/05/05 13:07 by 127.0.0.1