File tree Expand file tree Collapse file tree 5 files changed +28
-56
lines changed
Expand file tree Collapse file tree 5 files changed +28
-56
lines changed Original file line number Diff line number Diff line change 11FROM ubuntu:14.04
22MAINTAINER Matthias Kadenbach <matthias.kadenbach@gmail.com>
33
4- RUN apt-get update
5- RUN apt-get upgrade -y
6- RUN apt-get install libssl-dev wget curl -y
7- RUN apt-get install build-essential zlib1g-dev libyaml-dev libssl-dev -y
8- RUN ln -s /lib/x86_64-linux-gnu/libssl.so.1.0.0 /lib/libssl.so.1.0.0
9-
10- # Tor
114RUN echo 'deb http://deb.torproject.org/torproject.org trusty main' | tee /etc/apt/sources.list.d/torproject.list
125RUN gpg --keyserver keys.gnupg.net --recv 886DDD89
136RUN gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | apt-key add -
147
15- # Ruby
168RUN echo 'deb http://ppa.launchpad.net/brightbox/ruby-ng/ubuntu trusty main' | tee /etc/apt/sources.list.d/ruby.list
179RUN gpg --keyserver keyserver.ubuntu.com --recv C3173AA6
1810RUN gpg --export 80f70e11f0f0d5f10cb20e62f5da5f09c3173aa6 | apt-key add -
1911
20- # Services
21- RUN apt-get update
22- RUN apt-get install tor polipo haproxy ruby2.1 -y
12+ RUN apt-get update && \
13+ apt-get install -y tor polipo haproxy ruby2.1 libssl-dev wget curl build-essential zlib1g-dev libyaml-dev libssl-dev && \
14+ ln -s /lib/x86_64-linux-gnu/libssl.so.1.0.0 /lib/libssl.so.1.0.0
2315
24- RUN service tor stop
25- RUN service polipo stop
2616RUN update-rc.d -f tor remove
2717RUN update-rc.d -f polipo remove
2818
29- EXPOSE 5566
30-
31- RUN gem install excon
19+ RUN gem install excon -v 0.44.4
3220
33- ADD usr/local/etc/haproxy.cfg.erb /usr/local/etc/haproxy.cfg.erb
34- ADD usr/local/bin/start.rb /usr/local/bin/start.rb
21+ ADD start.rb /usr/local/bin/start.rb
3522RUN chmod +x /usr/local/bin/start.rb
36- CMD /usr/local/bin/start.rb
23+
24+ ADD haproxy.cfg.erb /usr/local/etc/haproxy.cfg.erb
25+
26+ EXPOSE 5566 1936
27+
28+ CMD /usr/local/bin/start.rb
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -22,16 +22,15 @@ docker build -t mattes/rotating-proxy:latest .
2222# ... or pull docker container
2323docker pull mattes/rotating-proxy:latest
2424
25- # debug docker container
26- docker run -v $( pwd) :/home -p 5566:5566 -i -t --env tors=10 mattes/rotating-proxy /bin/bash
27- source <( curl -Ls git.io/apeepg) # inject dotfiles
28-
2925# start docker container
30- docker run -d -p 5566:5566 --env tors=25 mattes/rotating-proxy
26+ docker run -d -p 5566:5566 -p 1936:1936 - -env tors=25 mattes/rotating-proxy
3127
3228# test with ...
3329curl --proxy 127.0.0.1:5566 http://echoip.com
3430curl --proxy 127.0.0.1:5566 http://header.jsontest.com
31+
32+ # monitor
33+ http://127.0.0.1:1936/haproxy? stats
3534```
3635
3736
Original file line number Diff line number Diff line change @@ -14,20 +14,19 @@ defaults
1414 timeout server 60s
1515
1616
17- # listen stats *:1936
18- # mode http
19- # log global
20- # maxconn 10
21- # clitimeout 100s
22- # srvtimeout 100s
23- # contimeout 100s
24- # timeout queue 100s
25- # stats enable
26- # stats hide-version
27- # stats refresh 30s
28- # stats show-node
29- # stats auth admin:admin123
30- # stats uri /haproxy?stats
17+ listen stats *:1936
18+ mode http
19+ log global
20+ maxconn 10
21+ clitimeout 100s
22+ srvtimeout 100s
23+ contimeout 100s
24+ timeout queue 100s
25+ stats enable
26+ stats hide-version
27+ stats refresh 30s
28+ stats show-node
29+ stats uri /haproxy?stats
3130
3231
3332frontend rotating_proxies
File renamed without changes.
You can’t perform that action at this time.
0 commit comments