Interface CircumventionProvider


  • @ThreadSafe
    @NotNullByDefault
    public interface CircumventionProvider
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String[] BLOCKED
      Countries where Tor is blocked, i.e.
      static java.lang.String[] BRIDGES
      Countries where bridge connections are likely to work.
      static java.lang.String[] DEFAULT_BRIDGES
      Countries where default obfs4 or vanilla bridges are likely to work.
      static java.lang.String[] DPI_BRIDGES
      Countries where vanilla bridges are blocked via DPI but non-default obfs4 bridges, meek and snowflake may work.
      static java.lang.String[] NON_DEFAULT_BRIDGES
      Countries where non-default obfs4 or vanilla bridges are likely to work.
    • 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

      • DEFAULT_BRIDGES

        static final java.lang.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 java.lang.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 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 of BRIDGES.
    • 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, or DEFAULT_BRIDGES if no bridge type is known to work.