Opened 8 years ago

Closed 7 years ago

#5851 closed enhancement (fixed)

Make BridgeDB's output compatible with both Vidalia & TorLauncher

Reported by: runa Owned by: isis
Priority: High Milestone:
Component: Circumvention/BridgeDB Version:
Severity: Keywords: bridgedb-email, bridgedb-dist, bridgedb-ui
Cc: aagbsn, chiiph, isis Actual Points:
Parent ID: #9156 Points:
Reviewer: Sponsor:


A user reports that the text on is confusing for blind users, and users with slow connections / users who block images.

On, blind users will be hearing a couple of references in their screen-readers to bridge entries and bridge addresses:

  • As an example, you'll get a bridge entry that looks like the following: bridge 141.[etc.]
  • Here are your bridge relays: bridge 60.[etc.]

On bridges.html.en, we have an image illustrating how to add a bridge to Vidalia:

  • Add each bridge address one at a time in the Vidalia Network settings page, by pasting it into the 'Add a Bridge' window and then clicking the '+' sign. Adding a bridge is pictured below:

... but users will not see the picture and will not know whether to include bridge or not.

Updating bridges.html.en is easy to do, but can we please do something about bridges.tpo as well? Is there a good reason for printing the bridge lines with the word bridge in front of each one?

Child Tickets

Change History (9)

comment:1 Changed 8 years ago by aagbsn

I can remove the substring 'bridge' easily. I don't recall any good reason why this shouldn't be done.

Note that this would change the entries written to bridgedb's logfile.

diff --git a/lib/bridgedb/ b/lib/bridgedb/
index 358e362..736cdbd 100644
--- a/lib/bridgedb/
+++ b/lib/bridgedb/
@@ -138,9 +138,9 @@ class Bridge:
     def getConfigLine(self,includeFingerprint=False):
         """Return a line describing this bridge for inclusion in a torrc."""
         if includeFingerprint:
-            return "bridge %s:%d %s" % (self.ip, self.orport, self.fingerprint)
+            return "%s:%d %s" % (self.ip, self.orport, self.fingerprint)
-            return "bridge %s:%d" % (self.ip, self.orport)
+            return "%s:%d" % (self.ip, self.orport)
     def assertOK(self):
         assert is_valid_ip(self.ip)
diff --git a/lib/bridgedb/ b/lib/bridgedb/
index 8ef6fc0..b35b4be 100644
--- a/lib/bridgedb/
+++ b/lib/bridgedb/
@@ -329,6 +329,7 @@ def startup(cfg):
   "Here are all known bridges in the category section:")
             for r in ipDistributor.categoryRings:
                 for name, b in r.bridges.items():
+                    #XXX #5841: removal of 'bridge' substring changes the log output
           "%s" % b.getConfigLine(True))
         # Dump bridge pool assignments to disk.

comment:2 Changed 8 years ago by aagbsn

Cc: aagbsn added

comment:3 Changed 8 years ago by aagbsn

svn diff bridges.wml 
Index: bridges.wml
--- bridges.wml	(revision 25659)
+++ bridges.wml	(working copy)
@@ -79,7 +79,7 @@
-    bridge 4352e58420e68f5e40bf7c74faddccd9d1349413
+ 4352e58420e68f5e40bf7c74faddccd9d1349413
@@ -131,9 +131,9 @@
     Here are your bridge relays:
-     bridge
-     bridge
-     bridge

comment:4 Changed 8 years ago by aagbsn

nickm points out that the 'bridge ' prefix is added so that BridgeDB's response can be pasted into the torrc.

perhaps Vidalia should learn to deal with any 'bridge ' prefix pasted into it?

comment:5 Changed 8 years ago by aagbsn

Cc: chiiph added

Maybe something like this would work?

diff --git a/src/vidalia/config/NetworkPage.cpp b/src/vidalia/config/NetworkPage.cpp
index 7d16fbd..f7132a2 100644
--- a/src/vidalia/config/NetworkPage.cpp
+++ b/src/vidalia/config/NetworkPage.cpp
@@ -117,6 +117,10 @@ NetworkPage::addBridge()
   if (input.isEmpty())
+  /* #5851, allow pasting of complete 'bridge' lines from BridgeDB */
+  if input.startsWith("bridge ") {
+    input = input.rightRef(8);
+  }
   if (!ui.listBridges->findItems(input, Qt::MatchFixedString).isEmpty())
     return; /* duplicate bridge */

comment:6 Changed 7 years ago by isis

Cc: isis@… added
Keywords: bridgedb-email bridgedb-dist bridgedb-ui added
Owner: set to isis
Parent ID: #9156
Status: newassigned
Summary: Improve and bridges.html.en for blind usersMake BridgeDB's output compatible with both Vidalia & TorLauncher

Hey, neat. I'm not familiar with Vidalia's source, but if the above patch works, it would allow both TBB-2.x with Vidalia and TBB-3.x with TorLauncher to accept lines regardless of the bridge prefix.

Because the interface of BridgeDB was revised, and this ticket contains valuable information about other programs parsing BridgeDB's output, I am changing the title and setting as a child of #9156.

comment:7 Changed 7 years ago by isis

Priority: normalmajor

comment:8 Changed 7 years ago by isis

Cc: isis added; isis@… removed
Status: assignedneeds_revision

mttp tested inputting the following bridge lines into Vidalia with a PT TBB bundle: AC19189ADFAEA697CB7C02AC141CC60997922B6F
obfs2 AC19189ADFAEA697CB7C02AC141CC60997922B6F
obfs3 AC19189ADFAEA697CB7C02AC141CC60997922B6F
scramblesuit keyid=AC19189ADFAEA697CB7C02AC141CC60997922B6F,password=93edd2b39b06115b38778e5447be6171d34cf63cc0e083db91fca9ce7fe920fa
scramblesuit AC19189ADFAEA697CB7C02AC141CC60997922B6F password=93edd2b39b06115b38778e5447be6171d34cf63cc0e083db91fca9ce7fe920fa
scramblesuit password=93edd2b39b06115b38778e5447be6171d34cf63cc0e083db91fca9ce7fe920fa

None worked. The first line worked when the fingerprint was removed, meaning that Vidalia won't handle fingerprints, in addition to not handling the "bridge " prefix.

This means that if #9499 is fixed, it also breaks Vidalia.

We can either try to also fix this in Vidalia, or else make a page which explains that "If you're using Vidalia, you should only copy+paste the ip:port pair into Vidalia. You're also may be subject to MITM attacks, and you should upgrade your TBB to a 3.x version ASAP."

comment:9 Changed 7 years ago by isis

Resolution: fixed
Status: needs_revisionclosed

Since TBB-3.5 is about to be released, Vidalia will be deprecated. I think we should no longer try to support both Vidalia and TorLauncher simultaneously; we should only support up-to-date TBBs and tell users running Vidalia to switch.

Open question, likely for a new ticket if anyone cares: Will this cause trouble for TAILS users? Since TorLauncher can handle bridge lines regardless of whether or not they are prefixed with "bridge ", we can still leave them out as we are currently. (Or add them back in, if somehow that makes it easier for TAILS users.)

For the record:

  • The "bridge " prefix was removed from regular bridge lines in commit 792cfd99bb3a4
  • The "bridge " prefix was removed from PT lines in commit 20d6171844d
  • Three failing unittests from the old tests in lib/bridgebd/ were failing due to these changes, and these unittests were fixed in commit 514e93753dd3

I am closing this ticket, for the following reasons:

  • We are about to no longer support Vidalia and TBB-2.x
  • We are about to deprecate Vidalia entirely
  • Vidalia doesn't handle bridge fingerprints correctly (see #9499)
  • Vidalia doesn't handle PTs correctly
  • Vidalia doesn't handle PT shared secrets correctly
Note: See TracTickets for help on using tickets.