#Forward Proxy
A forward proxy sits between clients and the internet.
#Use Cases
- Privacy: Hide client IP
- Caching: Cache responses
- Filtering: Block certain sites
- Security: Scan for malware
#Architecture
[Clients] → [Forward Proxy] → [Internet]
#Squid Proxy Example
bash
1# Install
2sudo apt install squid
3
4# Basic config (/etc/squid/squid.conf)
5http_port 3128
6acl localnet src 192.168.1.0/24
7http_access allow localnet
8http_access deny all
9
10# Start
11sudo systemctl start squid#Client Configuration
bash
1# Environment variables
2export http_proxy=http://proxy:3128
3export https_proxy=http://proxy:3128
4
5# curl with proxy
6curl -x http://proxy:3128 https://example.com