如何设置不同的代理对于每个WebBrowser控件在窗体 - 所有可能的方式 [英] How Set Different Proxies For Each WebBrowser Control In A Form - All Possible Ways

查看:252
本文介绍了如何设置不同的代理对于每个WebBrowser控件在窗体 - 所有可能的方式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要寻找一个支持个人 web浏览器的形式不同的代理自定义 web浏览器控制。

普通的 web浏览器控制正在与IE浏览器和一个 web浏览器控制,我可以设置代理,但什么关于其他的人?结果
是有没有办法改变这样做还是有我的目的的一种方式定期 web浏览器控制?

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?

在此先感谢

推荐答案

下面是给你一个疯狂的想法。显然, UrlMkSetSessionOption InternetSetOption 只能配置每个进程的代理设置。但是,如果你的 web浏览器实例访问不同的网站,并有一对一个或多个对一URL和相应的代理设置之间的映射,可以使用 IE代理自动配置(PAC)脚本的基于特定的URL返回一个代理:

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

的PAC脚本位置可以文件:// 基于和(我相信),您可以生成它的即时,然后设置为主动与 InternetSetOption

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.

这篇关于如何设置不同的代理对于每个WebBrowser控件在窗体 - 所有可能的方式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆