设置ip代理

来源:互联网 发布:如何自建cdn源码 编辑:程序博客网 时间:2024/05/01 18:18

 获取当前ip->System.getProperties().getProperty("http.proxyHost");

获取当前使用端口--> System.getProperties().getProperty("http.proxyPort");

设置ip-->System.getProperties().setProperty("http.proxyHost", "112.95.205.28");

设置端口-->System.getProperties().setProperty("http.proxyPort", "8888");

原创粉丝点击