0

So basically I have a Webbrowser in my Form. What I want to do is to connect to a proxy so that once I open my webbrowser on whatismyip.com I have the proxies IP instead of my IP.

I have been mad searching stackoverflow and google results but nothing seems to work...

Any tips on how I can do this?

John Saunders
  • 160,644
  • 26
  • 247
  • 397
Topast
  • 1
  • 1
    I have edited your title. Please see, "[Should questions include “tags” in their titles?](http://meta.stackexchange.com/questions/19190/)", where the consensus is "no, they should not". – John Saunders Jan 24 '15 at 17:55
  • Thanks John, sorry about that. – Topast Jan 24 '15 at 17:56

1 Answers1

0

Okay so the only solution that I found was ny changing the reg...

Here comes the code:

private void SetProxy(string Proxy)
    {

        string key = "Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings";

        RegistryKey RegKey = Registry.CurrentUser.OpenSubKey(key, true);
        RegKey.SetValue("ProxyServer", Proxy);
        if (Proxy == "")
        {
            RegKey.SetValue("ProxyEnable", 0);
        }
        else
        {
            RegKey.SetValue("ProxyEnable", 1);
        }

    }
Topast
  • 1