方法很简单,就是设置本地代理

C#

HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url);
req.Proxy = new WebProxy("127.0.0.1:8888", true);

 

Java

jre -DproxySet=true -DproxyHost=127.0.0.1 -DproxyPort=8888 MyApp

或者

System.setProperty("http.proxyHost", "localhost"); 
System.setProperty("http.proxyPort", "8888"); 
System.setProperty("https.proxyHost", "localhost");
System.setProperty("https.proxyPort", "8888");

  

内容来源于网络如有侵权请私信删除
你还没有登录,请先登录注册
  • 还没有人评论,欢迎说说您的想法!