我能否告诉托管 Internet Explorer Web 浏览器控件始终绕过代理设置? [英] Will I be able to tell a Hosted Internet Explorer Web Browser control to always bypass the proxy settings?

查看:65
本文介绍了我能否告诉托管 Internet Explorer Web 浏览器控件始终绕过代理设置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下场景:

  • 拥有托管的 IE Web 浏览器控件和应用内 Web 服务器(例如 this一个).
  • 网络服务器在(例如)http://127.0.0.1:14284 和网络浏览器上运行调用此网址.
  • Having a hosted IE web browser control and an in-app web server (like this one).
  • The web server runs at (e.g.) http://127.0.0.1:14284 and the web browser calls this URL.

现在我们有一个客户在 IE 选项中配置了代理服务器,并且还选中了绕过本地地址的代理".

Now we have a customer which has a proxy server configured in IE options, and also checked "bypass proxy on local addresses".

不幸的是,托管的 IE Web 浏览器控件仍然使用代理设置,即使对于本地 URL http://127.0.0.1:14284.

Unfortunately, the hosted IE web browser control still used the proxy settings, even for the local URL http://127.0.0.1:14284.

我的问题是:

我是否能够以某种方式告诉我的托管 Web 浏览器始终直接调用我的托管 Web 服务器,无需通过代理?

Am I somehow able to tell my hosted web browser to always directly call my hosted web server, without going through a proxy?

(我找到了这个主题,但仍然不确定如何将其应用于我的问题)

(I found this thread but still am unsure how to apply this to my question)

推荐答案

我认为您必须进行一些互操作,因为文档说您可以使用 InternetSetOption 函数.有很多标志你可以传递给这个函数,你需要 INTERNET_OPTION_PROXY 或 INTERNET_OPTION_PER_CONNECTION_OPTION,还有一个 kb-article其中描述了如何设置代理设置.

I think you have to do some interop, as the docs say you can disable the proxy with the InternetSetOption function. There are a lot of flags you can pass to this function you need INTERNET_OPTION_PROXY or INTERNET_OPTION_PER_CONNECTION_OPTION, theres also a kb-article which describes how to set the proxy settings.

希望对你有所帮助:)

这篇关于我能否告诉托管 Internet Explorer Web 浏览器控件始终绕过代理设置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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