Proxy Server
- Network intermediary that sits between clients and servers, acting as a gateway for requests from clients seeking resources from other servers
- Client connects to proxy server and requests service (web page, file, connection) from different server
- Proxy evaluates request and performs network transaction on behalf of client
- Key principle: Client thinks it’s talking directly to the server, but proxy handles all communication
Types of Proxy Servers
- Forward Proxy - Traditional proxy between client and internet (what most people mean by “proxy”)
- Reverse Proxy - Sits in front of web servers, intercepting requests from clients (acts on behalf of server, not client)
- Transparent Proxy - Intercepts communication without requiring client configuration (client doesn’t know it exists)
- Anonymous Proxy - Hides client’s IP address from destination server
Forward vs Reverse Proxy Comparison
| Aspect | Forward Proxy | Reverse Proxy |
|---|---|---|
| Position | Between client and internet | Between internet and server |
| Protects | Client identity/network | Server infrastructure |
| Client Awareness | Client must be configured | Client unaware of proxy |
| Primary Use | Content filtering, caching | Load balancing, SSL termination |
| Example | Corporate web filter | CDN edge server |
|
|
Common Proxy Functions
- Content Filtering - Block access to specific websites or content types (corporate firewall policies)
- Caching - Store frequently requested content locally to reduce bandwidth and improve response times
- Load Balancing - Distribute incoming requests across multiple backend servers
- SSL Termination - Handle encryption/decryption to offload processing from backend servers
- Authentication - Centralized user authentication before allowing internet access
- Logging/Monitoring - Track user activity and bandwidth usage for compliance
Real-World Use Cases
- Corporate Networks - Squid proxy for web filtering and bandwidth control
- Content Delivery Networks (CDNs) - Reverse proxies cache content closer to users
- API Gateways - Reverse proxy managing API requests, rate limiting, authentication
- School Networks - Transparent proxy blocking social media during class hours
Proxy Server Ports and Protocols
| Service | Default Port | Protocol | Notes |
|---|---|---|---|
| HTTP Proxy | 3128, 8080 | TCP | Most common web proxy ports |
| HTTPS Proxy | 3128, 8080 | TCP | Same ports, but tunneled traffic |
| SOCKS Proxy | 1080 | TCP | More flexible, handles any protocol |
| Transparent Proxy | 80, 443 | TCP | Intercepts standard web traffic |
Vocabulary
- Proxy Server - Intermediary server that forwards client requests to other servers
- Forward Proxy - Proxy that acts on behalf of clients (hides client from server)
- Reverse Proxy - Proxy that acts on behalf of servers (hides server from client)
- Transparent Proxy - Proxy that intercepts traffic without client configuration
- SOCKS - Socket Secure protocol for routing network packets between client and server
- SSL Termination - Process where proxy handles SSL encryption/decryption instead of backend server
- Cache Hit - When requested content is found in proxy cache (no need to contact origin server)
- Cache Miss - When requested content not in cache (must retrieve from origin server)
Notes
- Critical distinction: Forward proxy protects client identity, reverse proxy protects server infrastructure
- Proxy authentication typically uses NTLM or Kerberos in Windows environments
- Transparent proxies can cause issues with applications that don’t expect proxy behavior
- Modern browsers support Proxy Auto-Configuration (PAC) files for automatic proxy settings
- Security caveat: Proxies can inspect all traffic, including sensitive data (unless using HTTPS tunneling)
- Load balancer is essentially a specialized reverse proxy focused on distributing traffic
- Performance tip: Proxy caching most effective for static content (images, CSS, JavaScript)
- SOCKS proxies work at lower network level, can handle any protocol (not just HTTP/HTTPS)
- Troubleshooting: Check proxy logs first when users report connectivity issues - often reveals blocked content or authentication failures