thaliproject / Tor_Onion_Proxy_Library

Provides a JAR and an AAR for embedding the Tor Onion Proxy into a Java or Android Program
Apache License 2.0
179 stars 98 forks source link

BridgesList Preferences is an overloaded field #133

Open sisbell opened 4 years ago

sisbell commented 4 years ago

BridgesList is an overloaded field, which can cause some confusion. The list can be:

a filter like obfs4 or meek OR  
can be a custom bridge 

For (1), we just pass back all bridges, the filter will occur elsewhere in the library. For (2) we return the bridge list as a raw stream. If length is greater than 5, then we know this is a custom bridge

We should fix this so that we have separate preferences for 1 and 2. We also shouldn't be looking at string length to determine field type.

This tracks with https://trac.torproject.org/projects/tor/ticket/30501