Proxy is one of those networking concepts that appears everywhere yet is often misunderstood. Forward proxy, reverse proxy, SOCKS5 — each type serves a different purpose. This article clearly explains each one with real-world configuration examples.
2019Trusted since
B2BData solutions
Data·AIExpertise
Need data solutions for your business?
AlgoData has helped businesses with data engineering, analytics & AI since 2019.
A proxy server is an intermediary server that acts on behalf of either a client or a server during network communication. Instead of the client connecting directly to the destination server, all traffic passes through the proxy.
Benefits of using a proxy:
Anonymity: Hides the real IP address of the client or server
Caching: Stores responses to serve repeated requests faster (without fetching from the origin)
Access control: Blocks or allows traffic based on policy
Load balancing: Distributes traffic across multiple backend servers
SSL termination: Handles TLS at the proxy level so backends can use plain HTTP
There are three main types of proxy: Forward Proxy, Reverse Proxy, and SOCKS5 Proxy.
Forward Proxy
A Forward Proxy sits between the client and the internet. The client knows it is using a proxy and must configure it explicitly (in the browser, OS, or application).
Traffic flow:
Client → Forward Proxy → Internet → Destination Server
The destination server sees the proxy's IP, not the client's real IP.
Common use cases:
Corporate web filtering: IT departments block inappropriate websites (social media, games) and log web access
Bypassing geo-restrictions: A client in Vietnam uses a US-based proxy to access content restricted to the US
Development and debugging: Dev teams use proxies to intercept and inspect HTTP requests (Charles Proxy, mitmproxy)
Squid Forward Proxy — basic configuration:
Bash
1# Install Squid 2apt-get install squid
3 4# /etc/squid/squid.conf 5http_port 3128 6 7# Allow internal network 8acl localnet src 192.168.0.0/16
9acl localnet src 10.0.0.0/8
10http_access allow localnet
1112# Block social media13acl social dstdomain .facebook.com .tiktok.com .youtube.com
14http_access deny social
1516# Deny all other traffic17http_access deny all
Bash
1# Test the proxy from a client2curl -x http://proxy-server:3128 https://httpbin.org/ip
3# The response will return the proxy's IP, not the client's45# Set proxy for the entire terminal session6exporthttp_proxy="http://proxy-server:3128"7exporthttps_proxy="http://proxy-server:3128"
Reverse Proxy
A Reverse Proxy sits in front of backend servers. The client (browser) does not know the proxy exists — they think they are connecting directly to the real server. The backend IP addresses are completely hidden from the client.
Traffic flow:
Client → Reverse Proxy → Backend Server 1
→ Backend Server 2
→ Backend Server 3
SSL termination: NGINX handles TLS; backends only need plain HTTP
Load balancing: Distributes requests across multiple instances
Static file serving: NGINX serves static assets; backends focus on business logic
Rate limiting: Limits requests from a single IP address
Security: Hides backend information (versions, IPs, ports)
SOCKS5 Proxy
SOCKS5 is a proxy that operates at the session layer (OSI Layer 5) and is independent of the application protocol. It tunnels any TCP/UDP traffic — HTTP, SMTP, FTP, SSH, game traffic, and more.
Creating a SOCKS5 proxy via SSH tunnel:
Bash
1# Create an SSH SOCKS5 tunnel (port 1080 on localhost) 2ssh -D 1080 -N -f user@jumphost.example.com
3# -D 1080: create a SOCKS5 proxy on port 1080 4# -N: do not execute a remote command 5# -f: run in the background 6 7# Test via SOCKS5 8curl --socks5 127.0.0.1:1080 https://httpbin.org/ip
9curl --socks5-hostname 127.0.0.1:1080 https://ifconfig.me
1011# Use with git (proxy git pull through the SSH tunnel)12git config --global http.proxy socks5://127.0.0.1:1080
Configuring SOCKS5 in Python (requests library):
Python
1importrequests23proxies={4"http":"socks5://127.0.0.1:1080",5"https":"socks5://127.0.0.1:1080",6}78response=requests.get("https://httpbin.org/ip",proxies=proxies)9print(response.json())# Returns the proxy's IP, not the real IP
SOCKS5 vs HTTP Proxy:
Criteria
HTTP Proxy
SOCKS5
Protocol
HTTP/HTTPS only
Any TCP/UDP
Layer
Application (L7)
Session (L5)
Authentication
Basic auth header
Username/password
UDP support
No
Yes
Used for
Web browsing
Gaming, torrenting, SSH
Proxy vs VPN
Both proxies and VPNs hide your real IP and route traffic through an intermediary server, but they differ significantly in how they work:
A proxy server is an intermediary that receives requests from a client, forwards them to the destination server, receives the response, and returns it to the client. The client never connects directly to the destination server — all communication flows through the proxy. Depending on the type, a proxy can hide the client's IP, hide the server's IP, cache content, or control and filter traffic.
QWhat is the difference between a Forward Proxy and a Reverse Proxy?
A Forward Proxy sits on the client side: client → proxy → internet. The client knows it is using a proxy and configures it explicitly. The proxy hides the client's identity from the destination server. Used for: web filtering, bypassing geo-blocks, IP masking. A Reverse Proxy sits on the server side: internet → proxy → backend servers. The client is unaware the proxy exists — they think they are connecting directly to the real server. Used for: load balancing, SSL termination, caching, hiding backend infrastructure.
QHow is SOCKS5 different from an HTTP proxy?
An HTTP proxy only understands HTTP/HTTPS — it reads and can modify HTTP headers, and only works with web traffic. SOCKS5 operates at the session layer (OSI Layer 5) and is protocol-agnostic: it tunnels any TCP/UDP traffic (HTTP, SMTP, FTP, game traffic, etc.) without reading the content. SOCKS5 supports username/password authentication and UDP relay. It is well-suited for: SSH tunneling, gaming VPNs, and torrenting.
QDoes a proxy encrypt traffic?
An HTTP proxy does not encrypt — traffic travels in plaintext. The HTTPS CONNECT method creates a tunnel: the client sends a CONNECT request to the proxy, the proxy establishes a TCP tunnel to the server, and then the client performs a TLS handshake end-to-end — the proxy only relays encrypted bytes without reading the content. SOCKS5 also does not encrypt by itself but is often combined with an SSH tunnel to add encryption.
QWhat is the difference between a proxy and a VPN?
A proxy only forwards traffic for a specific application (a browser or app explicitly configured to use it). A VPN creates an encrypted tunnel at the OS level — ALL device traffic goes through the VPN, including DNS. Proxies are generally faster because of less overhead. VPNs are more comprehensive and encrypt everything. A proxy can be bypassed if an app ignores proxy settings. A VPN cannot be bypassed at the application layer.
QWhat is a transparent proxy?
A transparent proxy is one the client is unaware of — no configuration is needed on the client. Traffic is intercepted and redirected to the proxy at the network layer (typically via iptables REDIRECT or TPROXY). ISPs commonly use transparent proxies to cache web content. Enterprises use them to filter web traffic without configuring each device. A transparent proxy does not hide the client's IP.