What is a proxy server?
A proxy server is a computer or program that stands between a client and the server it wants to reach. The client sends its request to the proxy; the proxy makes the request to the destination, receives the answer and passes it back. To the destination, the request appears to come from the proxy.
The HTTP standard, RFC 9110, defines the two roles precisely. A proxy is "a message-forwarding agent that is chosen by the client, usually via local configuration rules". A gateway, which the RFC says is also known as a reverse proxy, "acts as an origin server for the outbound connection but translates received requests and forwards them inbound to another server or servers". In plain terms: a forward proxy works for the people browsing, a reverse proxy works for the website.
A Hindi version of this explainer is available: proxy server kya hai.
How a proxy server works
- Your browser or app is configured to use a proxy, or the network sends traffic through one automatically.
- When you open a site, the request goes to the proxy instead of straight to the site.
- The proxy checks its rules: is this user allowed, is this site blocked, is a cached copy available?
- If allowed, the proxy connects to the site using its own IP address and fetches the response.
- The proxy may log, filter, cache or modify the response, then sends it back to you.
For HTTPS sites, a normal forward proxy cannot read the page. The browser asks the proxy to open a tunnel with the HTTP CONNECT method, and the encrypted traffic passes through untouched. RFC 9110 calls this blind relay a tunnel. Proxies that do read HTTPS traffic (common in corporate networks) need a certificate installed on every device, and that should only ever be done by your own organisation.
Forward proxy vs reverse proxy
| Forward proxy | Reverse proxy | |
|---|---|---|
| Works on behalf of | Clients (users, office PCs, apps) | Servers (a website or API) |
| Who configures it | The user or their IT team | The site owner |
| Who knows it is there | The client; the website usually does not | The website; visitors usually do not |
| Hides | The client's IP address from websites | The application servers' addresses from visitors |
| Typical jobs | Filtering, access control, caching, a fixed outbound IP | HTTPS termination, load balancing, caching, compression, DDoS absorption |
| Typical software | Squid, corporate secure web gateways | Nginx, HAProxy, Caddy, Apache, a CDN |
| Default port | Varies; Squid normally listens on 3128 | 80 and 443, the website's own ports |
Most people use reverse proxies every day without knowing it. When you open a large website, you are almost always talking to a reverse proxy or a CDN edge server, not to the application itself.
Types of proxy servers
| Type | What it does | Typical use |
|---|---|---|
| HTTP / HTTPS proxy | Forwards web requests; tunnels HTTPS with CONNECT | Office and school networks, developer testing |
| SOCKS5 proxy | Relays any TCP connection (and UDP) without understanding HTTP; RFC 1928, conventionally port 1080 | Apps that are not browsers; an SSH dynamic tunnel (ssh -D) creates one |
| Transparent proxy | Intercepts traffic without any setting on the device | ISP or network caching, captive Wi-Fi login pages |
| Anonymous proxy | Forwards without revealing the client IP in headers | Privacy; trust depends entirely on the operator |
| Caching proxy | Stores copies of responses to serve repeat requests | Saving bandwidth on a shared connection |
| Reverse proxy | Accepts traffic for a site and passes it to back-end servers | Nginx in front of Node.js, Python or PHP apps |
The SOCKS row matters to server users: ssh -D 1080 user@your-server turns any SSH server into a private SOCKS5 proxy for your own browser. Our SSH tunnel guide shows the full command set.
Proxy vs VPN: what is the difference?
| Proxy server | VPN | |
|---|---|---|
| What it covers | Only the apps or browser configured to use it | All traffic from the device, at the network level |
| Encryption between you and it | Not by default (HTTPS sites stay encrypted end to end) | Yes, the whole tunnel is encrypted |
| Changes the IP sites see | Yes, for proxied traffic | Yes, for all traffic |
| Setup | An address and port in the browser or OS settings | A VPN app or OS VPN profile |
| Who sees your traffic | The proxy operator | The VPN operator |
Neither one makes you anonymous to whoever runs it. A free proxy that you found on a list can read and alter any unencrypted traffic and log everything else, so use only proxies your organisation runs or ones you run yourself.
How to use a proxy server: set or remove it
Most "how to use a proxy server" questions are really one of two things: an office asks you to enter a proxy, or something has set one and the internet stopped working. The settings are in the same places.
Windows 10 and 11
- Open Settings, Network & internet, Proxy.
- Under Automatic proxy setup, either turn on Automatically detect settings or enter the setup script address your IT team gave you.
- Under Manual proxy setup, select Set up, turn on Use a proxy server, and enter the address and port.
- To remove a proxy, turn Use a proxy server off. If a site still fails, check that no unknown setup script is listed.
Chrome and Edge on Windows use these system settings. Firefox has its own under Settings, General, Network Settings, where "Use system proxy settings" makes it follow Windows.
Android
Open Settings, Wi-Fi, tap the gear or long-press the connected network, choose Edit or Advanced options, and set Proxy to Manual with a hostname and port. This applies to that Wi-Fi network only, and some apps ignore it.
Linux servers and the command line
export https_proxy=http://proxy.example.com:3128
export http_proxy=http://proxy.example.com:3128
export no_proxy=localhost,127.0.0.1
Tools such as curl, wget and apt honour these variables. unset https_proxy http_proxy removes them for the session.
If pages stop loading after a proxy change, the error usually reads ERR_CONNECTION_REFUSED or a proxy-specific message. Turning the proxy off is the first test.
Proxy auto-config (PAC) files
Many offices do not ask you to type a proxy at all. Instead, the network or IT team gives a setup script address that ends in .pac. A PAC file is a small JavaScript function the browser runs for each URL to decide whether to go direct or through a proxy, so internal sites can skip the proxy while internet traffic uses it. "Automatically detect settings" in Windows uses WPAD to find such a script on the local network. If you are not on a managed network, there is no reason for a setup script to be listed.
Proxy server errors and what they mean
| Error | Meaning | First thing to try |
|---|---|---|
ERR_PROXY_CONNECTION_FAILED (Chrome) | The browser is set to use a proxy that does not answer | Turn the proxy off in system settings, or correct the address and port |
ERR_TUNNEL_CONNECTION_FAILED | The proxy refused or failed to open a CONNECT tunnel for an HTTPS site | Check whether the proxy allows that site and port |
407 Proxy Authentication Required | The proxy needs a username and password (RFC 9110) | Enter proxy credentials, or ask IT |
502 Bad Gateway from your own site | Your reverse proxy could not get a valid answer from the app | Check the app is running on the port in proxy_pass |
504 Gateway Timeout | The app took longer than the proxy's timeout | Check slow queries, or raise proxy_read_timeout |
What is a reverse proxy used for on a server?
On a VPS, a reverse proxy is the standard way to put an application on the internet. Your Node.js or Python app listens only on 127.0.0.1:8000; Nginx listens on ports 80 and 443, holds the SSL certificate, and forwards requests to the app. This gives you:
- One place for HTTPS. The certificate lives in Nginx, not in every app.
- Several apps on one IP. Nginx routes by hostname, so
app.example.comandapi.example.comcan reach different back ends. - Protection for the app. Slow or malformed requests hit Nginx first, and the app is not directly reachable.
- Caching and compression without changing application code.
A minimal Nginx reverse proxy, based on the example in the Nginx proxy module documentation:
server {
listen 80;
server_name app.example.com;
location / {
proxy_pass http://127.0.0.1:8000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
Two details catch people out. By default Nginx sends the back end Host: 127.0.0.1:8000 (the $proxy_host value), so set Host $host if the app needs the real domain. And because every request now comes from Nginx, the app sees 127.0.0.1 as the visitor's address unless it reads X-Forwarded-For or the standard Forwarded header from RFC 7239, and only trust those headers from your own proxy. When the back end is down or slow, the proxy itself returns the error, which is where 502 Bad Gateway and 504 Gateway Timeout come from.
How to get a proxy server of your own
If you need a forward proxy you control, for example a fixed outbound IP for API whitelisting or a private SOCKS proxy while travelling, a small Linux VPS is enough. The two simplest routes are an SSH SOCKS tunnel, which needs nothing installed beyond SSH, and Squid for an always-on HTTP proxy. Whatever you run, restrict it to your own IP addresses or require a password; an open proxy is quickly found and abused, and the abuse is traced to your server's IP. On our servers, our acceptable use policy requires our prior written approval before you run a public proxy, VPN exit node or Tor exit relay on a VPS or dedicated server; a private proxy restricted to your own IP addresses is not a public proxy.
The SSH route takes one command on your own computer:
ssh -D 1080 -N user@203.0.113.10
The OpenSSH manual describes -D as dynamic application-level port forwarding: SSH opens a SOCKS proxy on port 1080 of your computer, and every connection sent to it leaves from the server. -N keeps the session open without running a remote command. Then set your browser's SOCKS host to 127.0.0.1, port 1080. Nothing listens on the server's public interface, so there is nothing for others to abuse, and the traffic between you and the server is encrypted by SSH.
Proxies and your Bigdomainhost server
Our guide to deploying a Node.js app on a VPS walks through a full Nginx reverse proxy with HTTPS. If you get stuck, message us on WhatsApp at +91 75994 50220 at any time, or call during IST working hours.
This guide was written by the Bigdomainhost team with AI assistance; facts and configuration were checked against the linked sources on 26 November 2026.
Sources (checked )
- IETF (RFC Editor): RFC 9110: HTTP Semantics, section 3.7 Intermediaries
- IETF (RFC Editor): RFC 1928: SOCKS Protocol Version 5
- IETF (RFC Editor): RFC 7239: Forwarded HTTP Extension
- nginx.org: Module ngx_http_proxy_module (proxy_pass, proxy_set_header, $proxy_add_x_forwarded_for)
- Squid Cache: Squid configuration directive http_port
- Microsoft Support: Use a proxy server in Windows
- OpenBSD: ssh(1) manual: -D dynamic port forwarding