The goal of this project is to quickly test out instances where you need a forward proxy, with custom SSL Certificates.
- Docker
- Docker Compose
- ~500MB of free disk space for caching
- Open ports 3128 and 4128 (if running locally)
- Clone this repository in your working directory.
git clone [email protected]:davydany/squid-proxy.git $PROJECT_HOME/squid-proxy- Change directory to
$PROJECT_HOME/squid-proxy:
$PROJECT_HOME/squid-proxy- Run the Project
docker compose up This is how you'd normally do curl:
curl https://ip.oxylabs.io/locationHere is how you'd do it by using this proxy server:
curl https://ip.oxylabs.io/location -x http://localhost:4128/ --cacert ./cert/CA.pemiptables -t nat -A OUTPUT -p tcp --dport 80 -j DNAT --to-destination 127.0.0.1:4128
iptables -t nat -A OUTPUT -p tcp --dport 443 -j DNAT --to-destination 127.0.0.1:4128RESET: If you need to reset the commands above, do this:
iptables -t nat -D OUTPUT -p tcp --dport 80 -j DNAT --to-destination 127.0.0.1:4128
iptables -t nat -D OUTPUT -p tcp --dport 443 -j DNAT --to-destination 127.0.0.1:4128Now, reset iptables:
iptables -t nat -F
# really reset things (if the above commands don't work)
iptables -F
iptables -t nat -F
iptables -X
# verify
iptables -t nat -L --line-numbers -v