Proxy vs. VPN for Localization Testing

by Paul Reinheimer on


Defining the terms

Both proxy servers and VPNs can be used in a wide variety of different ways. For the purposes of this article:

Proxy server: A server running software to accept and forward requests to any reachable remote resource.
Common software: Squid

VPN server: Same as a proxy server, except requests travel through an encrypted tunnel between your computer's operating system and the VPN server. Often used for work or education networks to let you access private things from home, or while travelling.
Common software: LibreSwan

Advantages of a proxy server

You're only sending traffic from specific applications down that connection

With a proxy server, you configure applications to use the proxy server, rather than configuring the entire operating system. You can tell Firefox to use a proxy server in a distant country, while Slack, Outlook, and Microsoft Edge continue to connect directly to their required servers. This cuts down on unneeded latency for those other applications. It also means you're not sending potentially private information through a series of tubes it doesn't need to go down (or needlessly breaking your Spotify stream).

You can use several at once

You can set up one proxy server in Firefox, a different one in Chrome, and a third with your automated tests in Selenium. None of them interfere with each other because they're unaware of what the other applications are doing. If you're running a set of tests in parallel with your automation suite, each of them could be using their own proxy server.

There's no startup time

Connecting to a VPN takes a few seconds, and takes longer if it's far away. The two computers need to negotiate a few things and build the secure tunnel. Not too big a problem if you're only checking one location, but a slow, annoying drag if you're trying to ensure the correct localization is being used from a series of locations. There's no startup time for a proxy server; you start sending requests and it forwards them on.

It's likely understood and supported by your application

Proxies and proxy authentication have been part of the HTTP specification for over 20 years, so there's a good chance your application (browser, test runner, etc) supports them. You can bake them into your test suite as a regular piece of configuration, rather than some sort of external command interacting with the operating system with unclear failure modes.

Disadvantages of proxy servers

Not all applications support proxy servers

Whether it's a legacy Flash plugin, or a desktop application that doesn't include proxy settings, there may be no way to test a remote application without sending all traffic down that connection using a VPN.

On one hand, I'm clearly biased: my company is called WonderProxy. That said, we've been offering VPN services everywhere we can almost since the beginning.

So if you're testing your site's localization, reach first for a proxy server for fast, easy-to-run testing.