Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

STUN servers reachability #243

Closed
NullHypothesis opened this issue Jul 18, 2019 · 12 comments
Closed

STUN servers reachability #243

NullHypothesis opened this issue Jul 18, 2019 · 12 comments
Assignees
Labels
new experiment Implementation of a new experiment ooni/probe-engine Issues related to github.com/ooni/probe-engine priority/high High priority
Projects

Comments

@NullHypothesis
Copy link

The WebRTC-based Snowflake circumvention system relies on STUN for bootstrapping connections. So far, we have used Google's STUN server stun.l.google.com:19302 hard-coded in Snowflake but it ended up getting blocked in China. It would be useful for OONI to monitor the reachability of STUN servers so we get an idea of what servers work where.

STUN is based on UDP, so testing a STUN server is not as simple as trying to establish a TCP connection. I suggest we send a "binding request" to a server and label it as reachable if it responds with a "binding response."

I found several STUN client implementations in Python so we won't have to reinvent the wheel. We should come up with a list of popular STUN servers that are worth probing.

@hellais hellais transferred this issue from ooni/probe Aug 1, 2019
@hellais
Copy link
Member

hellais commented Aug 1, 2019

Thanks for filing this issue @NullHypothesis !

I moved this issue into the ooni/spec repo as the first step is to write a specification for the test.

@bassosimone bassosimone transferred this issue from ooni/spec Jan 12, 2020
@bassosimone bassosimone added effort/L Large effort new experiment Implementation of a new experiment priority/low Low priority labels Jan 12, 2020
@bassosimone bassosimone changed the title Have OONI measure STUN server reachability STUN servers reachability Jan 12, 2020
@bassosimone bassosimone added the enhancement New feature or request label Jan 12, 2020
@bassosimone
Copy link
Member

bassosimone commented Jan 12, 2020

@hellais @NullHypothesis our code base is now increasingly in Go. Therefore, we can perform these measurements using Go, as we're starting to do with OBFS4 in #227. Is my understanding correct that integrating the client/lib of https://github.com/keroserene/snowflake we will be able to provide a measurement of whether we can use snowflake from a given vantage point?

(I guess, speaking of this issue proper, the question is whether we can feed STUN servers to snowflake and see whether they can be used to bootstrap correctly.)

@bassosimone bassosimone removed the enhancement New feature or request label Jan 12, 2020
@FedericoCeratto
Copy link

@bassosimone STUN is used by many application, sometimes with WebRTC, and often to make audio and video calls without bouncing through a server. It could make sense to have a test function can be reused by other tests.

@hellais hellais added the ooni/probe-engine Issues related to github.com/ooni/probe-engine label Jan 16, 2020
@cohosh
Copy link

cohosh commented Feb 13, 2020

I think it makes more sense here to just test STUN servers. As @FedericoCeratto mentioned, these tests can be useful for applications other than Snowflake that rely on STUN servers for WebRTC. The Snowflake client library doesn't allow for an easy separation between different steps in a snowflake connection. The steps are:

  1. Get candidates from a STUN server
  2. Contact the broker to get a proxy
  3. Make a WebRTC connection to a proxy

If a connection fails, it's difficult to tell through the API where exactly it failed. To do this, I had to implement a lua script that parses packet captures.

If we want to go the full Snowflake route, here are some things to keep in mind:

@bassosimone bassosimone self-assigned this Feb 17, 2020
@bassosimone bassosimone added this to the Sprint 12 - Beluga milestone Apr 27, 2020
@bassosimone bassosimone added priority/high High priority and removed priority/low Low priority labels Apr 27, 2020
@bassosimone bassosimone removed this from the Sprint 12 - Beluga milestone Apr 27, 2020
@bassosimone bassosimone added this to the Sprint 15 - Globster milestone Jun 8, 2020
@bassosimone
Copy link
Member

@NullHypothesis we're going to add the stun experiment to the tests we run in the circumvention group. Any other endpoint to check apart from stun.l.google.com:19302?

See ooni/probe#1185

@bassosimone bassosimone removed this from the Sprint 15 - Globster milestone Jun 8, 2020
@cohosh
Copy link

cohosh commented Jun 8, 2020

We're going to want to add more STUN endpoints later. How difficult will that be to do?

@bassosimone
Copy link
Member

@cohosh we will probably need to add a call to our probe-services to fetch the list. Especially if the list is static and changes slowly, I think it's not a concern to do this now or when needed.

@cohosh
Copy link

cohosh commented Jun 8, 2020

Okay great. The google endpoint will work for now. And the list will indeed be mostly static and change slowly since we have to ship the defaults with Tor Browser :)

@bassosimone
Copy link
Member

Great, thank you!

@bassosimone bassosimone removed the effort/L Large effort label Jun 11, 2020
@bassosimone bassosimone added this to the Sprint 15 - Globster milestone Jun 11, 2020
@bassosimone
Copy link
Member

Removed effort, since this is done. Added to Sprint 15 so we ensure we close this.

@bassosimone
Copy link
Member

Shift to a subsequent sprint. We are mostly done but probably we won't release this in this Sprint because we also need to have specific UI done in the mobile and desktop apps.

@bassosimone
Copy link
Member

The experiment has been implementing. We're tracking how we're landing the experiment to the probes in the following epic issue: ooni/probe#1202.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new experiment Implementation of a new experiment ooni/probe-engine Issues related to github.com/ooni/probe-engine priority/high High priority
Projects
No open projects
OONI-Verse
  
Icebox
Development

No branches or pull requests

5 participants