简体   繁体   中英

How to programmatically set the proxy username and password in IE?

How can I programmatically set the proxy username and password in IE using C#. The problem is it asks me everytime, I open an IE instance and start browsing a page.

You can set the registry entry like this

RegistryKey registry = Registry.CurrentUser.OpenSubKey("Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings", true);
registry.SetValue("ProxyEnable", 1);
registry.SetValue("ProxyServer", "user:password@127.0.0.1:8080");

This works with IE only and Firefox does not work with this.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM