Welcome Guest.   Make a donation to an author on the site July 28, 2014, 05:38:04 PM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
The N.A.N.Y. Challenge 2010! Download 24 custom programs!
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: [1]   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: DONE: turn IE proxy server on/off  (Read 25199 times)
williamhdixon
Participant
*
Posts: 4

View Profile Give some DonationCredits to this forum member
« on: March 02, 2012, 02:25:56 PM »

When connected to the network at my client site, I have to define a proxy server.  At home, I do not.

To turn the proxy server option on/off, I go to:
     Start / Control Panel / Internet Options / Connections tab / LAN Settings button
Then I select/deselect "Use a proxy server for your LAN".

The proxy server address stays when you deselect it, thank goodness, so I don't have to enter it every time.
Nothing changes between home and client site except for that one selection box.

Could someone help me out with something that would automate this?  Ideally, it would:
  • load itself into the system tray
  • indicate by color or something whether the proxy setting was checked or unchecked
  • change the setting (and icon color) when you click the icon
  • run under Windows 7 (what I use) or Windows XP (what a co-worker uses)

This way, instead of pulling up the IE options screen each and every morning, I could just glance into the system tray, look at the color of the icon, and click it if it isn't set the way I need it that day.

Is this possible?  Anyone willing to help me out?

Thanks,
Bill
Logged
Ath
Supporting Member
**
Posts: 2,183



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #1 on: March 02, 2012, 02:42:59 PM »

A few options are already available:

A couple of non-free tools: NetSwitcher, Mobile NetSwitch, Easy NetSwitch

Or a bit awkward/obtrusive but free Italian tool called JimiIP (sunglasses on, terrible website too Cool)
Logged

Carol Haynes
Waffles for England (patent pending)
Global Moderator
*****
Posts: 7,952



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #2 on: March 02, 2012, 03:42:01 PM »

The other approach is to use Firefox in one location and IE In the other - they can have independent proxies.
Logged

williamhdixon
Participant
*
Posts: 4

View Profile Give some DonationCredits to this forum member
« Reply #3 on: March 02, 2012, 03:47:06 PM »

Ath - Thanks for the pointers, but those are WAY more complicated than I'm looking for.  They set things like default printer, etc.  All I want/need to do is to turn the "Use a proxy server" option on or off.  And since that's all I need to do, I'm afraid it would be more of a hassle to use those tools than to simply go to Internet Options like I've been doing.

Carol - Thanks, but the browser is immaterial.  Specifically, if I hit the Internet from home in the evening (which means the proxy setting is deselected) but forget to change it when I get to the client site the next morning, the VPN software I use won't make a connection.  I don't use a browser that much in the office (except to search for things like this).  Besides which, I hate IE.

BTW - I've tried manually changing the registry setting, based on some tips I've found on the internet.  If I could get this working, I could create shortcuts with the commands, or put them in a batch file, or even write a perl wrapper around them.

If I run:
REG QUERY "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" -v ProxyEnable
it does shows me the current state of the option, no matter how often I change it in the Internet Options screen.

If I run:
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /t REG_DWORD /v ProxyEnable /d 0x0 /f
REG QUERY "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" -v ProxyEnable
it *says* it changed it.

But it didn't.  If I go into Internet Options, it still has the old value.
Logged
skwire
Moderator
*****
Posts: 4,019



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #4 on: March 02, 2012, 04:40:54 PM »

Hi, William, and welcome to the site.  I wrote a program at my last job that does half of what you want.  I called it ProxyKiller so I'm sure you can guess which half.   I'll see about fleshing it out to cover your needs.  Stay tuned.
Logged

skwire
Moderator
*****
Posts: 4,019



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #5 on: March 02, 2012, 08:37:53 PM »

Give this a try:  IE Proxy Toggle

Green icon means the proxy is enabled; a grey icon means disabled.  Single-click the tray icon to toggle or use the right-click menu.  Tested on XPSP3/32 and W7/64.

« Last Edit: March 02, 2012, 10:29:05 PM by skwire; Reason: Added screenshot » Logged

williamhdixon
Participant
*
Posts: 4

View Profile Give some DonationCredits to this forum member
« Reply #6 on: March 03, 2012, 02:08:49 PM »

skwire - PERFECT!!

I can't give it a full test until I go into the office next Tuesday (that's where the proxy server has to be set in order to get past their firewall), but from the testing I can do at home, I don't see any reason why it won't work.  This was exactly what I envisioned.

Thanks a million.
Logged
skwire
Moderator
*****
Posts: 4,019



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #7 on: March 03, 2012, 02:24:51 PM »

You're very welcome.   smiley  Glad I could help.

Please let us know how it functions from your workplace.  If it passes muster there, I'll release this application on my website as I feel others could get some use out of it.
Logged

williamhdixon
Participant
*
Posts: 4

View Profile Give some DonationCredits to this forum member
« Reply #8 on: March 06, 2012, 10:35:16 AM »

It works perfectly, both from home and from the office.  Thanks.

BTW - The reason this is such a big deal for me right now is that there's a bug with our VPN software, under Win7, when connected to the client's network.  The proxy server has to be selected for the software to establish connection back to my company's network, but after the VPN makes a connection, it dies in about a half a minute.  Someone here figured out (how, I have no idea) that if the proxy is selected when you launch the VPN software, but then you deselect it after the connection is established but before it is dropped, then re-select it after a minute or so and the VPN tunnel is stable, it works.  Needless to say, being able to click an icon in the system tray is much less of a hassle.)

Again, thanks.  You are going to be several people's hero.
Logged
skwire
Moderator
*****
Posts: 4,019



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #9 on: March 06, 2012, 10:57:55 AM »

Fantastic.  Thanks for reporting back.   cheesy
Logged

skwire
Moderator
*****
Posts: 4,019



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #10 on: March 06, 2012, 12:35:30 PM »

Here's the official site for the application:

http://skwire.dcmembers.c.../fp/?page=ie-proxy-toggle
Logged

skwire
Moderator
*****
Posts: 4,019



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #11 on: July 29, 2012, 05:45:29 PM »

Website | Download
v1.0.1 - 2012-07-29
    + Added commandline mode.  Examples:
        1) c:\path\to\ieproxytoggle.exe -on
        2) c:\path\to\ieproxytoggle.exe -off
        3) c:\path\to\ieproxytoggle.exe -toggle
Logged

skwire
Moderator
*****
Posts: 4,019



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #12 on: January 15, 2013, 09:18:07 PM »

Website | Download
v1.0.2 - 2013-01-15
    + Added ability to set a hotkey to toggle the proxy.  (Thanks, Diego)
    + Added update checking in the tray menu.
Logged

Josh72
Participant
*
Posts: 1

View Profile Give some DonationCredits to this forum member
« Reply #13 on: May 23, 2013, 05:05:46 PM »

Can I get the code for this to alter it some my company uses automatic script config I want it to check and uncheck that instead of proxy server.
Logged
Casteele
Participant
*
Posts: 1

View Profile Give some DonationCredits to this forum member
« Reply #14 on: October 04, 2013, 09:42:40 PM »

Came across this while looking for something else, but thought I'd mention this..

Almost all modern browsers support Proxy Auto-Configuration (PAC) [Wiki Entry for PACw] and Web Proxy Autodiscovery Protocol (WPAD) [Wiki Entry for WPADw], both of which an tell your web browser how to connect to various servers to retrieve network resources (any kind of resource, not just web pages!) -- And as a bonus, you do not even need to constantly hit a hot key or click a button every time you change networks; It should auto-detect how you're currently connected and respond accordingly.

The major bonus of using PAC is that PAC can return a list of methods to try when trying to retrieve a resource. For example, you may configure your PAC file to return "PROXY proxy.client-a.int:8080; PROXY gateway.client-b.int:8080; PROXY my-home-network.int:8080; DIRECT", which would tell the browser to try, in the order given, each proxy server, until one successfully connects and returns the requested web page. The last bit, the "DIRECT", tells your browser if all proxies fail to respond (like if you're at a public WiFi where none of the previous proxies exist), it'll fall-back to trying to connect directly to the URL originally requested and bypass any proxies. Since most home networks do not use a proxy server, this would also cause the browser to try directly when at home rather than a client site.

If configured carefully, you can also arrange your PAC file (and if you know how to manage your local routing tables) so that for certain resources, it'll bypass the proxy (or even any active VPN) or choose a different network/proxy/VPN. The variations are almost limitless, really. Especially if you want to run a small proxy and webserver on your own laptop.. In that case, you can configure a local PAC file ("C:\proxy.pac" for example) to chain through them so they can do additional current configuration testing to determine how to access network/Internet resources. (PAC itself uses only a limited subset of JavaScript, so there's some things it cannot do directly.)

This little applet (Turn IE Proxy On/Off) can be extended with PAC, as well.. not only changing the proxy setting of IE, but maybe changing to different PAC files (especially handy if you don't want to run a local proxy/webserver on your laptop), or otherwise change how the chain of requests proceeds, depending on current/new settings.

Cheers,
Cas


Logged
traingreg
Participant
*
Posts: 1


View Profile Give some DonationCredits to this forum member
« Reply #15 on: January 22, 2014, 04:01:34 PM »

The Proxy Switching seems to work well! I did have one question, however, when there are multiple users (with multiple logins) using the computer is there any way to install it so it will work for ever user. Right now it seems like I have to install it for each person.

I am using Windows 7.

Thanks!
Logged
skwire
Moderator
*****
Posts: 4,019



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #16 on: February 01, 2014, 10:31:47 PM »

Hi, traingreg, and welcome to the DonationCoder site.   smiley  Apologies for missing your post.   embarassed

The Proxy Switching seems to work well! I did have one question, however, when there are multiple users (with multiple logins) using the computer is there any way to install it so it will work for ever user. Right now it seems like I have to install it for each person.

I suppose you could write a script or something like that.  However, the application doesn't have any sort of built-in ability to install itself for all users.


Website | Download
v1.0.3 - 2014-02-01
    + Added the ability to set a proxy state check interval.  This allows
      the IE Proxy Toggle to update its icon if the proxy state is changed
      by an external source.  You can find this new option in the tray menu.
      (Thanks, J. Quonce)


« Last Edit: February 02, 2014, 12:57:10 PM by skwire » Logged

skwire
Moderator
*****
Posts: 4,019



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #17 on: February 02, 2014, 12:34:11 PM »

Website | Download
v1.0.4 - 2014-02-02
    * Made it so the 0.ico and 1.ico icons are not overwritten when the
      program starts.  This allows you, if you so desire, to swap out those
      two icons with your own.  (Thanks, Mike)
Logged

Duke McAwesome
Participant
*
Posts: 1


View Profile Give some DonationCredits to this forum member
« Reply #18 on: February 26, 2014, 10:09:35 AM »

You are my favourite person in the whole world right now.  Thmbsup
Logged
skwire
Moderator
*****
Posts: 4,019



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #19 on: February 27, 2014, 09:30:41 AM »

Hi, Duke, and welcome to the DonationCoder site.  =]

You are my favourite person in the whole world right now.  Thmbsup

Right on.  Glad to be of service.   cheesy
Logged

Pages: [1]   Go Up
  Reply  |  New Topic  |  Print  
 
Jump to:  
   Forum Home   Thread Marks Chat! Downloads Search Login Register  

DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.053s | Server load: 0.12 ]