guardianproject / AndroidPluggableTransports

Android Pluggable Transports (aka PLUTO2)
https://www.pluggabletransports.info/
Other
28 stars 15 forks source link

Bridge URL parsing #15

Closed eighthave closed 5 years ago

eighthave commented 5 years ago

This is the first stab at making standardized URL formats for configuring bridges across the whole Tor ecosystem. This is a one-bridge-per-URL format. There is test data for the current Orbot bridge:// URL format that allows multiple bridges per URL, but the parsing isn't yet implemented here.

For more info:

eighthave commented 5 years ago

@uniqx could you add receiving these URLs to the APT prototypes? There just needs to be a simple IntentFilter per format in the AndroidManifest.xml, e.g.:

      <activity android:name=".MainActivity">
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />

                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />

                <data android:scheme="bridge" />
            </intent-filter>
            <intent-filter>
                <action android:name="android.intent.action.VIEW"/>

                <category android:name="android.intent.category.DEFAULT"/>
                <category android:name="android.intent.category.BROWSABLE"/>

                <data android:scheme="http"/>
                <data android:host="bridge.onion"/>
            </intent-filter>
            <intent-filter>
                <action android:name="android.intent.action.VIEW"/>

                <category android:name="android.intent.category.DEFAULT"/>
                <category android:name="android.intent.category.BROWSABLE"/>

                <data android:scheme="https"/>
                <data android:host="bridges.torproject.org"/>
            </intent-filter>
      </activity>