Commit 491e0954 authored by Cecylia Bocovich's avatar Cecylia Bocovich
Browse files

Merge branch 'main' of gitlab.torproject.org:cohosh/probetest into main

parents 3e77aa65 e1504f86
......@@ -9,7 +9,15 @@ Datasets from multiple probe points are published by us at: https://people.torpr
#### Docker
We have a docker image for performing these tests.
We have a docker image for performing these tests. To run this image, first modify `.env` with your user id number (you can get this by checking `echo $UID`), and a unique name for the site (e.g., a country code).
You can either build the image from scratch, or if you don't, the compose file will pull our pre-built image from docker hub. I recommend this latter option in places where Tor is blocked. It also contains some built-in obfs4 bridge lines selected by us.
Then start the probe by running:
```
docker-compose up -d
```
The results will appear in the `log/` directory.
#### Manual
......
......@@ -4,7 +4,7 @@
#
#SITENAME=unique id
#
version: "3.9"
version: "3.0"
services:
probetest:
......
FROM debian:buster-slim
LABEL maintainer="Cecylia Bocovich <cohosh@torproject.org>"
#install python
RUN apt-get update && apt-get install -y git wget tcpdump \
python3 python3-stem tor obfs4proxy
python3 python3-stem tor obfs4proxy && apt-get clean
#install Go
RUN wget https://golang.org/dl/go1.15.14.linux-amd64.tar.gz && \
......@@ -12,7 +14,8 @@ ENV PATH=$PATH:/usr/local/go/bin
#install snowflake
RUN git clone https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git \
&& cd snowflake/client && go get -d && go build && cp client /usr/bin/snowflake
&& cd snowflake/client && go get -d && go build && mv client /usr/bin/snowflake \
&& cd - && rm -rf snowflake
RUN git clone https://github.com/cohosh/bridgetest.git && \
cd bridgetest/stun-test && go get -d && go build
......
0 */6 * * * cd /bridgetest && ./probetest.sh snowflake $SITENAME
0 2-23/6 * * * cd /bridgetest && ./probetest.sh obfs4 $SITENAME
0 0 * * * cd /bridgetest && ./probetest.sh snowflake $SITENAME
0 2 * * * cd /bridgetest && ./probetest.sh obfs4 $SITENAME
......@@ -131,7 +131,7 @@ with open(bridge_lines_file) as f:
try:
logging.info("starting tcpdump for bridge %r" % nickname)
try:
tcpdump_lo_proc = start_tcpdump(nickname, "lo")
#tcpdump_lo_proc = start_tcpdump(nickname, "lo")
tcpdump_eth0_proc = start_tcpdump(nickname, "eth0")
except OSError as e:
logging.info("failed to start tcpdump, stopping snowflake probe: %s", e)
......
......@@ -113,7 +113,7 @@ for x in range(0, 10):
try:
logging.info("starting tcpdump for bridge %r" % nickname)
try:
tcpdump_lo_proc = start_tcpdump(nickname, "lo")
#tcpdump_lo_proc = start_tcpdump(nickname, "lo")
tcpdump_eth0_proc = start_tcpdump(nickname, "eth0")
except OSError as e:
logging.info("failed to start tcpdump, stopping snowflake probe: %s", e)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment