Proxy support

Mike – Can you tell me how the ‘Automatically determine proxy settings for this network’ is implemented? Does WW do its own procedures for that, or does it just check IE’s proxy settings? Whatever the case is, it appears if you typically use ‘Automatic proxy’ detection or a proxy configuration script, WW doesn’t know what to do with it. I have to enter the actual IP address and port of the proxy server for it to work. Is this expected?

If the “Auto-detect proxy settings for this network” box is checked in the “Advanced” → “Internet” section of the Weather Watcher Live Options window, then Weather Watcher Live will first check the following registry key:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyEnable

If “ProxyEnable” is set to “1”, then Weather Watcher Live will attempt to use the server and port in the following registry key:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyServer

Hi Mike… That’s probably not the best way to handle proxy support, as far as ‘Auto-detect proxy settings for this network’, for a few reasons:

  1. If at some point the user changes his IE settings to a different type of proxy (For example ‘Automatically detect settings’ or ‘Use automatic configuration script’), that registry key you are checking does not get cleared.

  2. I’m not sure if you are using .NET or not, but it seems .NET, especially from 2.0 on, has a much better way of handling proxy support ( http://msdn.microsoft.com/en-us/magazine/cc300743.aspx ) – in many instances setting IE to ‘Automatically detect settings’ is a very common configuration option, especially for users with a laptop that go from point A to point B. For example, at work, requires proxy, home does not. ‘Automatically detect settings’ can be left checked and configuration will not require changing when going to different locations. Also, I’m pretty sure WW wouldn’t know what to do with an automatic configuration script. At any rate, static proxy values are a pain because it requires the user to enable or disable proxy support in each one of their applications that require it when changing locations.

Is it possible for this support to be handled a little differently in the code? I’d be willing to test things out for you if you wanted to pursue it.

Rick

I’m not using .NET, but I’ll check out that article because I think I can use that advice to accomplish your suggestion.

Mike,

Any progress on implementing this into WWL yet? I have to manually switch proxy settings when I use my laptop between work and home all the time… It would be very helpful if it worked.

Thanks,
Rick

I just took another look at that article – don’t think it’ll work for my situation. I’m not familiar with a setup that uses more than one proxy server. Can you tell me more about how you have that setup? Do you have any idea where your proxy settings are stored?

I am not sure where Windows stores the automatic configuration script when IE is set to ‘Automatically detect proxy settings’ – it is not in the location specified in the registry for an actual address. This may be more complicated than it seems, although I do utilize software that has proxy settings available that are along the lines of ‘Use the proxy settings from IE for this program’ – and those work OK.

Perhaps a different approach can be used in the proxy logic. For example:

  1. Specify a proxy server and port in WWL’s proxy dialog box
  2. Perform a check to see if download connectivity works when that proxy is set
  3. If WWL can successfully update with the proxy, then do so
  4. Otherwise WWL should try accessing the internet without using the proxy settings

I am not sure what development environment you are using for WWL, so it is difficult for me to find additional resources on how to utilize the IE system settings. Please see http://en.wikipedia.org/wiki/Web_Proxy_ … y_Protocol[/url] for a description of what takes place when IE’s auto-discovery is set to ‘on’ (which is required for our workplace). It typically will try and access [url=http://wpad/wpad.dat]http://wpad/wpad.dat first to see if the file exists. It downloads a Javascript file and parses the proxy addresses as well as exclusions. From that point, I am not sure where it stores those addresses.

Rick

I was thinking you were using a proxy at both work and home (two different proxies). The Weather Watcher Live build below should ignore your proxy settings when you’re not actually connected via proxy. Please let me know if it resolves this issue.

http://www.box.net/shared/gsn5hsdvlm

Mike,

Did 7.0.29 incorporate the same changes? Because I just auto-updated to that version, and now it seems the proxy isn’t working at all (I’m at work at the moment, and manually entered the proxy, and WWL cant contact anything)

Rick

7.0.29 includes the same proxy change as the build linked in my post above.

So far so good… Seems it pulls the forecast if the proxy is unavailable as well as when it is.

Thanks,
Rick

Spoke too soon… There are issues with whatever logic is implemented here to determine if the proxy can support a connection or not. Currently I am at a location where the proxy is not active, and I had to manually remove it from the settings for WWL to connect. Likewise, when I was at work, it ignored the proxy settings and couldn’t connect until about an hour after it started running… If there is any kind of logging I can perform on my end to help with this, that would be great.

Here’s an update to undo the proxy change:
http://www.box.net/shared/ux4nkcuaxb