Use onbasca at bridge authority/bridgedb/rdsys
We could perform sbws-style measurement of bridges that bridgedb hands out. Here's a rough sketch of the idea:
Basically, the idea is to take the set of bridges at the bridge authority/bridgedb/rdsys, and perform sbws stream measurements on all of them, from a measurement authority. Stream bandwidths and ratios would be computed as normal, but instead of creating a consensus weight, the ratio would be used as a decision point for bridgedb to stop handing out the bridge. If the ratio is below 1.0 (as a tunable parameter -- we may want to use 0.75 or sth lower), then this means that that bridge is slower than average in terms of stream capacity, and likely overloaded or too slow to be handed out.
To do this, not only does onbasca need to know how to parse the bridge set from the bridge auth (or bridgedb/rdsys), it also needs to provide a document to the bridge authority/bridgedb/rdsys that tells it which bridges to stop handing out.
I believe for this, onbasca may need to support using obfs4 to connect to these bridges. I don't think obfs4 bridges allow their orport to be used as normal bridges, but I could be wrong.
Creating this ticket to track investigation and estimations. This may be quite the endeavor. It may also be the case that not enough people use obfs4 for this to be worthwhile, and we should focus load balancing work only on snowflake.
Cc: @meskio
Update: using this same ticket for the implementation and track its status:
-
Implement the HTTP endpoint to receive the bridges to measure -
Receive a bridgeline via POST request -
Reply with status code and json {fingerprint, valid} based on the data the scanner already have -
Receive several bridgelines in the same request? [ ] Reply with other format or with the ratio instead of a boolean?
-
-
Implement getting and parsing the bridges from the endpoint -
Parse a single bridgeline from the POST request
-
-
Implement getting middle relays with some constrains greater bandwidth than the bridge-
select middle (and exits?) relays with FAST flag -
select middle (and exits?) relays with double bandwidth than the bridge or other flags?STABLE flag, contact and uptime (greater than 30 days?)
-
-
Implement building 3 hops circuit -
Adapt calculating ratios for relays -
Implement creating the output -
HTTPS? -
Tests -
Implement basic unit tests for the models and the view (HTTP endpoint) -
Fix them, currently not passing
-
-
Add more unit tests (eg. to test the calculated ratio)? -
Add integration test?
-
-
Easy deployment [X] Debian packages are probably not needed at this stage[X] Create docker images?-
Makefile or just documentation instructions
-
Documentation -
Add instructions on how to deploy it -
Add more docstrings?
-