赞
踩
效果:
代码:
- public class TestMain {
-
- public static void main(String[] args){
- HttpRequest httpRequest = HttpRequest.get("https://www.youtube.com").timeout(30000);
- httpRequest.setProxy(new Proxy(Proxy.Type.HTTP,new InetSocketAddress("127.0.0.1",10809)));
- String body = httpRequest.execute().body();
- System.out.println(body);
- }
- }
如何获取代理端口:
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。