[tor-bugs] #11345 [BridgeDB]: BridgeDB should have QR codes for bridge lines
Tor Bug Tracker & Wiki
blackhole at torproject.org
Thu Jan 22 23:42:54 UTC 2015
#11345: BridgeDB should have QR codes for bridge lines
-----------------------------+-----------------------------------------
Reporter: isis | Owner: isis
Type: enhancement | Status: needs_review
Priority: minor | Milestone:
Component: BridgeDB | Version:
Resolution: | Keywords: bridgedb-ui, bridgedb-https
Actual Points: | Parent ID:
Points: |
-----------------------------+-----------------------------------------
Changes (by isis):
* status: needs_information => needs_review
Comment:
So… here is what the new BridgeDB API for this currently looks like, after
you've clicked a little `Show QRCode` button (if you have JS enabled):
[[Image(https://trac.torproject.org/projects/tor/attachment/ticket/11345/2015-01-22-230207_1205x695_scrot.png)]]
(It's prettier with JS enabled, as you get the little popuppish modal
thing. If JS is disabled, it's still functional, of course, you just get a
`data:` URI which just shows the QR code. No screenshot for that one.)
This is what is looks like before clicking the button:
[[Image(https://trac.torproject.org/projects/tor/raw-
attachment/ticket/11345/2015-01-22-230138_1223x698_scrot.png)]]
--------
Problems:
I looked at Orbot's code, and it seems like, for some reason, it's not
registering the `intent.ACTION_VIEW` mentioned on L590 of `Orbot.java` in
the current `master` branch (`09bdd8fd29a7c4086f9f95ab214e0bc77166a6f7`):
{{{
else if (action.equals(Intent.ACTION_VIEW))
{
String urlString = intent.getDataString();
if (urlString != null)
{
if (urlString.toLowerCase().startsWith("bridge://"))
{
String newBridgeValue = urlString.substring(9);
//remove the bridge protocol piece
newBridgeValue = URLDecoder.decode(newBridgeValue);
//decode the value here
showAlert("Bridges Updated","Restart Orbot to use this
bridge: " + newBridgeValue,false);
}}}
So Problem !#1 is that the above code doesn't work for some reason. I had
three friends with Android devices (though I believe they all had the same
QRCode reader app) test the above QRCode, and Orbot never picked up on the
`intent`.
FWIW, the QRCode above contains the following:
{{{
'bridge%3A//scramblesuit%20135.229.149.58%3A29461%20a93fb6cf0709b8e732f300ff237f8cd51e5b6a7f%20password%3DABCDEFGHIJKLMNOPQRSTUVWXYZ234567%0Abridge%3A//scramblesuit%2059.126.7.235%3A59153%20eedc85ac9c946f1fda61bc9d99ee6f8a39df4fb9%20password%3DABCDEFGHIJKLMNOPQRSTUVWXYZ234567%0Abridge%3A//scramblesuit%20112.196.251.191%3A47029%20ae6d596901e49324317d48b21dfbc51cb7b4bd40%20password%3DABCDEFGHIJKLMNOPQRSTUVWXYZ234567
}}}
which is just
{{{
bridge://scramblesuit 135.229.149.58:29461
a93fb6cf0709b8e732f300ff237f8cd51e5b6a7f
password=ABCDEFGHIJKLMNOPQRSTUVWXYZ234567
bridge://scramblesuit 59.126.7.235:59153
eedc85ac9c946f1fda61bc9d99ee6f8a39df4fb9
password=ABCDEFGHIJKLMNOPQRSTUVWXYZ234567
bridge://scramblesuit 112.196.251.191:47029
ae6d596901e49324317d48b21dfbc51cb7b4bd40
password=ABCDEFGHIJKLMNOPQRSTUVWXYZ234567
}}}
in URL-encoded form.
The other thing I tried was to just encode the plain bridge lines into a
QRCode (i.e. without the `'bridge://'` scheme), and ask them to copy+paste
it. This worked, but was obviously very painful because it took like 10
rather complicated UI steps (and is probably different for each QRCode
app).
Another problem is that I'm not sure how Orbot intends to receive multiple
bridge lines, because the above code doesn't handle that case.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/11345#comment:8>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list