本文介绍了如何使用WebProxy由通网络?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我想绕过网络192.168.1.0/24一样使用webProxy有什么办法?

  WebProxy代理=新WebProxy();

proxy.ByPassList = ???
 

解决方案

您可以将其设置在Internet Explorer,然后用

WebProxy代理=(WebProxy)WebProxy.GetDefaultProxy(); 德precated

  VAR iproxy = WebRequest.GetSystemWebProxy();
VAR URL =新的URI(http://www.example.com);
VAR WP =新WebProxy();
wp.​​Credentials = iproxy.Credentials;
wp.​​Address = iproxy.GetProxy(URL);
 

或者你可以尝试添加192 \ 168 \ .1 \ *。来proxy.BypassList的东西,如

 名单,其中,串> bypasslist =新的名单,其中,串>(proxy.BypassList);
bypasslist.Add(192 \ 168 \ .1 \ *。);
proxy.BypassList = bypasslist.ToArray();
 

If I want to bypass a Network like 192.168.1.0/24 using webProxy is there any way?

WebProxy proxy = new WebProxy();

proxy.ByPassList = ???
解决方案

You could set it up in Internet Explorer and then use

Deprecated.

var iproxy = WebRequest.GetSystemWebProxy();
var url = new Uri("http://www.example.com");
var wp = new WebProxy();
wp.Credentials = iproxy.Credentials;
wp.Address = iproxy.GetProxy(url);

or you could try to add "192.\.168\.1\.*" to proxy.BypassList with something like

List<string> bypasslist = new List<string>(proxy.BypassList);
bypasslist.Add("192.\.168\.1\.*");
proxy.BypassList = bypasslist.ToArray();

这篇关于如何使用WebProxy由通网络?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-25 04:16