About
A forward proxy is a proxy application that is configured to intercept and forward every internal Http request to an destination website, hence the name Forward Proxy.
It's also known as man-in-the-middle proxy.
The proxy configuration that do the inverse (ie receives external request and routes them to internal service such as a website) is called a reverse proxy or gateway
The forward proxy sits on a local network between the local client (user) and the external destination website.
Technically, in order to get content from the origin server, the client sends a request to the forward proxy naming the origin server as the target. The proxy then requests the content from the origin server and returns it to the client.
Usage
A typical usage of a forward proxy is to intercept HTTP traffic and:
- to implement a web cache to reduce network usage.
- to analyze HTTP traffic (Network - Trace (Capture|Sniffer|Analyzer) Tool (Packet Analysis))
- to modify the HTTP page
- to anonymize where the request originally came from
Example:
- Web Workers can intercept and modify HTTP request
- Security testing tool can intercept, modify and send traffic.
Type
The proxy can be implemented:
- on a intermediate server as a http server
- on the browser via a service worker
Client Configuration for a server proxy
Windows
The client must be specially configured to use the forward proxy to access other sites. Ie the proxy parameters.
Example with Windows:
Linux
The configuration of a forward proxy on a Linux server happens with the environment variable http_proxy or https_proxy that set the proxy server location.
Example:
export http_proxy=http://proxy.example.com:8080
export https_proxy=https://proxy.example.com:8080