Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • T tails
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 920
    • Issues 920
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 19
    • Merge requests 19
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • tails
  • tails
  • Issues
  • #18219
Closed
Open
Created Feb 24, 2021 by sajolida@sajolidaMaintainer

QR code scanning of emails from bridges@torproject.org

Getting bridges by email instead of Moat might be a valid option when Moat doesn't work for some reason. I'm not sure how possible it is for a censor to block Moat since it uses Meek in the backend.

Bridges over email can be very useful anyway until we have Moat.

Typing obfs4 bridges inside Tails is a nightmare as they are very long:

obfs4 107.161.172.100:8080 401E5912C821FBB913D2BD89368C246A241C0512 cert=avfemQzJey18ZvPrTjpE86PbZR2gsf0nJsC/HabjtKoLV4ip6RVR6FRGMQnnszsrhQm3RA iat-mode=0
obfs4 185.220.101.156:12346 26AE211EB6EF3D10D13436884029D1CC236F3582 cert=p9L6+25s8bnfkye1ZxFeAE4mAGY7DH4Gaj7dxngIIzP9BtqrHHwZXdjMK0RVIQ34C7aqZw iat-mode=0
obfs4 80.71.46.55:18462 05BFD8CE8C66BED061E4268A55D82C966DED051E cert=g6JJOZggoTukko23appohuA9jBNlahdaSBHb11xwGmtkNU4A4QOXO4Yup+Pd/UX91do/cg iat-mode=0

We could allow users to scan a QR code within Tails to copy bridges obtained by email on their phone for example.

Also, right now the captchas of Moat are not accessible: https://gitlab.torproject.org/tpo/anti-censorship/bridgedb/-/issues/10831.

I wonder whether scanning the QR might provide a viable alternative for blind people until then if it has good UX.

I managed to scan the (pretty big) QR code from bridges.torproject.org from my phone into Tails using zbarcam.

  • Possible improvements
    • Improve UX when no webcam is detected
    • UI to choose camera in Tor Connection
    • Integrate the webcam video in the Tor Connection window
    • Add bridgemoji

Possible improvements

Here's a list of possible improvements, on top of what's already implemented in !874. Currently they're not triaged as blockers/non-blockers.

Improve UX when no webcam is detected

When there's no webcam (/dev/video[0-9]), hide or disable the "Scan QR code" button (and perhaps display a message explaining why it's disabled, so for example the user can plug their webcam if it's external and not always plugged).

As for implementation cost: this means we now need to monitor /dev/video* (via udev or the filesystem) to hide/show (or disable/enable) such a button. The cost is not huge, but not so cheap either.

UI to choose camera in Tor Connection

  • Estimated usefulness: most people have a single webcam, or, if they have 2, anyone would be ok. However, there could be some corner case in which the first (video0) is not properly working, or has bad quality. We don't know how much this could be common.
  • To get a nice name we can display to the user, we can use udev: udevadm info /dev/video0 → ID_V4L_PRODUCT
  • Here as well, we have to monitor when webcams appear/disappear so not cheap.
  • The hard part is the UX design ⇒ postpone this until sajolida is back.

Integrate the webcam video in the Tor Connection window

  • Debian ships this as libzbargtk0

  • Once upon a time (Python 2, GTK 2), this had a Python bindings generated automatically, and packaged as python-zbargtk in Debian

  • @pierov wrote bindings in C, with a function to generate a widget, and a few other additional functions (get/set webcam device, enable/disable video capture, set the resolution for the widget)

    pierov's notes:

    • the C library is pretty standard GTK stuff: with some magic, we can convert the C struct to a Python GTK object, and then append it to other widgets generated in Python, add a signal to get the decoded text, etc etc

    • for the rest of the C function, I implemented some C wrappers: not very elegant, but they work

    • ideally, I should improve everything and then open a PR upstream

    • To build:

      1. install a few development packages (python3-dev, libzbargtk-dev, python-gi-dev)
      2. run python setup.py build
      3. copy build/lib.linux-x86_64-3.xx/zbargtk.cpython-3xx-x86_64-linux-gnu.so to /usr/lib/python3/dist-packages or wherever you prefer (/usr/local/...)
    • but first, where do I put the C file and build.py? → config/chroot_local-includes/usr/src/$NAME please, thanks! :)

Add bridgemoji

bridgemoji checksum of your bridge address encoded as 4 emojis.

Purpose: useful if you type your bridges manually, copying those from a Tor Browser running outside of Tails on another computer; except Tor Browser 11.5 can also display its bridges as a QR code, so there's less need for typing if I have a webcam (and !874 supports that QR code format too).

Edited Jun 30, 2022 by intrigeri
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking