我如何使用C#web浏览器的插座代理? [英] How do I use a socket proxy in C# webbrowser?

查看:86
本文介绍了我如何使用C#web浏览器的插座代理?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我怎么点了插座使​​用的WinForms WebBrowser控件代理IP /端口?随Visual C#.NET标准的Web浏览器。

How do I point a socket to the proxy ip/port using the winforms webbrowser control? The standard web browser that comes with Visual C#.NET.

请在Visual C#.NET帮助。

Please help in Visual C#.NET.

推荐答案

WebBrowser控件是只是围绕IE的包装。因此,要设置代理服务器设置,你可以更改注册表键条目。

The WebBrowser control is just a wrapper around IE. So to set proxy settings, you could change the registry key entries.

事情是这样的:

string serverName = ""; // your proxy server name
string port = ""; // your proxy port

var key = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Internet Settings", true);
key.SetValue("ProxyServer", serverName + ":" + port);
key.SetValue("ProxyEnable", 1);

这篇关于我如何使用C#web浏览器的插座代理?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆