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.
Please help in Visual C#.NET.
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.
Please help in Visual C#.NET.
The WebBrowser control is just a wrapper around IE. So to set proxy settings, you could change the registry key entries.
Something like this:
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);
WebBrowser is just an interface over IE. To set the IE proxy settings, you can hack the registry!
string key = "Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings";
string serverName = "";//your proxy server name;
string port = ""; //your proxy port;
string proxy = serverName + ":" + port;
RegistryKey RegKey = Registry.CurrentUser.OpenSubKey(key, true);
RegKey.SetValue("ProxyServer", proxy);
RegKey.SetValue("ProxyEnable", 1);