1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-12-25 02:04:06 +02:00

update tor

This commit is contained in:
kev 2015-09-28 15:33:24 +08:00
parent 5000671539
commit 6c079cb83a
3 changed files with 29 additions and 7 deletions

View File

@ -8,6 +8,8 @@ MAINTAINER kev <noreply@datageek.info>
RUN echo 'http://dl-4.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories \
&& apk add -U build-base \
gmp-dev \
git \
go \
libgmpxx \
py-pip \
python \
@ -15,16 +17,22 @@ RUN echo 'http://dl-4.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositor
tor \
&& pip install fteproxy \
obfsproxy \
&& GOPATH=/tmp/obfs4 go get git.torproject.org/pluggable-transports/obfs4.git/obfs4proxy \
&& mv /tmp/obfs4/bin/obfs4proxy /usr/bin \
&& rm -rf /tmp/obfs4 \
&& apk del build-base \
git \
go \
gmp-dev \
python-dev \
&& rm -rf /var/cache/apk/*
&& rm -rf /var/cache/apk/* \
&& mkdir -p /home/tor/.tor \
&& chown -R tor:nogroup /home/tor \
COPY ./torrc /etc/tor/torrc
USER tor
WORKDIR /home/tor
VOLUME /etc/tor /home/tor/.tor
EXPOSE 9001 9030 9050 9051

View File

@ -12,6 +12,12 @@ state security.
- Tor is for web browsers, instant messaging clients, and more.
- Tor is free and open source for Windows, Mac, Linux/Unix, and Android
ServerTransportPlugin:
- [x] fte
- [x] obfs3
- [x] obfs4
## docker-compose.yml
```
@ -33,7 +39,9 @@ BridgeRelay 1
Exitpolicy reject *:*
Nickname datageek
ContactInfo noreply@datageek.info
ServerTransportPlugin obfs3 exec /usr/bin/obfsproxy managed
#ServerTransportPlugin fte exec /usr/bin/fteproxy --mode server --managed
#ServerTransportPlugin obfs3 exec /usr/bin/obfsproxy managed
ServerTransportPlugin obfs4 exec /usr/bin/obfs4proxy
```
## torrc (client)
@ -41,7 +49,9 @@ ServerTransportPlugin obfs3 exec /usr/bin/obfsproxy managed
```
#Socks5Proxy 127.0.0.1:1080
UseBridges 1
Bridge obfs3 1.2.3.4:9001 F24BF4DE74649E205A8A3621C84F97FF623B2083
#Bridge fte 104.238.161.174:9001 F24BF4DE74649E205A8A3621C84F97FF623B2083
#Bridge obfs3 1.2.3.4:9001 F24BF4DE74649E205A8A3621C84F97FF623B2083
Bridge obfs4 1.2.3.4:9001 F24BF4DE74649E205A8A3621C84F97FF623B2083
```
> Please connect via `Socks5Proxy` if you're blocked!
@ -51,7 +61,7 @@ Bridge obfs3 1.2.3.4:9001 F24BF4DE74649E205A8A3621C84F97FF623B2083
```
$ docker-compose up -d
$ docker-compose logs
$ docker exec tor_tor_1 cat /root/.tor/fingerprint
$ docker exec -it tor_tor_1 tor --quiet --list-fingerprint
datageek F24BF4DE74649E205A8A3621C84F97FF623B2083
```
@ -59,11 +69,13 @@ datageek F24BF4DE74649E205A8A3621C84F97FF623B2083
```
$ tor -f /etc/tor/torrc
$ curl -x socks5h://127.0.0.1:9050 ifconfig.me
$ curl -x socks5h://127.0.0.1:9050 ifconfig.ovh
```
## references
- https://www.torproject.org/projects/obfsproxy-debian-instructions.html.en
- https://fteproxy.org/help-server-with-tor
- https://github.com/Yawning/obfs4
[1]: https://www.torproject.org/

View File

@ -4,4 +4,6 @@ BridgeRelay 1
Exitpolicy reject *:*
Nickname datageek
ContactInfo noreply@datageek.info
ServerTransportPlugin obfs3 exec /usr/bin/obfsproxy managed
ServerTransportPlugin fte exec /usr/bin/fteproxy --mode server --managed
#ServerTransportPlugin obfs3 exec /usr/bin/obfsproxy managed
#ServerTransportPlugin obfs4 exec /usr/bin/obfs4proxy