ooni / probe

OONI Probe network measurement tool for detecting internet censorship
https://ooni.org/install
BSD 3-Clause "New" or "Revised" License
750 stars 142 forks source link

tor: next steps and methodology improvements #1730

Open bassosimone opened 2 years ago

bassosimone commented 2 years ago

This issue is an Epic issue collecting further improvements of the tor and torsf experiments. The content of this issue has been discussed yesterday with @cohosh. I am grouping all the content of the discussion together, so we have a single place to which we can refer when talking about the conversation we had. The general idea in moving forward is to create issues that belong to this Epic and start by fixing the easiest issues.

(We don't reference torsf in this issue anymore, because the Snowflake team fixed all remaining issues when they released the "event channel" functionality inside of Snowflake v2.1.0. For this reason, I've changed the title to more accurately reflect what remains to be done in this issue.)

Things to improve in the tor experiment

Things to improve in the torsf experiment

cohosh commented 2 years ago

figure out an easy way to collect logs that currently go on stdout

I looked into this a bit, and there is a way with the current setup to control where the snowflake log output goes. We use the default logger for the Go standard library log which sends messages to stderr by default. A quick fix for this might be to use the SetOutput function (available in Go versions 1.13 and later) allows you to set the output of the default logger to anything that implements the io.Writer interface. We do this ourselves in our main Snowflake program to send logs through a log scrubber.

However, my understanding is that this will send all output for all libraries that use the default logger to the same place.

I made a note of this in https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/issues/40063

bassosimone commented 2 years ago

This issue does not need to be an Epic because we already have an Epic on ~this topic (https://github.com/ooni/probe/issues/1686) and it does not help us to have duplicate issues.

bassosimone commented 2 years ago

@cohosh thank you for looking into this! I will take a look at whether this is a feasible approach for us, but the fact that every user of log.Printf goes into the same redirected writable may indeed be an issue for us!

bassosimone commented 2 years ago

I am going to transform this issue into an Epic and move sub-issues that were part of https://github.com/ooni/probe/issues/1657 to this issue, since this issue basically contains everything we'd like to do next for tor experiments.