Skip to content

Instantly share code, notes, and snippets.

@rn
Created June 8, 2016 14:17
Show Gist options
  • Save rn/32b8336f7a92a97b8d9ced79d67edc2e to your computer and use it in GitHub Desktop.
Save rn/32b8336f7a92a97b8d9ced79d67edc2e to your computer and use it in GitHub Desktop.
Create a container running squid:
```
docker run --name squid -d -p 3128:3128 sameersbn/squid:3.3.8-14
```
Create a `proxy.pac` file (change IP address as needed):
```
function FindProxyForURL(url, host)
{
return "PROXY 172.16.10.36:3128" ;
}
```
Create a apache container serving the PAC file:
```
docker run -it --rm --name rneugeba-www -p 8080:80 -v "$PWD":/usr/local/apache2/htdocs/ httpd:2.4
```
The point your proxy config at: `http://172.16.10.36:8080/proxy.pac`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment