onionshare/desktop/README.md

2.4 KiB

OnionShare Desktop

Building OnionShare

Start by getting the source code and changing to the desktop folder:

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 the latest version of 3.11 from python.org. For Windows, make sure to check the box to add python to the path on the first page of the installer.

Make sure you have poetry installed:

pip3 install poetry

And install the poetry dependencies:

poetry install

Windows users: You may need to install Microsoft C++ Build Tools, making sure to check "Desktop development with C++", before poetry install will work properly.

Get Tor

Linux users: In Ubuntu 20.04 you need the libxcb-xinerama0 package installed.

Windows users: Download and install 7-Zip from https://7-zip.org/download.html. Add C:\Program Files (x86)\7-Zip to your path.

Download Tor Browser and extract the binaries for your platform. The platform must be win32, win64, macos, or linux64.

poetry run python ./scripts/get-tor.py [platform]

Compile dependencies

Install Go. The simplest way to make sure everything works is to install Go by following these instructions.

Compile pluggable transports:

Windows users, in PowerShell:

.\scripts\build-pt-obfs4proxy.ps1
.\scripts\build-pt-snowflake.ps1
.\scripts\build-pt-meek.ps1

macOS and Linux users:

./scripts/build-pt-obfs4proxy.sh
./scripts/build-pt-snowflake.sh
./scripts/build-pt-meek.sh

Running OnionShare from the source code tree

To run OnionShare from the source tree:

poetry run onionshare
poetry run onionshare --help
poetry run onionshare -v
poetry run onionshare -v --local-only

You can also run onionshare-cli from the source tree, and it will look for Tor binaries in desktop/onionshare/resources/tor.

poetry run onionshare-cli --help

Running tests

Run the tests:

poetry run ./tests/run.sh

If you want to run tests while hiding the GUI, you must have the xvfb package installed, and then:

xvfb-run poetry run ./tests/run.sh