Interface CircumventionProvider


@ThreadSafe @NotNullByDefault public interface CircumventionProvider
  • Field Details

    • BLOCKED

      static final 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 String[] BRIDGES
      Countries where bridge connections are likely to work. Should be a subset of BLOCKED and the union of DEFAULT_BRIDGES, NON_DEFAULT_BRIDGES and DPI_BRIDGES.
    • DEFAULT_BRIDGES

      static final String[] DEFAULT_BRIDGES
      Countries where default obfs4 or vanilla bridges are likely to work. Should be a subset of BRIDGES.
    • NON_DEFAULT_BRIDGES

      static final String[] NON_DEFAULT_BRIDGES
      Countries where non-default obfs4 or vanilla bridges are likely to work. Should be a subset of BRIDGES.
    • DPI_BRIDGES

      static final 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 of BRIDGES.
  • Method Details

    • isTorProbablyBlocked

      boolean isTorProbablyBlocked(String countryCode)
      Returns true if vanilla Tor connections are blocked in the given country.
    • doBridgesWork

      boolean doBridgesWork(String countryCode)
      Returns true if bridge connections of some type work in the given country.
    • getSuitableBridgeTypes

      List<CircumventionProvider.BridgeType> getSuitableBridgeTypes(String countryCode)
      Returns the types of bridge connection that are suitable for the given country, or DEFAULT_BRIDGES if no bridge type is known to work.
    • getBridges

      List<String> getBridges(CircumventionProvider.BridgeType type, String countryCode, boolean letsEncrypt)