Skip to content

Commit 21c690b

Browse files
committed
Merge pull request mattes#6 from mattes/fixes
Random updates
2 parents d4f241d + 8de671c commit 21c690b

File tree

5 files changed

+28
-56
lines changed

5 files changed

+28
-56
lines changed

Dockerfile

Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,28 @@
11
FROM ubuntu:14.04
22
MAINTAINER 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
114
RUN echo 'deb http://deb.torproject.org/torproject.org trusty main' | tee /etc/apt/sources.list.d/torproject.list
125
RUN gpg --keyserver keys.gnupg.net --recv 886DDD89
136
RUN gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | apt-key add -
147

15-
# Ruby
168
RUN echo 'deb http://ppa.launchpad.net/brightbox/ruby-ng/ubuntu trusty main' | tee /etc/apt/sources.list.d/ruby.list
179
RUN gpg --keyserver keyserver.ubuntu.com --recv C3173AA6
1810
RUN 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
2616
RUN update-rc.d -f tor remove
2717
RUN 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
3522
RUN 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

Makefile

Lines changed: 0 additions & 18 deletions
This file was deleted.

README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,15 @@ docker build -t mattes/rotating-proxy:latest .
2222
# ... or pull docker container
2323
docker 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 ...
3329
curl --proxy 127.0.0.1:5566 http://echoip.com
3430
curl --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

usr/local/etc/haproxy.cfg.erb renamed to haproxy.cfg.erb

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff 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

3332
frontend rotating_proxies
File renamed without changes.

0 commit comments

Comments
 (0)