18

I am developing a small client application that will sometimes need to call out to a webservice from a machine within a corporate lan complete with proxy server.

Our LAN in our development shop does not use a proxy.

What I need to be able to do is test being behind a proxy on my machine. Is this possible? I've installed a free proxy server (called FreeProxy) and by running it and changing my IE settings to use the proxy it works, but what I need to happen is that when I take the tick out of "Use Proxy" in IE, I should not be able to access the web. Also no client apps should be able to access the web without going through my proxy.

Looking forward to your replies.

3 Answers 3

5

You could have an isolated operating system instance in a virtual machine, which gets access to internet only through a proxy. When you need to test, move the app into the OS inside the virtual machine and see how it behaves.

2
  • Thanks, but how would I configure that OS (Say, win7) to only access through a proxy?
    – DavidGouge
    Aug 25, 2010 at 12:13
  • Assume you have a proxy server running on a host:port. You can restrict access only through that proxy by dropping anything else (I mean network IP packets here) using any firewall.
    – vtest
    Aug 26, 2010 at 8:24
24

The easiest way I found is:

  1. Download and run Fiddler proxy (it's free). It will automatically set itself as a system proxy in Windows on each run. Also click Rules -> Require Proxy Authentication in the top menu if you want to test authentication to the proxy (username and password are "1").

  2. Open Windows Firewall, then Advanced settings -> Windows Firewall Properties. Block all outbound connections for all profiles you need (domain, private, public) and click OK.

  3. Add new outbound firewall rule to allow all access for 8888 port (default Fiddler port) or "%LOCALAPPDATA%\Programs\Fiddler\Fiddler.exe" app.

That's it, only the programs which use your proxy settings (http://1:[email protected]:8888) will work.

2
  • Very cool, note that the default location of Fiddler has changed, but the rest of the details are spot on. Jun 18, 2018 at 13:08
  • Was not working until I put direct path to fiddler without env variable in it. After that works like a charm.
    – dgolovin
    Feb 1, 2020 at 5:36
1

Since you've already got some sort of LAN setup, you could extend that with some sort of internal proxy.

Stick a machine on the main LAN, and then have that linked to another (new) small scale LAN (got a old 4-port hub laying about?). Configure this machine to emulate the production enviroment proxy, and then you just hook up a test machine to the "extended" LAN - where it is only possible to connect using the proxy machine you've configured.

Requires a bit of extra hardware and effort, but is the "real" alternative to using a few VM's.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .