mirror of
https://github.com/vimagick/dockerfiles.git
synced 2025-12-21 21:33:02 +01:00
update
This commit is contained in:
@@ -10,9 +10,16 @@ ENV TOR_URL https://www.torproject.org/dist/tor-$TOR_VER.tar.gz
|
|||||||
ENV TOR_MD5 4a1b334c30d7b37ea72fa33425220d5d
|
ENV TOR_MD5 4a1b334c30d7b37ea72fa33425220d5d
|
||||||
ENV TOR_FILE tor.tar.gz
|
ENV TOR_FILE tor.tar.gz
|
||||||
ENV TOR_TEMP tor-$TOR_VER
|
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 \
|
&& wget -O $TOR_FILE $TOR_URL \
|
||||||
&& echo "$TOR_MD5 $TOR_FILE" | md5sum -c \
|
&& echo "$TOR_MD5 $TOR_FILE" | md5sum -c \
|
||||||
&& tar xzf $TOR_FILE \
|
&& tar xzf $TOR_FILE \
|
||||||
@@ -21,7 +28,13 @@ RUN apk add -U libevent $TOR_DEPS \
|
|||||||
&& make install \
|
&& make install \
|
||||||
&& cd .. \
|
&& cd .. \
|
||||||
&& rm -rf $TOR_FILE $TOR_TEMP \
|
&& 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/*
|
&& rm -rf /var/cache/apk/*
|
||||||
|
|
||||||
COPY ./torrc /etc/tor/torrc
|
COPY ./torrc /etc/tor/torrc
|
||||||
|
|||||||
@@ -28,19 +28,19 @@ tor:
|
|||||||
## torrc
|
## torrc
|
||||||
|
|
||||||
```
|
```
|
||||||
|
Log notice stdout
|
||||||
RunAsDaemon 0
|
RunAsDaemon 0
|
||||||
SocksPort 0.0.0.0:9050
|
SocksPort 0.0.0.0:9050
|
||||||
ORPort 9001
|
ORPort 9001
|
||||||
|
DirPort 9030
|
||||||
BridgeRelay 1
|
BridgeRelay 1
|
||||||
#ServerTransportPlugin obfs4 exec /usr/bin/obfs4proxy
|
ServerTransportPlugin obfs3 exec /usr/bin/obfsproxy
|
||||||
ExtORPort auto
|
ExtORPort auto
|
||||||
Exitpolicy reject *:*
|
Exitpolicy reject *:*
|
||||||
ContactInfo noreply@datageek.info
|
ContactInfo noreply@datageek.info
|
||||||
Nickname datageek
|
Nickname datageek
|
||||||
```
|
```
|
||||||
|
|
||||||
> Try to install `obfs4proxy` into container.
|
|
||||||
|
|
||||||
## up and running
|
## up and running
|
||||||
|
|
||||||
```
|
```
|
||||||
@@ -48,3 +48,7 @@ $ docker-compose up -d
|
|||||||
$ curl -x socks5h://127.0.0.1:9050 ifconfig.me
|
$ curl -x socks5h://127.0.0.1:9050 ifconfig.me
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## todo
|
||||||
|
|
||||||
|
- support `obfs4proxy`
|
||||||
|
|
||||||
|
|||||||
10
tor/docker-compose.yml
Normal file
10
tor/docker-compose.yml
Normal 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
|
||||||
@@ -1,8 +1,10 @@
|
|||||||
|
Log notice stdout
|
||||||
RunAsDaemon 0
|
RunAsDaemon 0
|
||||||
SocksPort 0.0.0.0:9050
|
SocksPort 0.0.0.0:9050
|
||||||
ORPort 9001
|
ORPort 9001
|
||||||
|
DirPort 9030
|
||||||
BridgeRelay 1
|
BridgeRelay 1
|
||||||
#ServerTransportPlugin obfs4 exec /usr/bin/obfs4proxy
|
ServerTransportPlugin obfs3 exec /usr/bin/obfsproxy
|
||||||
ExtORPort auto
|
ExtORPort auto
|
||||||
Exitpolicy reject *:*
|
Exitpolicy reject *:*
|
||||||
ContactInfo noreply@datageek.info
|
ContactInfo noreply@datageek.info
|
||||||
|
|||||||
Reference in New Issue
Block a user