Dockerfile for creating a privoxy proxy utilizing tor.
Not sure why other than I thought it would be a fun exercise. Perhaps it will be useful for someone else.
-
Install Homebrew
$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
-
Install Brew Cask
$ brew install caskroom/cask/brew-cask
-
Install boot2docker
$ brew cask install boot2docker
-
Initialize boot2docker:
$ boot2docker init $ boot2docker up $ eval "$(boot2docker shellinit)"
-
Checkout and build docker image
$ git clone https://github.com/jkordish/dockerfile-privoxy_tor.git $ cd dockerfile-privoxy_tor $ docker build -t tor .
-
Start up the tor/privoxy container
$ docker run --name tor -p 8118:8118 -d tor
-
Test it out
$ docker exec tor curl -skx localhost:8118 icanhazip.com $ curl -skx $(boot2docker ip):8118 icanhazip.com
-
Change browser proxy setting to the output of the command:
$ echo $(boot2docker ip):8118
-
teardown once finished:
$ docker kill tor $ docker rm tor $ boot2docker down
Simliar to the boo2docker above but this uses the xhyve.
This particuliar project is via the awesome boot2docker-xhyve
-
Install xhyve
$ git clone https://github.com/mist64/xhyve $ cd xhyve $ make $ cp build/xhyve /usr/local/bin/ # You may need sudo.
-
Install boot2docker-xhyve
$ git clone https://github.com/ailispaw/boot2docker-xhyve $ cd boot2docker-xhyve $ make
-
Boot it up
$ sudo ./xhyverun.sh
-
Login using the user docker
-
Get the ip address of eth0
$ ip a
-
Checkout and build docker image
$ git clone https://github.com/jkordish/dockerfile-privoxy_tor.git $ cd dockerfile-privoxy_tor $ docker build -t tor .
-
Start up the tor/privoxy container
$ docker run --name tor -p 8118:8118 -d tor