Package org.briarproject.onionwrapper
Interface CircumventionProvider
-
@ThreadSafe @NotNullByDefault public interface CircumventionProvider
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classCircumventionProvider.BridgeType
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String[]BLOCKEDCountries where Tor is blocked, i.e.static java.lang.String[]BRIDGESCountries where bridge connections are likely to work.static java.lang.String[]DEFAULT_BRIDGESCountries where default obfs4 or vanilla bridges are likely to work.static java.lang.String[]DPI_BRIDGESCountries where vanilla bridges are blocked via DPI but non-default obfs4 bridges, meek and snowflake may work.static java.lang.String[]NON_DEFAULT_BRIDGESCountries where non-default obfs4 or vanilla bridges are likely to work.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleandoBridgesWork(java.lang.String countryCode)Returns true if bridge connections of some type work in the given country.java.util.List<java.lang.String>getBridges(CircumventionProvider.BridgeType type, java.lang.String countryCode, boolean letsEncrypt)java.util.List<CircumventionProvider.BridgeType>getSuitableBridgeTypes(java.lang.String countryCode)Returns the types of bridge connection that are suitable for the given country, orDEFAULT_BRIDGESif no bridge type is known to work.booleanisTorProbablyBlocked(java.lang.String countryCode)Returns true if vanilla Tor connections are blocked in the given country.
-
-
-
Field Detail
-
BLOCKED
static final java.lang.String[] BLOCKED
Countries where Tor is blocked, i.e. vanilla Tor connection won't work.See https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 and https://trac.torproject.org/projects/tor/wiki/doc/OONI/censorshipwiki
-
BRIDGES
static final java.lang.String[] BRIDGES
Countries where bridge connections are likely to work. Should be a subset ofBLOCKEDand the union ofDEFAULT_BRIDGES,NON_DEFAULT_BRIDGESandDPI_BRIDGES.
-
DEFAULT_BRIDGES
static final java.lang.String[] DEFAULT_BRIDGES
Countries where default obfs4 or vanilla bridges are likely to work. Should be a subset ofBRIDGES.
-
NON_DEFAULT_BRIDGES
static final java.lang.String[] NON_DEFAULT_BRIDGES
Countries where non-default obfs4 or vanilla bridges are likely to work. Should be a subset ofBRIDGES.
-
DPI_BRIDGES
static final java.lang.String[] DPI_BRIDGES
Countries where vanilla bridges are blocked via DPI but non-default obfs4 bridges, meek and snowflake may work. Should be a subset ofBRIDGES.
-
-
Method Detail
-
isTorProbablyBlocked
boolean isTorProbablyBlocked(java.lang.String countryCode)
Returns true if vanilla Tor connections are blocked in the given country.
-
doBridgesWork
boolean doBridgesWork(java.lang.String countryCode)
Returns true if bridge connections of some type work in the given country.
-
getSuitableBridgeTypes
java.util.List<CircumventionProvider.BridgeType> getSuitableBridgeTypes(java.lang.String countryCode)
Returns the types of bridge connection that are suitable for the given country, orDEFAULT_BRIDGESif no bridge type is known to work.
-
getBridges
java.util.List<java.lang.String> getBridges(CircumventionProvider.BridgeType type, java.lang.String countryCode, boolean letsEncrypt)
-
-