VPNs and proxies both send your traffic through another server, so websites see that server’s IP instead of yours. That’s where the similarity ends. They work at different layers, protect different things and suit different jobs. Here’s how they compare, and how to run either on your own VPS.
The short version
| VPN | Proxy | |
|---|---|---|
| Covers | All traffic from the device (or a subnet) | Only apps configured to use it |
| Layer | Network (IP) | Application (HTTP) or session (SOCKS) |
| Encryption | Always (the tunnel) | Not by itself. Depends on the protocol |
| Setup | Client app or OS config | Per-app or browser setting |
| Typical use | Secure remote access, private networks, untrusted Wi-Fi | Scraping, per-app routing, caching, access control |
What a VPN does
A VPN (virtual private network) creates an encrypted tunnel between your device and a VPN server. The OS routes traffic through it: all of it (full tunnel), or only selected networks (split tunnel).
- Encryption — the local network and ISP see only encrypted traffic to the VPN server.
- Private networking — connect laptops, offices and servers as if they were on one LAN. This is the most important use for server admins: reaching databases, admin panels and internal tools without exposing them to the internet.
- IP change — websites see the VPN server’s IP.
Popular protocols:
- WireGuard — modern, fast and simple, built into the Linux kernel. See WireGuard VPN server.
- OpenVPN — mature and flexible, and works over TCP 443 where UDP is blocked. See OpenVPN.
- Mesh VPNs (Tailscale, Netbird, ZeroTier) — peer-to-peer WireGuard with central identity, with no open ports needed. See Tailscale.
- IPsec — standard for site-to-site links between routers and firewalls.
What a proxy does
A proxy forwards requests for specific applications.
- HTTP(S) proxy — understands web traffic. For HTTPS, it tunnels the encrypted connection via
CONNECT. Uses: corporate filtering, caching, scraping, API access from a fixed IP. - SOCKS5 proxy — forwards arbitrary TCP (and some UDP) connections for apps that support it, like browsers, curl and many clients. It doesn’t encrypt anything itself.
- Reverse proxy — a different concept: it sits in front of servers (Nginx, HAProxy, Caddy), not clients. See reverse proxy explained.
The fastest proxy: SSH
An SSH dynamic port forward gives you an encrypted SOCKS5 proxy instantly, with nothing to install on the server:
ssh -D 1080 -N user@your-vps
Point your browser’s SOCKS5 setting at localhost:1080, and its traffic exits from your VPS. See SSH tunnels.
Other self-hosted options: Squid (an HTTP proxy with caching and ACLs), Dante (SOCKS), 3proxy (lightweight, several protocols). Always require authentication, and restrict the allowed source IPs. Open proxies are found within hours and abused for spam and attacks, and the abuse reports land on your IP.
Privacy: what neither one guarantees
- The VPN or proxy operator sees your traffic metadata, and unencrypted content. Self-hosting means that operator is you, but your hosting provider still sees connections to and from the server.
- Websites can still identify you through cookies, logins and browser fingerprints.
- HTTPS is what protects content end-to-end. Neither a VPN nor a proxy replaces it.
Performance
- Both add a hop. Latency increases by roughly the distance to the VPN or proxy server. Pick a location near you or near the destination. See choosing a VPS location.
- WireGuard has very low overhead. OpenVPN uses more CPU. SOCKS and HTTP proxies are light.
- Bandwidth is limited by the server’s port and your plan’s traffic allowance. VPS.DO USA plans include 1 Gbps ports with monthly transfer allowances, while Hong Kong plans are unmetered at a fixed Mbps rate.
Which should you use?
| Goal | Use |
|---|---|
| Reach private services (DB, admin UIs) on your servers | VPN (WireGuard / Tailscale) |
| Connect offices or servers privately | Site-to-site VPN |
| Secure browsing on public Wi-Fi | VPN (full tunnel) |
| One app needs a fixed exit IP (API allow-lists) | Proxy, or a VPN with split routing |
| Quick encrypted tunnel for one browser | SSH SOCKS (ssh -D) |
| Caching and filtering web traffic for many users | HTTP proxy (Squid) |
| Put your web apps behind one entry point | Reverse proxy (Nginx) |
Use VPN and proxy services in line with the laws and the terms of the services you access, and your provider’s acceptable use policy. Running open relays or using proxies to abuse other services leads to account suspension.
Related: zero trust networking and ProxyJump bastion hosts.