mwiedemeyer / ProxySwitcher

Proxy Switcher allows you to automatically execute actions, based on the detected network connection. As the name indicates, Proxy Switcher comes with some default actions, for example setting proxy settings for Internet Explorer, Firefox and Opera.
Apache License 2.0
135 stars 60 forks source link

Windows 10: "No internet access" icon even after successful proxy switch #11

Open codegolem opened 8 years ago

codegolem commented 8 years ago

On Windows 10, I'm experiencing an issue with the "No internet access" warning icon being shown on the traybar, even after a successful proxy switch.

By "successful proxy switch" I mean that internet browsing works fine. However, other modern-ui apps seem unable to detect the internet connection unless I manually switch the proxy off and on again (from Windows 10 global proxy settings).

This mainly happens on the first switch after my laptop boots up. Subsequent automatic switches work fine.

I've found that a small code change resolves this issue. In the RefreshIESettings method in the InternetExplorer8ProxyAction class, I've added a forced refresh action:

const int INTERNET_OPTION_REFRESH = 37; InternetSetOption(IntPtr.Zero, INTERNET_OPTION_REFRESH, IntPtr.Zero, 0);

You may want to integrate this change in your main branch.

Cheers!

mwiedemeyer commented 8 years ago

Thank you. So you added that in addition to the first InternetSetOption call or did you replace the call?

codegolem commented 8 years ago

Hi, sorry for not having specified that. I've added the refresh call right after the existing InternetSetOption call.

codegolem commented 8 years ago

Hi again, sorry to say... my change actually didn't work: today again the "No internet connection" icon doesn't go away...