作者热门文章
- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
如何使用 winforms webbrowser 控件将套接字指向代理 ip/端口? Visual C#.NET 附带的标准 Web 浏览器。
请在 Visual C#.NET 中提供帮助。
最佳答案
WebBrowser 控件只是 IE 的包装器。因此,要设置代理设置,您可以更改注册表项。
像这样:
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# - 如何在 C# webbrowser 中使用套接字代理?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6246498/
我是一名优秀的程序员,十分优秀!