Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How Set Different Proxies For Each WebBrowser Control In A Form - All Possible Ways

i am looking for a custom WebBrowser control that supports different proxy for individual WebBrowser in a form.
regular WebBrowser control is working with IE and for one WebBrowser control i can set proxy, but what about the other Ones?
is there a way to change regular WebBrowser control for doing that or is there a way for my purpose?

thanks in advance

like image 444
SilverLight Avatar asked Nov 01 '22 14:11

SilverLight


1 Answers

Here's a crazy idea for you. Apparently, UrlMkSetSessionOption and InternetSetOption can only configure the proxy setting per-process. However, if your WebBrowser instances access different websites, and there is one-to-one or many-to-one mapping between URLs and the corresponding proxy settings, you can use IE proxy automatic configuration (PAC) script to return a proxy based upon specific URL:

http://technet.microsoft.com/en-us/library/dd361918.aspx

The PAC script location can be file://-based and (I believe) you can generate it on-the-fly and then set as active with InternetSetOption.

like image 193
noseratio Avatar answered Nov 15 '22 04:11

noseratio