0

I have looked everywhere for an answer and all I found was confusing-incomplete bits.

The best way I found was to modify the registry like so:

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);

This works, but I need to also set the username and the password for the proxy.

I found that you can use the WebProxy class as this takes the credentials, but it doesn't work with WebBrowser.

So the other alternative would be to create an application-wide proxy where all http requests are routed thru it.

Anyone has any help on this?

1

2 Answers 2

1

I reccomend you use an HttpListener and a HttpWebRequest. For more information look here.

Sign up to request clarification or add additional context in comments.

Comments

0

The WebBrowser control is exactly the same as Internet Explorer. They use the same proxy settings. Look up the WinINET API.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.