开发者

How to programmatically configure a proxy server for connectivity on the local network to the internet using a windows application

How to programmatically configure a proxy server for connectivity on the local network to the internet using a windows application.

Please suggest a good example/reference.

Screenshot shows the windows application form for setting pr开发者_如何转开发oxy server

How to programmatically configure a proxy server for connectivity on the local network to the internet using a windows application


Well, it depends on what you are using to do the internet traffic. If you are using a WebRequest, or anything that implements it, you can use the WebProxy object. This provides many properties for implementing this.

E.g.:

WebProxy proxy = new WebProxy("192.168.1.1:12345", true);

The above creates the proxy according to your settings, and bypasses on local. Now you can set this to your web request, or web service calls under the Object.Proxy property.

Links:

  • MSDN - http://msdn.microsoft.com/en-us/library/system.net.webproxy(v=VS.90).aspx
  • Example Web Proxy Use - http://snipplr.com/view/16450/example-web-proxy-use/


Setting Windows internet connection proxy from C#. Use this link as reference

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜