347 Commits

Author SHA1 Message Date
Micah Lee
c74c23d658 Enable websocket logs in verbose mode 2021-12-21 15:01:35 -08:00
Micah Lee
5f17b47d1a Fix permission denied error in Windows, which was introduced using tempfile.NamedTemporaryFile, by using a TemporaryDirectory instead 2021-12-21 14:28:23 -08:00
Micah Lee
008426e67f Fix finding tor binary paths in Windows 2021-12-21 14:15:52 -08:00
Micah Lee
96a6159057 Update python dependencies 2021-12-21 14:15:20 -08:00
Micah Lee
7cf64c9db8 Merge pull request #1489 from mig5/meek_stdout_cleanup_fix
Don't enqueue stdout from Meek subprocess in a Thread
2021-12-20 12:13:21 -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
e00db31de5 Force the MIME type for .js files to be text/javascript, to override silly OS databases/registries with incorrect settings, which Flask would otherwise depend on 2021-12-17 17:53:15 +11:00
Miguel Jacq
8082437d33 Don't enqueue stdout from Meek subprocess in a Thread, just read it as it comes. Solves infinite loop queue read issue on cleanup() 2021-12-15 18:28:55 +11:00
Miguel Jacq
42b8c8a464 Tweaks to CensorshipCircumvention and also Meek cleanup fixes that were causing a crazy read loop on the stdout queue 2021-12-15 18:22:18 +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
5b0093cc54 Merge branch 'censorship' into 1422_autodetect_location 2021-12-12 10:27:01 -08:00
Miguel Jacq
9d63d0ee9b Update our bridge templates with the latest built-in bridges in the get-tor scripts 2021-12-10 16:48:39 +11:00
Micah Lee
95a82c62dc Make automatic detection flip through country names while it's running meek 2021-12-06 20:54:03 -08:00
Micah Lee
d512ce5743 Merge branch 'mig5-censorship_automatically_attempt_and_reconnect' into 1422_autodetect_location 2021-12-06 20:11:41 -08:00
Micah Lee
01d44fd10f Add country dropdown 2021-12-06 20:01:28 -08:00
Micah Lee
a7c54a64e7 Oops, default connect_timeout should still be 120s 2021-12-06 19:42:43 -08:00
Micah Lee
20dd579e59 Start making UseBridgeWidget, and add json files that list country names for each enabled locale 2021-12-06 19:39:44 -08: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
Micah Lee
16c6a9f89d Merge branch 'develop' of https://github.com/a1346054/onionshare into a1346054-develop 2021-12-04 20:34:07 -08:00
Micah Lee
e4aad471e5 Merge pull request #1432 from nyxnor/cli-shell-instructions
POSIX compliant input path on any shell
2021-12-04 20:31:25 -08:00
Micah Lee
16e7aa2755 Merge pull request #1478 from mig5/fetch-builtin-bridges
Fetch the built-in bridges from Tor's Censorship Circumvention API, rather than hardcode them
2021-12-04 20:28:04 -08:00
Saptak S
03890f6e5e Fixes CLI tests 2021-12-03 20:03:22 +05:30
Micah Lee
167f4a8cc1 Add temp file to cleanup list just once when its first created 2021-12-02 18:51:06 -08:00
Micah Lee
6c72e9e7a5 Fix CLI tests 2021-12-01 21:01:32 -08:00
Micah Lee
5322d4f037 Merge branch 'develop' into 1470_tempfiles 2021-12-01 20:37:45 -08:00
Micah Lee
2ff5f53c69 Explicitly cleanup temp files and dirs 2021-12-01 20:34:54 -08:00
Micah Lee
926359de3c Use NamedTemporaryFile instead of TemporaryFile, to fix crash when sharing one file 2021-12-01 20:10:51 -08:00
Miguel Jacq
2040555134 Fix conflicts 2021-11-30 10:54:17 +11: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
dc717cad30 Make sanity checking of bridges a reusable component in cli.Common, so we can reuse it for automatic bridge fetching in censorship circumvention 2021-11-30 10:01:14 +11:00
Saptak S
4df863ce4d Checks if username is ASCII string else throw an error 2021-11-30 01:19:29 +05:30
Miguel Jacq
2d78d80b3b remove import of requests module in Onion 2021-11-27 11:14:05 +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
57bec79c61 Built-in bridge refactoring.
Store the built-in bridges in OnionShare settings as a dict, and try writing those into the torrc if present.

If they aren't present in OnionShare settings, use the hardcoded templates instead.

Fetch the latest built-in bridges over Tor, once connected to Tor.

If we can't fetch the bridges over Tor, fall back to Meek (domain-fronting) and try again.

Then write those as the dict to the OnionShare settings, to take precedence next time.
2021-11-24 17:55:47 +11:00
Micah Lee
aa72b7e65a Support sending a custom Content-Security-Policy header in Website mode 2021-11-23 18:44:14 -08:00
Miguel Jacq
b6a81355da Raise exception if the API didn't return bridges for a specific bridge type, or if the bridge type wasn't recognized 2021-11-23 15:36:41 +11:00
Miguel Jacq
80276fce8d Fetch the built-in bridges from Tor's Censorship Circumvention API, rather than hardcode them 2021-11-23 15:28:40 +11:00
Saptak S
b20e3991cc Merge branch 'censorship' of github.com:onionshare/onionshare into auto-connect-ui 2021-11-19 18:29:47 +05:30
Saptak S
b525a190e9 Removes invisible whitespace characters from username in chat 2021-11-19 15:25:10 +05:30
Micah Lee
c80303df35 Use a NamedTemporaryFile instead of TemporaryFile for streamed gzip files 2021-11-18 20:17:39 -08:00
Micah Lee
6d9dc33b9e Merge pull request #1447 from tladesignz/develop
Fixed send.js table sorting.
2021-11-18 20:14:14 -08:00
Micah Lee
9663f78147 Use high level tempfile classes that clean up after themselves 2021-11-18 20:03:18 -08:00
Micah Lee
c29ffdf9fa Merge branch 'advisory-fix-1' of github.com:onionshare/onionshare-ghsa-jh82-c5jw-pxpc into ros-fixes 2021-11-18 19:16:00 -08:00
Micah Lee
3641f829ff Merge branch 'chat-session-handling' of github.com:onionshare/onionshare-ghsa-gjj5-998g-v36v into ros-fixes 2021-11-18 19:15:24 -08:00
Micah Lee
d71db90ce9 Merge branch 'advisory-fix-1' of github.com:onionshare/onionshare-ghsa-h29c-wcm8-883h into ros-fixes 2021-11-18 19:13:41 -08:00
Micah Lee
707f98a1c9 Fix comment 2021-11-16 18:10:25 -08:00
Micah Lee
516c0f2484 Exception handling on printing the banner 2021-11-15 18:16:10 -08:00
Micah Lee
aecb7bef93 Fix for meek to working in snapcraft 2021-11-15 18:07:57 -08:00