1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-12-25 02:04:06 +02:00
This commit is contained in:
kev 2015-06-18 19:49:42 +08:00
parent 115fb4050d
commit 1006b81477
4 changed files with 38 additions and 9 deletions

View File

@ -10,18 +10,31 @@ ENV TOR_URL https://www.torproject.org/dist/tor-$TOR_VER.tar.gz
ENV TOR_MD5 4a1b334c30d7b37ea72fa33425220d5d
ENV TOR_FILE tor.tar.gz
ENV TOR_TEMP tor-$TOR_VER
ENV TOR_DEPS build-base libevent-dev openssl-dev
RUN apk add -U libevent $TOR_DEPS \
RUN apk add -U build-base \
gmp-dev \
libevent \
libevent-dev \
libgmpxx \
openssl \
openssl-dev \
python \
python-dev \
&& wget -O $TOR_FILE $TOR_URL \
&& echo "$TOR_MD5 $TOR_FILE" | md5sum -c \
&& tar xzf $TOR_FILE \
&& echo "$TOR_MD5 $TOR_FILE" | md5sum -c \
&& tar xzf $TOR_FILE \
&& cd $TOR_TEMP \
&& ./configure --prefix=/ --exec-prefix=/usr \
&& make install \
&& cd .. \
&& rm -rf $TOR_FILE $TOR_TEMP \
&& apk del $TOR_DEPS \
&& wget -O- https://bootstrap.pypa.io/get-pip.py | python \
&& pip install obfsproxy \
&& apk del build-base \
gmp-dev \
libevent-dev \
openssl-dev \
python-dev \
&& rm -rf /var/cache/apk/*
COPY ./torrc /etc/tor/torrc

View File

@ -28,19 +28,19 @@ tor:
## torrc
```
Log notice stdout
RunAsDaemon 0
SocksPort 0.0.0.0:9050
ORPort 9001
DirPort 9030
BridgeRelay 1
#ServerTransportPlugin obfs4 exec /usr/bin/obfs4proxy
ServerTransportPlugin obfs3 exec /usr/bin/obfsproxy
ExtORPort auto
Exitpolicy reject *:*
ContactInfo noreply@datageek.info
Nickname datageek
```
> Try to install `obfs4proxy` into container.
## up and running
```
@ -48,3 +48,7 @@ $ docker-compose up -d
$ curl -x socks5h://127.0.0.1:9050 ifconfig.me
```
## todo
- support `obfs4proxy`

10
tor/docker-compose.yml Normal file
View File

@ -0,0 +1,10 @@
tor:
image: vimagick/tor
ports:
- "9001:9001"
- "9030:9030"
- "9050:9050"
- "9051:9051"
volumes:
- ./torrc:/etc/tor/torrc
restart: always

View File

@ -1,8 +1,10 @@
Log notice stdout
RunAsDaemon 0
SocksPort 0.0.0.0:9050
ORPort 9001
DirPort 9030
BridgeRelay 1
#ServerTransportPlugin obfs4 exec /usr/bin/obfs4proxy
ServerTransportPlugin obfs3 exec /usr/bin/obfsproxy
ExtORPort auto
Exitpolicy reject *:*
ContactInfo noreply@datageek.info