3

I've been trying to find a solution to the problem of having system-wide proxies in Windows when I only want things to change at the application level.

I've been trying to find a working example, in JScript, of calling InternetExplorer.Application's Navigate() with headers specified.

Does the headers parameter permit the kind of application-level proxy control I'm after?

bugmagnet
  • 7,631
  • 8
  • 69
  • 131

2 Answers2

2

You are using the COM object for a web browser. This browser's API does not expose as many configurable parameters as a web client library would, because the former is used by users and the latter is coded against.

As I already explained in your newer question on the same subject, it is not the request itself that differs when using a proxy. The client, when a proxy has been configured, will connect to the proxy. So there's nothing you can force by adding request headers if the browser doesn't know about a proxy.

Searching the web for '"InternetExplorer.Application" set proxy' gave me only one approach, repeated in various variations: set the system-wide proxy before each request. There are different ways of doing so, the proper way would be to call InternetSetOption() with the appropriate parameters, or you can bluntly write into the registry.

If on the other hand you're able to use an XmlHttpRequest-alike object, which is designed to be used from code, you can set the proxy on that for each request. It would really help if you can explain what problem you are actually trying to solve.

Community
  • 1
  • 1
CodeCaster
  • 147,647
  • 23
  • 218
  • 272
1

Navigate will not solve your problem. Proxy settings for IE are stored in the registry

For additional information see: http://www.craigjconsulting.com/setproxy.html

Mike Beeler
  • 4,081
  • 2
  • 29
  • 44