Will I be able to tell a Hosted Internet Explorer Web Browser control to always bypass the proxy settings?

别说谁变了你拦得住时间么 提交于 2020-01-25 06:44:15

问题


Following scenario:

  • 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.

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

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

My question is:

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)


回答1:


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.

I hope I helped you a bit :)



来源:https://stackoverflow.com/questions/5326324/will-i-be-able-to-tell-a-hosted-internet-explorer-web-browser-control-to-always

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!