From 06e9b3d3fc876a1e62500b0bbf443c401c34705d Mon Sep 17 00:00:00 2001 From: Micah Lee Date: Sun, 27 Mar 2022 12:44:41 -0700 Subject: Fix built-in bridge detection, and update built-in bridges. Also update README after setting up Windows dev environment --- .../resources/torrc_template-meek_lite_azure | 4 ++-- cli/onionshare_cli/resources/torrc_template-snowflake | 2 +- desktop/README.md | 10 +++++++++- desktop/scripts/bridges/__init__.py | 14 +++----------- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/cli/onionshare_cli/resources/torrc_template-meek_lite_azure b/cli/onionshare_cli/resources/torrc_template-meek_lite_azure index ff67f518..73ad5042 100644 --- a/cli/onionshare_cli/resources/torrc_template-meek_lite_azure +++ b/cli/onionshare_cli/resources/torrc_template-meek_lite_azure @@ -1,2 +1,2 @@ -# Enable built-in meek bridge -Bridge meek_lite 0.0.2.0:2 97700DFE9F483596DDA6264C4D7DF7641E1E39CE url=https://meek.azureedge.net/ front=ajax.aspnetcdn.com +# Enable built-in meek-azure bridge +Bridge meek_lite 192.0.2.2:2 97700DFE9F483596DDA6264C4D7DF7641E1E39CE url=https://meek.azureedge.net/ front=ajax.aspnetcdn.com diff --git a/cli/onionshare_cli/resources/torrc_template-snowflake b/cli/onionshare_cli/resources/torrc_template-snowflake index 06cb2734..158342a7 100644 --- a/cli/onionshare_cli/resources/torrc_template-snowflake +++ b/cli/onionshare_cli/resources/torrc_template-snowflake @@ -1,2 +1,2 @@ # Enable built-in snowflake bridge -Bridge snowflake 0.0.3.0:1 2B280B23E1107BB62ABFC40DDCC8824814F80A72 +Bridge snowflake 192.0.2.3:1 2B280B23E1107BB62ABFC40DDCC8824814F80A72 diff --git a/desktop/README.md b/desktop/README.md index 1578f956..af6a83f1 100644 --- a/desktop/README.md +++ b/desktop/README.md @@ -9,7 +9,7 @@ git clone https://github.com/onionshare/onionshare.git cd onionshare/desktop ``` -Make sure you have Python 3 installed. If you're using Windows or macOS, install version 3.9.9 [from python.org](https://www.python.org/downloads/release/python-399/). For Windows, make sure to install the 32-bit (x86) version, and to check the box to add python to the path on the first page of the installer. +Make sure you have Python 3 installed. If you're using Windows or macOS, install version 3.9.9 [from python.org](https://www.python.org/downloads/release/python-3912/). For Windows, make sure to install the 32-bit (x86) version, and to check the box to add python to the path on the first page of the installer. Make sure you have [poetry installed](https://python-poetry.org/docs/#installation), and then install the dependencies: @@ -17,6 +17,8 @@ Make sure you have [poetry installed](https://python-poetry.org/docs/#installati poetry install ``` +In Windows, you may need to install [Microsoft C++ Build Tools](https://visualstudio.microsoft.com/visual-cpp-build-tools/), making sure to check "Desktop development with C++", before `poetry install` will work properly. + ### Install platform-specific dependencies #### Linux @@ -59,6 +61,12 @@ Download and compile `meek-client`: ./scripts/build-meek-client.py ``` +Or in Windows: + +```powershell +python .\scripts\build-meek-client.py +``` + ### Running OnionShare from the source code tree To run OnionShare from the source tree: diff --git a/desktop/scripts/bridges/__init__.py b/desktop/scripts/bridges/__init__.py index e2495e38..f9d3c9a9 100644 --- a/desktop/scripts/bridges/__init__.py +++ b/desktop/scripts/bridges/__init__.py @@ -52,9 +52,9 @@ class UpdateTorBridges: ) return False - for bridge_type in ["meek", "obfs4", "snowflake"]: + for bridge_type in ["meek-azure", "obfs4", "snowflake"]: if result[bridge_type]: - if bridge_type == "meek": + if bridge_type == "meek-azure": torrc_template_extension = "meek_lite_azure" else: torrc_template_extension = bridge_type @@ -71,12 +71,4 @@ class UpdateTorBridges: # random order from the API each time, and create noisy git diff. bridges.sort(key=lambda s: s.split()[1]) for item in bridges: - if bridge_type == "meek": - # obfs4proxy expects the bridge type to be meek_lite, and the url/front params - # are missing in the Tor API response, so we have to add them in ourselves. - bridge = item.replace("meek", "meek_lite") - f.write( - f"Bridge {bridge} url=https://meek.azureedge.net/ front=ajax.aspnetcdn.com\n" - ) - else: - f.write(f"Bridge {item}\n") + f.write(f"Bridge {item}\n") -- cgit v1.2.3-54-g00ecf