15 Commits

Author SHA1 Message Date
Micah Lee
16f76be210 Treat censorship API returning None for bridge settings the same as if it doesn't return bridge settings (#1588) 2022-05-30 14:26:46 -07:00
Micah Lee
ecc4bfcef8 Merge branch 'censorship_default_route' of https://github.com/mig5/onionshare into mig5-censorship_default_route 2022-03-28 19:23:45 -07:00
Miguel Jacq
293dfffd3f Support for Censorship Circumvention API's /default route.
Fall back to trying Censorship API's /default route if no other bridges found.

At time of writing, this returns a couple of built-in obfs4 bridges.

If even that request fails, we will still fall back to our own full list of
obfs4 bridges.
2022-03-28 12:31:07 +11:00
Miguel Jacq
f455cedefe More verbose and consistent Meek exception logging 2022-03-22 14:29:02 +11:00
Micah Lee
2da1174408 Merge branch 'develop' into censorship 2022-02-13 11:28:16 -08:00
Micah Lee
ba1fde54a9 Update copyright year to 2022 2022-01-16 16:15:49 -08:00
Miguel Jacq
0190f1f3be Add a CensorshipCircumventionError class that is raised if there's a requests exception connecting to the Tor API 2021-12-20 14:50:09 +11:00
Miguel Jacq
890c24b0b3 Need to reconnect to Tor with the curr_settings Settings object after obtaining new bridges 2021-12-14 14:57:01 +11:00
Miguel Jacq
5c8ddc1735 Fix the saving of bridges received from CensorshipCircumvention API - need to also save the bridges_enabled setting else TorSettingsTab doesn't show them 2021-12-14 14:32:00 +11:00
Miguel Jacq
57b60d5114 Use the CensorshipCircumvention methods to fetch bridges for the country/autodetection 2021-12-14 10:48:47 +11:00
Micah Lee
33e0b549a8 Merge branch 'censorship_automatically_attempt_and_reconnect' of https://github.com/mig5/onionshare into mig5-censorship_automatically_attempt_and_reconnect 2021-12-04 20:40:58 -08:00
Miguel Jacq
d688f63dba Make the saving of the automatically-obtained bridges reusable (move it to CensorshipCircumvention class). Add the same functionality used in TorConnectionWidget to TorConnectionDialog. 2021-11-30 10:50:47 +11:00
Miguel Jacq
89d44d8dd7 Move the ability to use Tor vs Meek into the CensorshipCircumvention class so that we can use those endpoints over Tor elsewhere later 2021-11-27 10:35:25 +11:00
Miguel Jacq
a0c386123f Refactor to CensorshipCircumvention and Meek classes. Use Meek domain fronting when requesting bridges in frontend 2021-10-19 11:36:03 +11:00
Miguel Jacq
8a19d8088e Move Censorship stuff into its own class. Early attempt at subprocessing out to meek (unfinished) 2021-10-18 17:17:47 +11:00