What is a Proxy Server? Is it the same as a VPN?

A proxy server is a machine (or piece of software running on a machine) that redirects a specific protocol traffic. It is a relay between a website and your device. There are different type of proxy servers such as HTTP, SOCKS, and Shadowsocks. The most common ones are the SOCKS4/SOCKS5 proxies (named so for the versions of the SOCKS protocol) which are more generic TCP-based proxies.

A proxy works by opening a TCP stream from the client to the proxy server, prepending on that stream the destination you want to reach which causes another TCP stream to be opened from the proxy server to the ultimate destination, then mating the two TCP streams together relaying traffic bidirectionally. In simpler terms, when you are connected to a proxy, every web request goes to the connected proxy. The proxy makes the request for you and sends the reply back to your device.

While VPNs and proxy servers are similar in a lot of ways, such as changing your IP address and acting as a middleman between your machine and the internet, VPNs and proxy servers are not the same thing and there are some key differences. The main one is that proxies have to be configured at the application level. This means every app that you use, needs to have proxy support for you to be able to use a proxy. With a VPN, all internet traffic is automatically tunneled through the VPN regardless of the application. The second main difference is encryption. With proxies, you send your requests to the proxy, and the proxy forwards it on for you. Most proxies are protocol specific or limited to TCP (although UDP proxies do exist, they are a completely different subject). Proxies generally do not encrypt the traffic, they simply “bend the pipe” from the source to the destination. A VPN works by encapsulating and/or encrypting all traffic, so it can transport ANY protocol and since the tunneled traffic is encrypted, you can be sure that no bad actors on the network can look at your traffic.

A VPN is basically a better proxy, and you should always use a VPN instead of a proxy if possible.