SilverLight
SilverLight

Reputation: 20468

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

Upvotes: 5

Views: 1631

Answers (1)

noseratio
noseratio

Reputation: 61666

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.

Upvotes: 2

Related Questions