Opened 4 years ago

Last modified 10 hours ago

#15035 new task

URI format for bridges

Reported by: eighthave Owned by: n8fr8
Priority: Medium Milestone:
Component: Applications/Orbot Version:
Severity: Normal Keywords: uri, url, bridge
Cc: brade, mcs, hans@… Actual Points:
Parent ID: #28015 Points:
Reviewer: Sponsor:

Description (last modified by n8fr8)

Right now, according to @n8fr8, this is the URI format for the bridge URIs:


There is a problem with this format because it doesn't follow the URI RFC so that standard URI parsers won't parse it very well. Adding the // after bridge: makes it a "hierarchical" URI, which means that it has the standard sections of authority, user info, host, port, path, query, and fragment. But the above URI will just stick all of the text in the "authority" part, but that section can't be broken down into the standard parts of the "authority", i.e. user info, host, and port.

To keep the same data format, then this URI should be an "opaque" URI. That just means removing the //. So that makes it like a mailto: URI.

Otherwise, the data could be refactored to fit into the standard parts for a hierarchical URI, then standard URI parsing classes will be able to parse it. For example,,, etc. That would make the URI look something like this:


  • getScheme() would be bridge type
  • getAuthority() would be IP and port number
  • getHost() would be IP
  • getPort() would be port number
  • getPath() would be this thing: 95151988dc29fccb4f610a1c700a1ddf7d5ffbd4
  • then cert=, iat-mode=, etc. would be in the query string

The downside of this approach is that there could only be a single bridge per URI, but maybe that's not so bad.

Child Tickets

Change History (10)

comment:1 Changed 4 years ago by n8fr8

Description: modified (diff)

comment:2 Changed 4 years ago by n8fr8

Description: modified (diff)

comment:3 Changed 4 years ago by n8fr8

Description: modified (diff)

comment:4 Changed 4 years ago by eighthave

FYI, submitted a pull request to K-9 Mail to make it linkify bridge: links if Orbot supports them:

Other URI schemes are also possible to add.

Last edited 4 years ago by eighthave (previous) (diff)

comment:5 Changed 15 months ago by teor

Severity: Normal

Set all open tickets without a severity to "Normal"

comment:6 Changed 7 months ago by eighthave

After a couple of years of working with URLs for sending info around in Zom, F-Droid, etc. I think should revisit the original ideas of these bridge URIs.

To make the URI clickable in as many places as possible, it must be a http:// or https:// URI. @n8fr8 & Co did nice work for for a URI format. I think its a good example for what bridge URIs should be. For bridges, we could use something like

Maybe it still makes sense to define two URI formats:

  • https:// for sending via messages, etc. so they are clickable
  • bridge:foo for cases where the software handling them knows what it is handling, e.g. QR code read by a scanner built into a tor-enabled browser

Then the concern there is the person distributing the URI needs to know which one is the most appropriate.

comment:8 Changed 4 weeks ago by gaba

Parent ID: #28015

comment:9 Changed 4 weeks ago by mcs

Cc: brade mcs added

comment:10 Changed 10 hours ago by eighthave

Cc: hans@… added
Note: See TracTickets for help on using tickets.