diff --git a/BUILD.md b/BUILD.md
index ebb33df7..05122859 100644
--- a/BUILD.md
+++ b/BUILD.md
@@ -11,10 +11,23 @@ cd onionshare
*For .deb-based distros (like Debian, Ubuntu, Linux Mint):*
-Note that python3-stem appears in Debian wheezy and newer, and it appears in Ubuntu 13.10 and newer. Older versions of Debian and Ubuntu aren't supported.
+Then install the needed dependencies:
```sh
-sudo apt-get install -y build-essential fakeroot python3-all python3-stdeb python3-flask python3-stem python3-pyqt5 dh-python
+sudo apt-get install -y python3-flask python3-stem python3-pyqt5 python-nautilus
+```
+
+After that you can try both the CLI and the GUI version of OnionShare:
+
+```sh
+./install/scripts/onionshare
+./install/scripts/onionshare-gui
+```
+
+A script to build a .deb package and install OnionShare easily is also provided for your convenience:
+
+```sh
+sudo apt-get install -y build-essential fakeroot python3-all python3-stdeb dh-python python-nautilus
./install/build_deb.sh
sudo dpkg -i deb_dist/onionshare_*.deb
```
@@ -23,7 +36,7 @@ Note that OnionShare uses stdeb to generate Debian packages, and `python3-stdeb`
*For .rpm-based distros (Red Hat, Fedora, CentOS):*
```sh
-sudo sudo dnf install -y rpm-build python3-flask python3-stem python3-qt5
+sudo sudo dnf install -y rpm-build python3-flask python3-stem python3-qt5 nautilus-python
./install/build_rpm.sh
sudo yum install -y dist/onionshare-*.rpm
```
@@ -49,9 +62,15 @@ brew install python3 pyqt5 qt5
Install some dependencies using pip3:
```sh
-sudo pip3 install pyinstaller flask stem
+sudo pip3 install flask stem
```
+Install the latest development version of cx_Freeze:
+
+* Download a [snapshot](https://bitbucket.org/anthony_tuininga/cx_freeze/downloads) of the latest development version of cx_Freeze, extract it, and cd into the folder you extracted it to
+* Build the package: `python3 setup.py bdist_wheel`
+* Install it with pip: `sudo pip3 install dist/cx_Freeze-5.0-cp35-cp35m-macosx_10_11_x86_64.whl`
+
Get the source code:
```sh
@@ -70,7 +89,7 @@ Now you should have `dist/OnionShare.app`.
To codesign and build a .pkg for distribution:
```sh
-install/build_osx.sh --sign
+install/build_osx.sh --release
```
Now you should have `dist/OnionShare.pkg`.
@@ -81,19 +100,25 @@ Now you should have `dist/OnionShare.pkg`.
These instructions include adding folders to the path in Windows. To do this, go to Start and type "advanced system settings", and open "View advanced system settings" in the Control Panel. Click Environment Variables. Under "System variables" double-click on Path. From there you can add and remove folders that are available in the PATH.
-First, download and install the 32-bit (x86) version of Python 3.4.x from https://www.python.org/downloads/windows/. You need 3.4 instead of 3.5 because PyQt5 was built with 3.4. Add `C:\Python34` and `C:\Python34\Scripts` to the path.
+Download the latest Python 3.5.x, 32-bit (x86) from https://www.python.org/downloads/. I downloaded `python-3.5.2.exe`. When installing it, make sure to check the "Add Python 3.5 to PATH" checkbox on the first page of the installer.
-Open a command prompt and install some dependencies with pip: `pip3 install pyinstaller pypiwin32 flask stem`
+Download and install Qt5 from https://www.qt.io/download-open-source/. I downloaded `qt-unified-windows-x86-2.0.3-1-online.exe`. There's no need to login to a Qt account during installation. Make sure you install the latest Qt 5.x.
-Download and install Qt5 from https://www.qt.io/download-open-source/. I downloaded `qt-unified-windows-x86-2.0.2-2-online.exe`. There's no need to login to a Qt account during installation. Make sure you install the latest Qt 5.x.
-
-Download and install the latest PyQt5 for 32-bit Windows from https://www.riverbankcomputing.com/software/pyqt/download5. I downloaded `PyQt5-5.5.1-gpl-Py3.4-Qt5.5.1-x32.exe`.
+Open a command prompt and install dependencies with pip: `pip install pypiwin32 flask stem PyQt5`
Download and install the [Microsoft Visual C++ 2008 Redistributable Package (x86)](http://www.microsoft.com/en-us/download/details.aspx?id=29).
+Installing cx_Freeze with support for Python 3.5 is annoying. Here are the steps (thanks https://github.com/sekrause/cx_Freeze-Wheels):
+
+* Download and install the Visual C++ Build Tools 2005 from http://go.microsoft.com/fwlink/?LinkId=691126. I downloaded `visualcppbuildtools_full.exe`.
+* Install the python wheel package: `pip install wheel`
+* Download a [snapshot](https://bitbucket.org/anthony_tuininga/cx_freeze/downloads) of the latest development version of cx_Freeze, extract it, and cd into the folder you extracted it to
+* Build the package: `python setup.py bdist_wheel`
+* Install it with pip: `pip install dist\cx_Freeze-5.0-cp35-cp35m-win32.whl`
+
If you want to build the installer:
-* Go to http://nsis.sourceforge.net/Download and download the latest NSIS. I downloaded `nsis-3.0b0-setup.exe`.
+* Go to http://nsis.sourceforge.net/Download and download the latest NSIS. I downloaded `nsis-3.0-setup.exe`.
* Add `C:\Program Files (x86)\NSIS` to the path.
If you want to sign binaries with Authenticode:
@@ -110,7 +135,7 @@ If you want to sign binaries with Authenticode:
### To make a .exe:
-* Open a command prompt, cd into the onionshare directory, and type: `pyinstaller install\pyinstaller.spec -y`. `onionshare.exe` and all of its supporting files will get created inside the `dist\onionshare` folder.
+* Open a command prompt, cd into the onionshare directory, and type: `python setup.py build`. `onionshare.exe`, `onionshare-gui.exe`, and all of their supporting files will get created inside the `build\exe.win32-3.5` folder.
### To build the installer:
diff --git a/MANIFEST.in b/MANIFEST.in
index f3b104e2..64eca8f9 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -8,3 +8,4 @@ include resources/html/*
include install/onionshare.desktop
include install/onionshare.appdata.xml
include install/onionshare80.xpm
+include install/scripts/onionshare-nautilus.py
diff --git a/README.md b/README.md
index fd206d07..7f680855 100644
--- a/README.md
+++ b/README.md
@@ -2,7 +2,7 @@
[![Build Status](https://travis-ci.org/micahflee/onionshare.png)](https://travis-ci.org/micahflee/onionshare)
-OnionShare lets you securely and anonymously share files of any size. It works by starting a web server, making it accessible as a Tor hidden service, and generating an unguessable URL to access and download the files. It doesn't require setting up a server on the internet somewhere or using a third party filesharing service. You host the file on your own computer and use a Tor hidden service to make it temporarily accessible over the internet. The other user just needs to use Tor Browser to download the file from you.
+OnionShare lets you securely and anonymously share files of any size. It works by starting a web server, making it accessible as a Tor onion service, and generating an unguessable URL to access and download the files. It doesn't require setting up a server on the internet somewhere or using a third party filesharing service. You host the file on your own computer and use a Tor onion service to make it temporarily accessible over the internet. The other user just needs to use Tor Browser to download the file from you.
Features include:
@@ -27,9 +27,9 @@ You can set up your development environment to build OnionShare yourself by foll
## How to Use
-Before you can share files, you need to open [Tor Browser](https://www.torproject.org/) in the background. This will provide the Tor service that OnionShare uses to start the hidden service.
+Before you can share files, you need to open [Tor Browser](https://www.torproject.org/) in the background. This will provide the Tor service that OnionShare uses to start the onion service.
-Open OnionShare and drag and drop files and folders you wish to share, and click Start Sharing. It will show you .onion URL such as `http://asxmi4q6i7pajg2b.onion/egg-cain` and copy it to your clipboard. This is the secret URL that can be used to download the file you're sharing. If you'd like multiple people to be able to download this file, uncheck the "close automatically" checkbox.
+Open OnionShare and drag and drop files and folders you wish to share, and click Start Sharing. It will show you a .onion URL such as `http://asxmi4q6i7pajg2b.onion/egg-cain` and copy it to your clipboard. This is the secret URL that can be used to download the file you're sharing. If you'd like multiple people to be able to download this file, uncheck the "close automatically" checkbox.
Send this URL to the person you're trying to send the files to. If the files you're sending aren't secret, you can use normal means of sending the URL: emailing it, posting it to Facebook or Twitter, etc. If you're trying to send secret files then it's important to send this URL securely.
diff --git a/SECURITY.md b/SECURITY.md
index b5d889c9..6389ddd5 100644
--- a/SECURITY.md
+++ b/SECURITY.md
@@ -4,20 +4,20 @@
OnionShare is a tool that helps users securely and anonymously share files over the internet.
-First, the sender chooses files and folders they wish to share with the recipient. OnionShare then starts a web server at `127.0.0.1` on a random port. It chooses two words from a 6800-long wordlist called a slug, and makes the files available for download at `http://127.0.0.1:[port]/[slug]/`. It then makes the web server accessible as Tor hidden service, and displays the URL `http://[hiddenservice].onion/[slug]` to the sender to share. A final OnionShare URL looks something like `http://f5ratndpx7rgvh7i.onion/fold-foxy`.
+First, the sender chooses files and folders they wish to share with the recipient. OnionShare then starts a web server at `127.0.0.1` on a random port. It chooses two words from a 6800-long wordlist called a slug, and makes the files available for download at `http://127.0.0.1:[port]/[slug]/`. It then makes the web server accessible as Tor onion service, and displays the URL `http://[onionservice].onion/[slug]` to the sender to share. A final OnionShare URL looks something like `http://f5ratndpx7rgvh7i.onion/fold-foxy`.
The sender is responsible for securely sharing that URL with the recipient using a communication channel of their choice, such as in an encrypted email, chat, or voice call, or something less secure like a Twitter or Facebook message, depending on their threat model.
The recipient must use Tor Browser to load the URL and download the files.
-As soon as the shared files get downloaded, or when the sender closes OnionShare, the Tor hidden service and web servers shut down, completely removing the files from the internet (there is an option to not shut down after the first download, to allow the files to be downloaded multiple times). Because of this, OnionShare is most useful if it's used in real-time. For example, if a user runs OnionShare on their laptop, and then suspends their laptop before the files have been downloaded, the service will not be available until the laptop is unsuspended and connected to the internet again.
+As soon as the shared files get downloaded, or when the sender closes OnionShare, the Tor onion service and web servers shut down, completely removing the files from the internet (there is an option to not shut down after the first download, to allow the files to be downloaded multiple times). Because of this, OnionShare is most useful if it's used in real-time. For example, if a user runs OnionShare on their laptop, and then suspends their laptop before the files have been downloaded, the service will not be available until the laptop is unsuspended and connected to the internet again.
## What it protects against
* **Third parties don't have access to files being shared.** The files are hosted directly on the sender's computer and don't get uploaded to any server. Instead, the sender's computer becomes the server. Traditional ways of sending files, like in an email or using a cloud hosting service, require trusting the service with access to the files being shared.
-* **Network eavesdroppers can't spy on files in transit.** Because connections between Tor hidden services and Tor Browser are end-to-end encrypted, no network attackers can eavesdrop on the shared files while the recipient is downloading them. If the eavesdropper is positioned on the sender's end, the recipient's end, or is a malicious Tor node, they will only see Tor traffic. If the eavesdropper is a malicious rendezvous node used to connect the recipient's Tor client with the sender's hidden service, the traffic will be encrypted using the hidden service key.
+* **Network eavesdroppers can't spy on files in transit.** Because connections between Tor onion services and Tor Browser are end-to-end encrypted, no network attackers can eavesdrop on the shared files while the recipient is downloading them. If the eavesdropper is positioned on the sender's end, the recipient's end, or is a malicious Tor node, they will only see Tor traffic. If the eavesdropper is a malicious rendezvous node used to connect the recipient's Tor client with the sender's onion service, the traffic will be encrypted using the onion service key.
* **Anonymity of sender and recipient are protected by Tor.** OnionShare and Tor Browser protect the anonymity of the users. As long as the sender anonymously communicates the OnionShare URL with the recipient, the recipient and eavesdroppers can't learn the identity of the sender.
-* **If an attacker enumerates the hidden service, the shared files remain safe.** There have been attacks against the Tor network that can enumerate hidden services. If someone discovers the .onion address of an OnionShare hidden service, they still cannot download the shared files without knowing the slug. The slug is generated by choosing two random words from a list of 6800 words, meaning there are 6800^2, or about 46 million possible slugs. But they can only make 20 wrong guesses before OnionShare stops the server, preventing brute force attacks against the slug. The OnionShare server also checks request URIs using a constant time string comparison function, so timing attacks can't be used to help guess the slug.
+* **If an attacker enumerates the onion service, the shared files remain safe.** There have been attacks against the Tor network that can enumerate onion services. If someone discovers the .onion address of an OnionShare onion service, they still cannot download the shared files without knowing the slug. The slug is generated by choosing two random words from a list of 6800 words, meaning there are 6800^2, or about 46 million possible slugs. But they can only make 20 wrong guesses before OnionShare stops the server, preventing brute force attacks against the slug. The OnionShare server also checks request URIs using a constant time string comparison function, so timing attacks can't be used to help guess the slug.
## What it doesn't protect against
diff --git a/install/Info.plist b/install/Info.plist
new file mode 100644
index 00000000..0125c1d5
--- /dev/null
+++ b/install/Info.plist
@@ -0,0 +1,18 @@
+
+
+
+
+ CFBundleDevelopmentRegion
+ English
+ CFBundleExecutable
+ onionshare-gui
+ CFBundleIdentifier
+ com.micahflee.onionshare
+ NSHighResolutionCapable
+
+ CFBundleShortVersionString
+ {VERSION}
+ CFBundleIconFile
+ icon.icns
+
+
diff --git a/install/build_exe.bat b/install/build_exe.bat
index dee34cf7..e0a2094e 100644
--- a/install/build_exe.bat
+++ b/install/build_exe.bat
@@ -1,10 +1,12 @@
-REM use PyInstaller to builder a folder with onionshare.exe
-pyinstaller install\pyinstaller.spec -y
+REM build onionshare.exe, onionshare-gui.exe
+python setup.py build
-REM sign onionshare.exe
-signtool.exe sign /v /d "OnionShare" /a /tr http://timestamp.globalsign.com/scripts/timstamp.dll /fd sha256 dist\onionshare\onionshare.exe
+REM sign onionshare.exe, onionshare-gui.exe
+signtool.exe sign /v /d "OnionShare" /a /tr http://timestamp.globalsign.com/scripts/timstamp.dll /fd sha256 build\exe.win32-3.5\onionshare.exe
+signtool.exe sign /v /d "OnionShare" /a /tr http://timestamp.globalsign.com/scripts/timstamp.dll /fd sha256 build\exe.win32-3.5\onionshare-gui.exe
REM build an installer, dist\OnionShare_Setup.exe
+mkdir dist
makensis.exe install\onionshare.nsi
REM sign OnionShare_Setup.exe
diff --git a/install/build_osx.sh b/install/build_osx.sh
index 22d6cc4d..2f2314f5 100755
--- a/install/build_osx.sh
+++ b/install/build_osx.sh
@@ -5,19 +5,27 @@ cd $ROOT
# deleting dist
echo Deleting dist folder
-rm -rf $ROOT/dist &>/dev/null 2>&1
+rm -rf $ROOT/build $ROOT/dist &>/dev/null 2>&1
# build the .app
echo Building OnionShare.app
-pyinstaller install/pyinstaller.spec
+python3 setup.py bdist_mac
-if [ "$1" = "--sign" ]; then
- SIGNING_IDENTITY_APP="3rd Party Mac Developer Application: Micah Lee"
- SIGNING_IDENTITY_INSTALLER="3rd Party Mac Developer Installer: Micah Lee"
+if [ "$1" = "--release" ]; then
+ mkdir -p dist
+ APP_PATH="build/OnionShare.app"
+ PKG_PATH="dist/OnionShare.pkg"
+ IDENTITY_NAME_APPLICATION="Developer ID Application: Micah Lee"
+ IDENTITY_NAME_INSTALLER="Developer ID Installer: Micah Lee"
- # codesign the .app
- codesign -vvvv --deep -s "$SIGNING_IDENTITY_APP" dist/OnionShare.app
+ echo "Codesigning the app bundle"
+ codesign --deep -s "$IDENTITY_NAME_APPLICATION" "$APP_PATH"
- # build .pkg
- productbuild --component dist/OnionShare.app /Applications dist/OnionShare.pkg --sign "$SIGNING_IDENTITY_INSTALLER"
+ echo "Creating an installer"
+ productbuild --sign "$IDENTITY_NAME_INSTALLER" --component "$APP_PATH" /Applications "$PKG_PATH"
+
+ echo "Cleaning up"
+ rm -rf "$APP_PATH"
+
+ echo "All done, your installer is in: $PKG_PATH"
fi
diff --git a/install/build_rpm.sh b/install/build_rpm.sh
index b127eedc..7be77bb1 100755
--- a/install/build_rpm.sh
+++ b/install/build_rpm.sh
@@ -9,7 +9,7 @@ VERSION=`cat resources/version.txt`
rm -r build dist >/dev/null 2>&1
# build binary package
-python3 setup.py bdist_rpm --requires="python3-flask, python3-stem, python3-qt5"
+python3 setup.py bdist_rpm --requires="python3-flask, python3-stem, python3-qt5, nautilus-python"
# install it
echo ""
diff --git a/install/onionshare.nsi b/install/onionshare.nsi
index 33c79b27..101518de 100644
--- a/install/onionshare.nsi
+++ b/install/onionshare.nsi
@@ -1,18 +1,18 @@
!define APPNAME "OnionShare"
-!define BINPATH "..\dist\onionshare"
+!define BINPATH "..\build\exe.win32-3.5"
!define ABOUTURL "https:\\onionshare.org\"
# change these with each release
-!define INSTALLSIZE 60866
+!define INSTALLSIZE 35630
!define VERSIONMAJOR 0
!define VERSIONMINOR 9
-!define VERSIONSTRING "0.9"
+!define VERSIONSTRING "0.9.1"
RequestExecutionLevel admin
Name "OnionShare"
InstallDir "$PROGRAMFILES\${APPNAME}"
-LicenseData "license.txt"
+LicenseData "..\resources\license.txt"
Icon "onionshare.ico"
!include LogicLib.nsh
@@ -61,51 +61,68 @@ FunctionEnd
Section "install"
SetOutPath "$INSTDIR"
File "onionshare.ico"
- SetOutPath "$INSTDIR\html"
- File "${BINPATH}\html\404.html"
- File "${BINPATH}\html\denied.html"
- File "${BINPATH}\html\index.html"
- SetOutPath "$INSTDIR\images"
- File "${BINPATH}\images\logo.png"
- File "${BINPATH}\images\drop_files.png"
- File "${BINPATH}\images\server_stopped.png"
- File "${BINPATH}\images\server_started.png"
- File "${BINPATH}\images\server_working.png"
- SetOutPath "$INSTDIR\Include"
- File "${BINPATH}\include\pyconfig.h"
- SetOutPath "$INSTDIR\locale"
- File "${BINPATH}\locale\de.json"
- File "${BINPATH}\locale\en.json"
- File "${BINPATH}\locale\eo.json"
- File "${BINPATH}\locale\es.json"
- File "${BINPATH}\locale\fi.json"
- File "${BINPATH}\locale\fr.json"
- File "${BINPATH}\locale\it.json"
- File "${BINPATH}\locale\nl.json"
- File "${BINPATH}\locale\no.json"
- File "${BINPATH}\locale\pt.json"
- File "${BINPATH}\locale\ru.json"
- File "${BINPATH}\locale\tr.json"
- SetOutPath "$INSTDIR\qt5_plugins\iconengines"
- File "${BINPATH}\qt5_plugins\iconengines\qsvgicon.dll"
- SetOutPath "$INSTDIR\qt5_plugins\imageformats"
- File "${BINPATH}\qt5_plugins\imageformats\qdds.dll"
- File "${BINPATH}\qt5_plugins\imageformats\qgif.dll"
- File "${BINPATH}\qt5_plugins\imageformats\qicns.dll"
- File "${BINPATH}\qt5_plugins\imageformats\qico.dll"
- File "${BINPATH}\qt5_plugins\imageformats\qjp2.dll"
- File "${BINPATH}\qt5_plugins\imageformats\qjpeg.dll"
- File "${BINPATH}\qt5_plugins\imageformats\qmng.dll"
- File "${BINPATH}\qt5_plugins\imageformats\qsvg.dll"
- File "${BINPATH}\qt5_plugins\imageformats\qtga.dll"
- File "${BINPATH}\qt5_plugins\imageformats\qtiff.dll"
- File "${BINPATH}\qt5_plugins\imageformats\qwbmp.dll"
- File "${BINPATH}\qt5_plugins\imageformats\qwebp.dll"
- SetOutPath "$INSTDIR\qt5_plugins\platforms"
- File "${BINPATH}\qt5_plugins\platforms\qminimal.dll"
- File "${BINPATH}\qt5_plugins\platforms\qoffscreen.dll"
- File "${BINPATH}\qt5_plugins\platforms\qwindows.dll"
+ SetOutPath "$INSTDIR\imageformats"
+ File "${BINPATH}\imageformats\qdds.dll"
+ File "${BINPATH}\imageformats\qgif.dll"
+ File "${BINPATH}\imageformats\qicns.dll"
+ File "${BINPATH}\imageformats\qico.dll"
+ File "${BINPATH}\imageformats\qjpeg.dll"
+ File "${BINPATH}\imageformats\qsvg.dll"
+ File "${BINPATH}\imageformats\qtga.dll"
+ File "${BINPATH}\imageformats\qtiff.dll"
+ File "${BINPATH}\imageformats\qwbmp.dll"
+ File "${BINPATH}\imageformats\qwebp.dll"
+ SetOutPath "$INSTDIR\platforms"
+ File "${BINPATH}\platforms\qminimal.dll"
+ File "${BINPATH}\platforms\qoffscreen.dll"
+ File "${BINPATH}\platforms\qwindows.dll"
+ SetOutPath "$INSTDIR\resources"
+ File "${BINPATH}\resources\license.txt"
+ File "${BINPATH}\resources\version.txt"
+ File "${BINPATH}\resources\wordlist.txt"
+ SetOutPath "$INSTDIR\resources\html"
+ File "${BINPATH}\resources\html\404.html"
+ File "${BINPATH}\resources\html\denied.html"
+ File "${BINPATH}\resources\html\index.html"
+ SetOutPath "$INSTDIR\resources\images"
+ File "${BINPATH}\resources\images\logo.png"
+ File "${BINPATH}\resources\images\drop_files.png"
+ File "${BINPATH}\resources\images\server_stopped.png"
+ File "${BINPATH}\resources\images\server_started.png"
+ File "${BINPATH}\resources\images\server_working.png"
+ SetOutPath "$INSTDIR\resources\locale"
+ File "${BINPATH}\resources\locale\de.json"
+ File "${BINPATH}\resources\locale\en.json"
+ File "${BINPATH}\resources\locale\eo.json"
+ File "${BINPATH}\resources\locale\es.json"
+ File "${BINPATH}\resources\locale\fi.json"
+ File "${BINPATH}\resources\locale\fr.json"
+ File "${BINPATH}\resources\locale\it.json"
+ File "${BINPATH}\resources\locale\nl.json"
+ File "${BINPATH}\resources\locale\no.json"
+ File "${BINPATH}\resources\locale\pt.json"
+ File "${BINPATH}\resources\locale\ru.json"
+ File "${BINPATH}\resources\locale\tr.json"
SetOutPath "$INSTDIR"
+ File "${BINPATH}\MSVCP140.dll"
+ File "${BINPATH}\onionshare-gui.exe"
+ File "${BINPATH}\onionshare.exe"
+ File "${BINPATH}\pyexpat.pyd"
+ File "${BINPATH}\PyQt5.QtCore.pyd"
+ File "${BINPATH}\PyQt5.QtGui.pyd"
+ File "${BINPATH}\PyQt5.QtWidgets.pyd"
+ File "${BINPATH}\python35.dll"
+ File "${BINPATH}\python35.zip"
+ File "${BINPATH}\pywintypes35.dll"
+ File "${BINPATH}\Qt5Core.dll"
+ File "${BINPATH}\Qt5Gui.dll"
+ File "${BINPATH}\Qt5Svg.dll"
+ File "${BINPATH}\Qt5Widgets.dll"
+ File "${BINPATH}\select.pyd"
+ File "${BINPATH}\sip.pyd"
+ File "${BINPATH}\unicodedata.pyd"
+ File "${BINPATH}\VCRUNTIME140.dll"
+ File "${BINPATH}\win32wnet.pyd"
File "${BINPATH}\_bz2.pyd"
File "${BINPATH}\_ctypes.pyd"
File "${BINPATH}\_decimal.pyd"
@@ -114,33 +131,6 @@ Section "install"
File "${BINPATH}\_multiprocessing.pyd"
File "${BINPATH}\_socket.pyd"
File "${BINPATH}\_ssl.pyd"
- File "${BINPATH}\base_library.zip"
- File "${BINPATH}\icudt53.dll"
- File "${BINPATH}\icuin53.dll"
- File "${BINPATH}\icuuc53.dll"
- File "${BINPATH}\MSVCP100.dll"
- File "${BINPATH}\MSVCR100.dll"
- File "${BINPATH}\onionshare.exe"
- File "${BINPATH}\onionshare.exe.manifest"
- File "${BINPATH}\pyexpat.pyd"
- File "${BINPATH}\PyQt5.Qt.pyd"
- File "${BINPATH}\PyQt5.QtCore.pyd"
- File "${BINPATH}\PyQt5.QtGui.pyd"
- File "${BINPATH}\PyQt5.QtPrintSupport.pyd"
- File "${BINPATH}\PyQt5.QtWidgets.pyd"
- File "${BINPATH}\python34.dll"
- File "${BINPATH}\pywintypes34.dll"
- File "${BINPATH}\Qt5Core.dll"
- File "${BINPATH}\Qt5Gui.dll"
- File "${BINPATH}\Qt5PrintSupport.dll"
- File "${BINPATH}\Qt5Svg.dll"
- File "${BINPATH}\Qt5Widgets.dll"
- File "${BINPATH}\select.pyd"
- File "${BINPATH}\sip.pyd"
- File "${BINPATH}\unicodedata.pyd"
- File "${BINPATH}\version.txt"
- File "${BINPATH}\win32wnet.pyd"
- File "${BINPATH}\wordlist.txt"
# uninstaller
!ifndef INNER
@@ -149,7 +139,7 @@ Section "install"
!endif
# start menu
- CreateShortCut "$SMPROGRAMS\${APPNAME}.lnk" "$INSTDIR\onionshare.exe" "" "$INSTDIR\onionshare.ico"
+ CreateShortCut "$SMPROGRAMS\${APPNAME}.lnk" "$INSTDIR\onionshare-gui.exe" "" "$INSTDIR\onionshare.ico"
# registry information for add\remove programs
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "DisplayName" "${APPNAME}"
@@ -184,43 +174,61 @@ FunctionEnd
Delete "$SMPROGRAMS\${APPNAME}.lnk"
# remove files
- Delete "$INSTDIR\html\404.html"
- Delete "$INSTDIR\html\denied.html"
- Delete "$INSTDIR\html\index.html"
- Delete "$INSTDIR\images\logo.png"
- Delete "$INSTDIR\images\drop_files.png"
- Delete "$INSTDIR\images\server_stopped.png"
- Delete "$INSTDIR\images\server_started.png"
- Delete "$INSTDIR\images\server_working.png"
- Delete "$INSTDIR\include\pyconfig.h"
- Delete "$INSTDIR\locale\de.json"
- Delete "$INSTDIR\locale\en.json"
- Delete "$INSTDIR\locale\eo.json"
- Delete "$INSTDIR\locale\es.json"
- Delete "$INSTDIR\locale\fi.json"
- Delete "$INSTDIR\locale\fr.json"
- Delete "$INSTDIR\locale\it.json"
- Delete "$INSTDIR\locale\nl.json"
- Delete "$INSTDIR\locale\no.json"
- Delete "$INSTDIR\locale\pt.json"
- Delete "$INSTDIR\locale\ru.json"
- Delete "$INSTDIR\locale\tr.json"
- Delete "$INSTDIR\qt5_plugins\iconengines\qsvgicon.dll"
- Delete "$INSTDIR\qt5_plugins\imageformats\qdds.dll"
- Delete "$INSTDIR\qt5_plugins\imageformats\qgif.dll"
- Delete "$INSTDIR\qt5_plugins\imageformats\qicns.dll"
- Delete "$INSTDIR\qt5_plugins\imageformats\qico.dll"
- Delete "$INSTDIR\qt5_plugins\imageformats\qjp2.dll"
- Delete "$INSTDIR\qt5_plugins\imageformats\qjpeg.dll"
- Delete "$INSTDIR\qt5_plugins\imageformats\qmng.dll"
- Delete "$INSTDIR\qt5_plugins\imageformats\qsvg.dll"
- Delete "$INSTDIR\qt5_plugins\imageformats\qtga.dll"
- Delete "$INSTDIR\qt5_plugins\imageformats\qtiff.dll"
- Delete "$INSTDIR\qt5_plugins\imageformats\qwbmp.dll"
- Delete "$INSTDIR\qt5_plugins\imageformats\qwebp.dll"
- Delete "$INSTDIR\qt5_plugins\platforms\qminimal.dll"
- Delete "$INSTDIR\qt5_plugins\platforms\qoffscreen.dll"
- Delete "$INSTDIR\qt5_plugins\platforms\qwindows.dll"
+ Delete "$INSTDIR\imageformats\qdds.dll"
+ Delete "$INSTDIR\imageformats\qgif.dll"
+ Delete "$INSTDIR\imageformats\qicns.dll"
+ Delete "$INSTDIR\imageformats\qico.dll"
+ Delete "$INSTDIR\imageformats\qjpeg.dll"
+ Delete "$INSTDIR\imageformats\qsvg.dll"
+ Delete "$INSTDIR\imageformats\qtga.dll"
+ Delete "$INSTDIR\imageformats\qtiff.dll"
+ Delete "$INSTDIR\imageformats\qwbmp.dll"
+ Delete "$INSTDIR\imageformats\qwebp.dll"
+ Delete "$INSTDIR\platforms\qminimal.dll"
+ Delete "$INSTDIR\platforms\qoffscreen.dll"
+ Delete "$INSTDIR\platforms\qwindows.dll"
+ Delete "$INSTDIR\resources\license.txt"
+ Delete "$INSTDIR\resources\version.txt"
+ Delete "$INSTDIR\resources\wordlist.txt"
+ Delete "$INSTDIR\resources\html\404.html"
+ Delete "$INSTDIR\resources\html\denied.html"
+ Delete "$INSTDIR\resources\html\index.html"
+ Delete "$INSTDIR\resources\images\logo.png"
+ Delete "$INSTDIR\resources\images\drop_files.png"
+ Delete "$INSTDIR\resources\images\server_stopped.png"
+ Delete "$INSTDIR\resources\images\server_started.png"
+ Delete "$INSTDIR\resources\images\server_working.png"
+ Delete "$INSTDIR\resources\locale\de.json"
+ Delete "$INSTDIR\resources\locale\en.json"
+ Delete "$INSTDIR\resources\locale\eo.json"
+ Delete "$INSTDIR\resources\locale\es.json"
+ Delete "$INSTDIR\resources\locale\fi.json"
+ Delete "$INSTDIR\resources\locale\fr.json"
+ Delete "$INSTDIR\resources\locale\it.json"
+ Delete "$INSTDIR\resources\locale\nl.json"
+ Delete "$INSTDIR\resources\locale\no.json"
+ Delete "$INSTDIR\resources\locale\pt.json"
+ Delete "$INSTDIR\resources\locale\ru.json"
+ Delete "$INSTDIR\resources\locale\tr.json"
+ Delete "$INSTDIR\MSVCP140.dll"
+ Delete "$INSTDIR\onionshare-gui.exe"
+ Delete "$INSTDIR\onionshare.exe"
+ Delete "$INSTDIR\pyexpat.pyd"
+ Delete "$INSTDIR\PyQt5.QtCore.pyd"
+ Delete "$INSTDIR\PyQt5.QtGui.pyd"
+ Delete "$INSTDIR\PyQt5.QtWidgets.pyd"
+ Delete "$INSTDIR\python35.dll"
+ Delete "$INSTDIR\python35.zip"
+ Delete "$INSTDIR\pywintypes35.dll"
+ Delete "$INSTDIR\Qt5Core.dll"
+ Delete "$INSTDIR\Qt5Gui.dll"
+ Delete "$INSTDIR\Qt5Svg.dll"
+ Delete "$INSTDIR\Qt5Widgets.dll"
+ Delete "$INSTDIR\select.pyd"
+ Delete "$INSTDIR\sip.pyd"
+ Delete "$INSTDIR\unicodedata.pyd"
+ Delete "$INSTDIR\VCRUNTIME140.dll"
+ Delete "$INSTDIR\win32wnet.pyd"
Delete "$INSTDIR\_bz2.pyd"
Delete "$INSTDIR\_ctypes.pyd"
Delete "$INSTDIR\_decimal.pyd"
@@ -229,44 +237,16 @@ FunctionEnd
Delete "$INSTDIR\_multiprocessing.pyd"
Delete "$INSTDIR\_socket.pyd"
Delete "$INSTDIR\_ssl.pyd"
- Delete "$INSTDIR\base_library.zip"
- Delete "$INSTDIR\icudt53.dll"
- Delete "$INSTDIR\icuin53.dll"
- Delete "$INSTDIR\icuuc53.dll"
- Delete "$INSTDIR\MSVCP100.dll"
- Delete "$INSTDIR\MSVCR100.dll"
- Delete "$INSTDIR\onionshare.exe"
- Delete "$INSTDIR\onionshare.exe.manifest"
- Delete "$INSTDIR\pyexpat.pyd"
- Delete "$INSTDIR\PyQt5.Qt.pyd"
- Delete "$INSTDIR\PyQt5.QtCore.pyd"
- Delete "$INSTDIR\PyQt5.QtGui.pyd"
- Delete "$INSTDIR\PyQt5.QtPrintSupport.pyd"
- Delete "$INSTDIR\PyQt5.QtWidgets.pyd"
- Delete "$INSTDIR\python34.dll"
- Delete "$INSTDIR\pywintypes34.dll"
- Delete "$INSTDIR\Qt5Core.dll"
- Delete "$INSTDIR\Qt5Gui.dll"
- Delete "$INSTDIR\Qt5PrintSupport.dll"
- Delete "$INSTDIR\Qt5Svg.dll"
- Delete "$INSTDIR\Qt5Widgets.dll"
- Delete "$INSTDIR\select.pyd"
- Delete "$INSTDIR\sip.pyd"
- Delete "$INSTDIR\unicodedata.pyd"
- Delete "$INSTDIR\version.txt"
- Delete "$INSTDIR\win32wnet.pyd"
- Delete "$INSTDIR\wordlist.txt"
+ Delete "$INSTDIR\onionshare.ico"
Delete "$INSTDIR\uninstall.exe"
- rmDir "$INSTDIR\html"
- rmDir "$INSTDIR\images"
- rmDir "$INSTDIR\Include"
- rmDir "$INSTDIR\locale"
- rmDir "$INSTDIR\qt5_plugins\iconengines"
- rmDir "$INSTDIR\qt5_plugins\imageformats"
- rmDir "$INSTDIR\qt5_plugins\platforms"
- rmDir "$INSTDIR\qt5_plugins"
+ rmDir "$INSTDIR\imageformats"
+ rmDir "$INSTDIR\platforms"
+ rmDir "$INSTDIR\resources\html"
+ rmDir "$INSTDIR\resources\images"
+ rmDir "$INSTDIR\resources\locale"
+ rmDir "$INSTDIR\resources"
rmDir "$INSTDIR"
# remove uninstaller information from the registry
diff --git a/install/ppa_release.sh b/install/ppa_release.sh
index 859d1826..e64fb866 100755
--- a/install/ppa_release.sh
+++ b/install/ppa_release.sh
@@ -7,10 +7,10 @@
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd )"
cd $DIR
-VERSION=`cat version`
+VERSION=`cat resources/version.txt`
rm -rf deb_dist >/dev/null 2>&1
-python setup.py --command-packages=stdeb.command sdist_dsc
+python3 setup.py --command-packages=stdeb.command sdist_dsc
cd deb_dist/onionshare-$VERSION
dpkg-buildpackage -S
cd ..
diff --git a/install/pyinstaller.spec b/install/pyinstaller.spec
deleted file mode 100644
index f7337748..00000000
--- a/install/pyinstaller.spec
+++ /dev/null
@@ -1,59 +0,0 @@
-# -*- mode: python -*-
-
-import platform
-system = platform.system()
-
-block_cipher = None
-
-a = Analysis(
- ['scripts/onionshare-gui'],
- pathex=['.'],
- binaries=None,
- datas=[
- ('../resources/images/*', 'images'),
- ('../resources/locale/*', 'locale'),
- ('../resources/html/*', 'html'),
- ('../resources/version.txt', '.'),
- ('../resources/wordlist.txt', '.')
- ],
- hiddenimports=[],
- hookspath=[],
- runtime_hooks=[],
- excludes=[],
- win_no_prefer_redirects=False,
- win_private_assemblies=False,
- cipher=block_cipher)
-
-pyz = PYZ(
- a.pure, a.zipped_data,
- cipher=block_cipher)
-
-exe = EXE(
- pyz,
- a.scripts,
- exclude_binaries=True,
- name='onionshare',
- debug=False,
- strip=False,
- upx=True,
- console=False)
-
-coll = COLLECT(
- exe,
- a.binaries,
- a.zipfiles,
- a.datas,
- strip=False,
- upx=True,
- name='onionshare')
-
-if system == 'Darwin':
- app = BUNDLE(
- coll,
- name='OnionShare.app',
- icon='install/onionshare.icns',
- bundle_identifier='com.micahflee.onionshare',
- info_plist={
- 'NSHighResolutionCapable': 'True'
- }
- )
diff --git a/install/scripts/onionshare b/install/scripts/onionshare
index 4d806f34..a896d597 100755
--- a/install/scripts/onionshare
+++ b/install/scripts/onionshare
@@ -18,12 +18,5 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
"""
-import sys, os
-
-try:
- import onionshare
-except ImportError:
- sys.path.append(os.path.abspath(os.path.dirname(__file__)+'/..'))
- import onionshare
-
+import onionshare
onionshare.main()
diff --git a/install/scripts/onionshare-gui b/install/scripts/onionshare-gui
index 86dcf728..6ccdd00b 100755
--- a/install/scripts/onionshare-gui
+++ b/install/scripts/onionshare-gui
@@ -18,12 +18,5 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
"""
-import sys, os
-
-try:
- import onionshare_gui
-except ImportError:
- sys.path.append(os.path.abspath(os.path.dirname(__file__)+'/..'))
- import onionshare_gui
-
+import onionshare_gui
onionshare_gui.main()
diff --git a/install/scripts/onionshare-nautilus.py b/install/scripts/onionshare-nautilus.py
new file mode 100644
index 00000000..db701c40
--- /dev/null
+++ b/install/scripts/onionshare-nautilus.py
@@ -0,0 +1,46 @@
+#!/usr/bin/env python
+
+import os
+import subprocess
+import urllib
+import gi
+gi.require_version('Nautilus', '3.0')
+
+from gi.repository import Nautilus
+from gi.repository import GObject
+
+# Put me in /usr/share/nautilus-python/extensions/
+class OnionShareExtension(GObject.GObject, Nautilus.MenuProvider):
+ def __init__(self):
+ pass
+
+ def url2path(self,url):
+ file_uri = url.get_activation_uri()
+ arg_uri = file_uri[7:]
+ path = urllib.url2pathname(arg_uri)
+ return path
+
+ def exec_onionshare(self, filenames):
+# Would prefer this method but there is a conflict between GTK 2.0 vs GTK 3.0 components being loaded at once
+# (nautilus:3090): Gtk-ERROR **: GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported
+# sys.argv = ["", "--filenames"] + filenames
+# sys.exit(onionshare_gui.main())
+ path = os.path.join(os.sep, 'usr', 'bin', 'onionshare-gui')
+ cmd = [path, "--filenames"] + filenames
+ subprocess.Popen(cmd)
+
+ def get_file_items(self, window, files):
+ menuitem = Nautilus.MenuItem(name='OnionShare::Nautilus',
+ label='Share via OnionShare',
+ tip='',
+ icon='')
+ menu = Nautilus.Menu()
+ menu.append_item(menuitem)
+ menuitem.connect("activate", self.menu_activate_cb, files)
+ return menuitem,
+
+ def menu_activate_cb(self, menu, files):
+ file_list = []
+ for file in files:
+ file_list.append(self.url2path(file))
+ self.exec_onionshare(file_list)
diff --git a/onionshare/helpers.py b/onionshare/helpers.py
index ae58488a..aaa1c999 100644
--- a/onionshare/helpers.py
+++ b/onionshare/helpers.py
@@ -17,7 +17,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
"""
-import sys, os, inspect, hashlib, base64, hmac, platform, zipfile, tempfile, math, time
+import sys, os, inspect, hashlib, base64, platform, zipfile, tempfile, math, time
from random import SystemRandom
@@ -34,20 +34,14 @@ def get_resource_path(filename):
systemwide, and whether regardless of platform
"""
p = get_platform()
- if p == 'Linux':
+ if p == 'Linux' and sys.argv and sys.argv[0].startswith('/usr/bin/onionshare'):
# OnionShare is installed systemwide in Linux
- if len(sys.argv) > 0 and sys.argv[0].startswith('/usr/bin/onionshare'):
- resources_dir = os.path.join(sys.prefix, 'share/onionshare')
- # Look for resources directory relative to python file
- else:
- resources_dir = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))), 'resources')
- else:
- # Check if app is "frozen" with pyinstaller
- # https://pythonhosted.org/PyInstaller/#run-time-information
- if getattr(sys, 'frozen', False):
- resources_dir = sys._MEIPASS
- else:
- resources_dir = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))), 'resources')
+ resources_dir = os.path.join(sys.prefix, 'share/onionshare')
+ elif getattr(sys, 'frozen', False): # Check if app is "frozen" with cx_Freeze
+ # http://cx-freeze.readthedocs.io/en/latest/faq.html#using-data-files
+ resources_dir = os.path.join(os.path.dirname(sys.executable), 'resources')
+ else: # Look for resources directory relative to python file
+ resources_dir = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))), 'resources')
return os.path.join(resources_dir, filename)
diff --git a/onionshare/hs.py b/onionshare/onion.py
similarity index 79%
rename from onionshare/hs.py
rename to onionshare/onion.py
index 86a917ba..5370fe2d 100644
--- a/onionshare/hs.py
+++ b/onionshare/onion.py
@@ -32,27 +32,19 @@ class NoTor(Exception):
"""
pass
-class HSDirError(Exception):
+class Onion(object):
"""
- This exception is raised when onionshare tries create a non-ephemeral
- hidden service and does not have permission to create or write to
- the hidden service directory.
- """
- pass
-
-class HS(object):
- """
- HS is an abstraction layer for connecting to the Tor control port and
- creating hidden services. Onionshare supports creating hidden services
+ Onion is an abstraction layer for connecting to the Tor control port and
+ creating onion services. OnionShare supports creating onion services
using two methods:
- Modifying the Tor configuration through the control port is the old
- method, and will be deprecated in favor of ephemeral hidden services.
- - Using the control port to create ephemeral hidden servers is the
+ method, and will be deprecated in favor of ephemeral onion services.
+ - Using the control port to create ephemeral onion servers is the
preferred method.
This class detects the versions of Tor and stem to determine if ephemeral
- hidden services are supported. If not, it falls back to modifying the
+ onion services are supported. If not, it falls back to modifying the
Tor configuration.
"""
def __init__(self, transparent_torification=False):
@@ -77,45 +69,36 @@ class HS(object):
if not found_tor:
raise NoTor(strings._("cant_connect_ctrlport").format(str(ports)))
- # do the versions of stem and tor that I'm using support ephemeral hidden services?
+ # do the versions of stem and tor that I'm using support ephemeral onion services?
tor_version = self.c.get_version().version_str
list_ephemeral_hidden_services = getattr(self.c, "list_ephemeral_hidden_services", None)
self.supports_ephemeral = callable(list_ephemeral_hidden_services) and tor_version >= '0.2.7.1'
def start(self, port):
"""
- Start a hidden service on port 80, pointing to the given port, and
+ Start a onion service on port 80, pointing to the given port, and
return the onion hostname.
"""
print(strings._("connecting_ctrlport").format(int(port)))
if self.supports_ephemeral:
print(strings._('using_ephemeral'))
- res = self.c.create_ephemeral_hidden_service({ 80: port }, await_publication = False)
+ res = self.c.create_ephemeral_hidden_service({ 80: port }, await_publication = True)
self.service_id = res.content()[0][2].split('=')[1]
- onion_host = res.content()[0][2].split('=')[1] + '.onion'
+ onion_host = self.service_id + '.onion'
return onion_host
else:
- # come up with a hidden service directory name
+ # come up with a onion service directory name
if helpers.get_platform() == 'Windows':
self.hidserv_dir = tempfile.mkdtemp()
self.hidserv_dir = self.hidserv_dir.replace('\\', '/')
else:
- path = '/tmp/onionshare'
- try:
- if not os.path.exists(path):
- os.makedirs(path, 0o700)
- except:
- raise HSDirError(strings._("error_hs_dir_cannot_create").format(path))
- if not os.access(path, os.W_OK):
- raise HSDirError(strings._("error_hs_dir_not_writable").format(path))
-
- self.hidserv_dir = tempfile.mkdtemp(dir=path)
+ self.hidserv_dir = tempfile.mkdtemp(suffix='onionshare',dir='/tmp')
self.cleanup_filenames.append(self.hidserv_dir)
- # set up hidden service
+ # set up onion service
hsdic = self.c.get_conf_map('HiddenServiceOptions') or {
'HiddenServiceDir': [], 'HiddenServicePort': []
}
@@ -137,11 +120,11 @@ class HS(object):
def wait_for_hs(self, onion_host):
"""
- This function is only required when using non-ephemeral hidden services. After
- creating a hidden service, continually attempt to connect to it until it
- successfully connects..
+ This function is only required when using non-ephemeral onion services. After
+ creating a onion service, continually attempt to connect to it until it
+ successfully connects.
"""
- # legacy only, this function is no longer required with ephemeral hidden services
+ # legacy only, this function is no longer required with ephemeral onion services
print(strings._('wait_for_hs'))
ready = False
@@ -186,20 +169,20 @@ class HS(object):
def cleanup(self):
"""
- Stop hidden services that were created earlier, and delete any temporary
+ Stop onion services that were created earlier, and delete any temporary
files that were created.
"""
if self.supports_ephemeral:
- # cleanup the ephemeral hidden service
+ # cleanup the ephemeral onion service
if self.service_id:
self.c.remove_ephemeral_hidden_service(self.service_id)
self.service_id = None
else:
- # cleanup hidden service
+ # cleanup onion service
try:
if self.controller:
- # Get fresh hidden services (maybe changed since last time)
+ # Get fresh onion services (maybe changed since last time)
# and remove ourselves
hsdic = self.controller.get_conf_map('HiddenServiceOptions') or {
'HiddenServiceDir': [], 'HiddenServicePort': []
@@ -233,17 +216,17 @@ class HS(object):
'80 127.0.0.1:33302'
],
'HiddenServiceDir': [
- '/tmp/onionshare/tmplTfZZu',
- '/tmp/onionshare/tmpchDai3'
+ '/tmp/onionsharelTfZZu',
+ '/tmp/onionsharechDai3'
]
}
Output will look like this:
[
- ('HiddenServiceDir', '/tmp/onionshare/tmplTfZZu'),
+ ('HiddenServiceDir', '/tmp/onionsharelTfZZu'),
('HiddenServicePort', '80 127.0.0.1:47906'),
- ('HiddenServiceDir', '/tmp/onionshare/tmpchDai3'),
+ ('HiddenServiceDir', '/tmp/onionsharechDai3'),
('HiddenServicePort', '80 127.0.0.1:33302')
]
"""
diff --git a/onionshare/onionshare.py b/onionshare/onionshare.py
index 0ccf394e..6dcc5ba0 100644
--- a/onionshare/onionshare.py
+++ b/onionshare/onionshare.py
@@ -18,18 +18,18 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
"""
-import os, sys, subprocess, time, argparse, inspect, shutil, socket, threading
+import os, sys, time, argparse, shutil, socket, threading
-from . import strings, helpers, web, hs
+from . import strings, helpers, web, onion
class OnionShare(object):
"""
OnionShare is the main application class. Pass in options and run
- start_hidden_service and it will do the magic.
+ start_onion_service and it will do the magic.
"""
def __init__(self, debug=False, local_only=False, stay_open=False, transparent_torification=False):
self.port = None
- self.hs = None
+ self.onion = None
self.hidserv_dir = None
self.onion_host = None
@@ -64,9 +64,9 @@ class OnionShare(object):
self.port = tmpsock.getsockname()[1]
tmpsock.close()
- def start_hidden_service(self, gui=False):
+ def start_onion_service(self):
"""
- Start the onionshare hidden service.
+ Start the onionshare onion service.
"""
if not self.port:
self.choose_port()
@@ -75,10 +75,10 @@ class OnionShare(object):
self.onion_host = '127.0.0.1:{0:d}'.format(self.port)
return
- if not self.hs:
- self.hs = hs.HS(self.transparent_torification)
+ if not self.onion:
+ self.onion = onion.Onion(self.transparent_torification)
- self.onion_host = self.hs.start(self.port)
+ self.onion_host = self.onion.start(self.port)
def cleanup(self):
"""
@@ -92,9 +92,9 @@ class OnionShare(object):
shutil.rmtree(filename)
self.cleanup_filenames = []
- # call hs's cleanup
- if self.hs:
- self.hs.cleanup()
+ # cleanup the onion
+ if self.onion:
+ self.onion.cleanup()
def main(cwd=None):
@@ -102,7 +102,7 @@ def main(cwd=None):
The main() function implements all of the logic that the command-line version of
onionshare uses.
"""
- strings.load_strings()
+ strings.load_strings(helpers)
print(strings._('version_string').format(helpers.get_version()))
# onionshare CLI in OSX needs to change current working directory (#132)
@@ -141,10 +141,8 @@ def main(cwd=None):
try:
app = OnionShare(debug, local_only, stay_open, transparent_torification)
app.choose_port()
- app.start_hidden_service()
- except hs.NoTor as e:
- sys.exit(e.args[0])
- except hs.HSDirError as e:
+ app.start_onion_service()
+ except onion.NoTor as e:
sys.exit(e.args[0])
# prepare files to share
@@ -158,15 +156,15 @@ def main(cwd=None):
print(strings._("large_filesize"))
print('')
- # start onionshare service in new thread
+ # start onionshare http service in new thread
t = threading.Thread(target=web.start, args=(app.port, app.stay_open, app.transparent_torification))
t.daemon = True
t.start()
try: # Trap Ctrl-C
# wait for hs, only if using old version of tor
- if not app.local_only:
- ready = app.hs.wait_for_hs(app.onion_host)
+ if not app.local_only and not app.onion.supports_ephemeral:
+ ready = app.onion.wait_for_hs(app.onion_host)
if not ready:
sys.exit()
else:
diff --git a/onionshare/strings.py b/onionshare/strings.py
index 61235e2b..94739efb 100644
--- a/onionshare/strings.py
+++ b/onionshare/strings.py
@@ -17,14 +17,11 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
"""
-import json, locale, sys, os
-
-from . import helpers
+import json, locale, os
strings = {}
-
-def load_strings(default="en"):
+def load_strings(helpers, default="en"):
"""
Loads translated strings and fallback to English
if the translation does not exist.
diff --git a/onionshare/web.py b/onionshare/web.py
index 6aba1c79..958e8c3a 100644
--- a/onionshare/web.py
+++ b/onionshare/web.py
@@ -20,7 +20,6 @@ along with this program. If not, see .
import queue, mimetypes, platform, os, sys
from urllib.request import urlopen
from flask import Flask, Response, request, render_template_string, abort
-from functools import wraps
from . import strings, helpers
@@ -231,7 +230,7 @@ def download(slug_candidate):
# The user has canceled the download, so stop serving the file
if client_cancel:
add_request(REQUEST_CANCELED, path, {'id': download_id})
- break;
+ break
chunk = fp.read(chunk_size)
if chunk == b'':
diff --git a/onionshare_gui/onionshare_gui.py b/onionshare_gui/onionshare_gui.py
index 1eb508bc..5fa8f624 100644
--- a/onionshare_gui/onionshare_gui.py
+++ b/onionshare_gui/onionshare_gui.py
@@ -58,6 +58,8 @@ class OnionShareGui(QtWidgets.QMainWindow):
start_server_finished = QtCore.pyqtSignal()
stop_server_finished = QtCore.pyqtSignal()
starting_server_step2 = QtCore.pyqtSignal()
+ starting_server_step3 = QtCore.pyqtSignal()
+ starting_server_error = QtCore.pyqtSignal(str)
def __init__(self, qtapp, app):
super(OnionShareGui, self).__init__()
@@ -90,6 +92,8 @@ class OnionShareGui(QtWidgets.QMainWindow):
self.file_selection.file_list.files_updated.connect(self.server_status.update)
self.server_status.url_copied.connect(self.copy_url)
self.starting_server_step2.connect(self.start_server_step2)
+ self.starting_server_step3.connect(self.start_server_step3)
+ self.starting_server_error.connect(self.start_server_error)
# filesize warning
self.filesize_warning = QtWidgets.QLabel()
@@ -127,52 +131,53 @@ class OnionShareGui(QtWidgets.QMainWindow):
self.timer.timeout.connect(self.check_for_requests)
self.timer.start(500)
- def start_server_step2(self):
- """
- Step 2 in starting the onionshare server. This displays the large filesize
- warning, if applicable.
- """
- # warn about sending large files over Tor
- if web.zip_filesize >= 157286400: # 150mb
- self.filesize_warning.setText(strings._("large_filesize", True))
- self.filesize_warning.show()
-
def start_server(self):
"""
- Start the onionshare server. This uses multiple threads to start the Tor hidden
+ Start the onionshare server. This uses multiple threads to start the Tor onion
server and the web app.
"""
# Reset web counters
web.download_count = 0
web.error404_count = 0
- # start the hidden service
- self.status_bar.showMessage(strings._('gui_starting_server1', True))
+ # pick an available local port for the http service to listen on
self.app.choose_port()
- try:
- self.app.start_hidden_service(gui=True)
- except onionshare.hs.NoTor as e:
- alert(e.args[0], QtWidgets.QMessageBox.Warning)
- self.server_status.stop_server()
- self.status_bar.clearMessage()
- return
- # start onionshare service in new thread
- t = threading.Thread(target=web.start, args=(self.app.port, self.app.stay_open, self.app.transparent_torification))
- t.daemon = True
- t.start()
+ # start the onion service in a new thread
+ def start_onion_service(self):
+ self.status_bar.showMessage(strings._('gui_starting_server1', True))
+ try:
+ self.app.start_onion_service()
+ self.starting_server_step2.emit()
+ except onionshare.onion.NoTor as e:
+ self.starting_server_error.emit(e.args[0])
+ return
+
+ t1 = threading.Thread(target=start_onion_service, kwargs={'self': self})
+ t1.daemon = True
+ t1.start()
+
+ # start onionshare http service in new thread
+ t2 = threading.Thread(target=web.start, args=(self.app.port, self.app.stay_open, self.app.transparent_torification))
+ t2.daemon = True
+ t2.start()
+
+ def start_server_step2(self):
+ """
+ Step 2 in starting the onionshare server. Prepare files for serving.
+ """
# prepare the files for sending in a new thread
def finish_starting_server(self):
# prepare files to share
web.set_file_info(self.file_selection.file_list.filenames)
self.app.cleanup_filenames.append(web.zip_filename)
- self.starting_server_step2.emit()
+ self.starting_server_step3.emit()
# wait for hs
- if not self.app.local_only:
+ if not self.app.local_only and not self.app.onion.supports_ephemeral:
self.status_bar.showMessage(strings._('gui_starting_server3', True))
- self.app.hs.wait_for_hs(self.app.onion_host)
+ self.app.onion.wait_for_hs(self.app.onion_host)
# done
self.start_server_finished.emit()
@@ -182,6 +187,24 @@ class OnionShareGui(QtWidgets.QMainWindow):
t.daemon = True
t.start()
+ def start_server_step3(self):
+ """
+ Step 3 in starting the onionshare server. This displays the large filesize
+ warning, if applicable.
+ """
+ # warn about sending large files over Tor
+ if web.zip_filesize >= 157286400: # 150mb
+ self.filesize_warning.setText(strings._("large_filesize", True))
+ self.filesize_warning.show()
+
+ def start_server_error(self, error):
+ """
+ If there's an error when trying to start the onion service
+ """
+ alert(error, QtWidgets.QMessageBox.Warning)
+ self.server_status.stop_server()
+ self.status_bar.clearMessage()
+
def stop_server(self):
"""
Stop the onionshare server.
@@ -284,7 +307,7 @@ def main():
"""
The main() function implements all of the logic that the GUI version of onionshare uses.
"""
- strings.load_strings()
+ strings.load_strings(helpers)
print(strings._('version_string').format(helpers.get_version()))
# start the Qt app
diff --git a/install/license.txt b/resources/license.txt
similarity index 98%
rename from install/license.txt
rename to resources/license.txt
index 8da86cd6..b3dc5224 100644
--- a/install/license.txt
+++ b/resources/license.txt
@@ -1,676 +1,676 @@
-Copyright (C) 2016 Micah Lee
-
- GNU GENERAL PUBLIC LICENSE
- Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc.
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The GNU General Public License is a free, copyleft license for
-software and other kinds of works.
-
- The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works. By contrast,
-the GNU General Public License is intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains free
-software for all its users. We, the Free Software Foundation, use the
-GNU General Public License for most of our software; it applies also to
-any other work released this way by its authors. You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-them if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new
-free programs, and that you know you can do these things.
-
- To protect your rights, we need to prevent others from denying you
-these rights or asking you to surrender the rights. Therefore, you have
-certain responsibilities if you distribute copies of the software, or if
-you modify it: responsibilities to respect the freedom of others.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must pass on to the recipients the same
-freedoms that you received. You must make sure that they, too, receive
-or can get the source code. And you must show them these terms so they
-know their rights.
-
- Developers that use the GNU GPL protect your rights with two steps:
-(1) assert copyright on the software, and (2) offer you this License
-giving you legal permission to copy, distribute and/or modify it.
-
- For the developers' and authors' protection, the GPL clearly explains
-that there is no warranty for this free software. For both users' and
-authors' sake, the GPL requires that modified versions be marked as
-changed, so that their problems will not be attributed erroneously to
-authors of previous versions.
-
- Some devices are designed to deny users access to install or run
-modified versions of the software inside them, although the manufacturer
-can do so. This is fundamentally incompatible with the aim of
-protecting users' freedom to change the software. The systematic
-pattern of such abuse occurs in the area of products for individuals to
-use, which is precisely where it is most unacceptable. Therefore, we
-have designed this version of the GPL to prohibit the practice for those
-products. If such problems arise substantially in other domains, we
-stand ready to extend this provision to those domains in future versions
-of the GPL, as needed to protect the freedom of users.
-
- Finally, every program is threatened constantly by software patents.
-States should not allow patents to restrict development and use of
-software on general-purpose computers, but in those that do, we wish to
-avoid the special danger that patents applied to a free program could
-make it effectively proprietary. To prevent this, the GPL assures that
-patents cannot be used to render the program non-free.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- TERMS AND CONDITIONS
-
- 0. Definitions.
-
- "This License" refers to version 3 of the GNU General Public License.
-
- "Copyright" also means copyright-like laws that apply to other kinds of
-works, such as semiconductor masks.
-
- "The Program" refers to any copyrightable work licensed under this
-License. Each licensee is addressed as "you". "Licensees" and
-"recipients" may be individuals or organizations.
-
- To "modify" a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of an
-exact copy. The resulting work is called a "modified version" of the
-earlier work or a work "based on" the earlier work.
-
- A "covered work" means either the unmodified Program or a work based
-on the Program.
-
- To "propagate" a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy. Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.
-
- To "convey" a work means any kind of propagation that enables other
-parties to make or receive copies. Mere interaction with a user through
-a computer network, with no transfer of a copy, is not conveying.
-
- An interactive user interface displays "Appropriate Legal Notices"
-to the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and how to view a copy of this License. If
-the interface presents a list of user commands or options, such as a
-menu, a prominent item in the list meets this criterion.
-
- 1. Source Code.
-
- The "source code" for a work means the preferred form of the work
-for making modifications to it. "Object code" means any non-source
-form of a work.
-
- A "Standard Interface" means an interface that either is an official
-standard defined by a recognized standards body, or, in the case of
-interfaces specified for a particular programming language, one that
-is widely used among developers working in that language.
-
- The "System Libraries" of an executable work include anything, other
-than the work as a whole, that (a) is included in the normal form of
-packaging a Major Component, but which is not part of that Major
-Component, and (b) serves only to enable use of the work with that
-Major Component, or to implement a Standard Interface for which an
-implementation is available to the public in source code form. A
-"Major Component", in this context, means a major essential component
-(kernel, window system, and so on) of the specific operating system
-(if any) on which the executable work runs, or a compiler used to
-produce the work, or an object code interpreter used to run it.
-
- The "Corresponding Source" for a work in object code form means all
-the source code needed to generate, install, and (for an executable
-work) run the object code and to modify the work, including scripts to
-control those activities. However, it does not include the work's
-System Libraries, or general-purpose tools or generally available free
-programs which are used unmodified in performing those activities but
-which are not part of the work. For example, Corresponding Source
-includes interface definition files associated with source files for
-the work, and the source code for shared libraries and dynamically
-linked subprograms that the work is specifically designed to require,
-such as by intimate data communication or control flow between those
-subprograms and other parts of the work.
-
- The Corresponding Source need not include anything that users
-can regenerate automatically from other parts of the Corresponding
-Source.
-
- The Corresponding Source for a work in source code form is that
-same work.
-
- 2. Basic Permissions.
-
- All rights granted under this License are granted for the term of
-copyright on the Program, and are irrevocable provided the stated
-conditions are met. This License explicitly affirms your unlimited
-permission to run the unmodified Program. The output from running a
-covered work is covered by this License only if the output, given its
-content, constitutes a covered work. This License acknowledges your
-rights of fair use or other equivalent, as provided by copyright law.
-
- You may make, run and propagate covered works that you do not
-convey, without conditions so long as your license otherwise remains
-in force. You may convey covered works to others for the sole purpose
-of having them make modifications exclusively for you, or provide you
-with facilities for running those works, provided that you comply with
-the terms of this License in conveying all material for which you do
-not control copyright. Those thus making or running the covered works
-for you must do so exclusively on your behalf, under your direction
-and control, on terms that prohibit them from making any copies of
-your copyrighted material outside their relationship with you.
-
- Conveying under any other circumstances is permitted solely under
-the conditions stated below. Sublicensing is not allowed; section 10
-makes it unnecessary.
-
- 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
-
- No covered work shall be deemed part of an effective technological
-measure under any applicable law fulfilling obligations under article
-11 of the WIPO copyright treaty adopted on 20 December 1996, or
-similar laws prohibiting or restricting circumvention of such
-measures.
-
- When you convey a covered work, you waive any legal power to forbid
-circumvention of technological measures to the extent such circumvention
-is effected by exercising rights under this License with respect to
-the covered work, and you disclaim any intention to limit operation or
-modification of the work as a means of enforcing, against the work's
-users, your or third parties' legal rights to forbid circumvention of
-technological measures.
-
- 4. Conveying Verbatim Copies.
-
- You may convey verbatim copies of the Program's source code as you
-receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice;
-keep intact all notices stating that this License and any
-non-permissive terms added in accord with section 7 apply to the code;
-keep intact all notices of the absence of any warranty; and give all
-recipients a copy of this License along with the Program.
-
- You may charge any price or no price for each copy that you convey,
-and you may offer support or warranty protection for a fee.
-
- 5. Conveying Modified Source Versions.
-
- You may convey a work based on the Program, or the modifications to
-produce it from the Program, in the form of source code under the
-terms of section 4, provided that you also meet all of these conditions:
-
- a) The work must carry prominent notices stating that you modified
- it, and giving a relevant date.
-
- b) The work must carry prominent notices stating that it is
- released under this License and any conditions added under section
- 7. This requirement modifies the requirement in section 4 to
- "keep intact all notices".
-
- c) You must license the entire work, as a whole, under this
- License to anyone who comes into possession of a copy. This
- License will therefore apply, along with any applicable section 7
- additional terms, to the whole of the work, and all its parts,
- regardless of how they are packaged. This License gives no
- permission to license the work in any other way, but it does not
- invalidate such permission if you have separately received it.
-
- d) If the work has interactive user interfaces, each must display
- Appropriate Legal Notices; however, if the Program has interactive
- interfaces that do not display Appropriate Legal Notices, your
- work need not make them do so.
-
- A compilation of a covered work with other separate and independent
-works, which are not by their nature extensions of the covered work,
-and which are not combined with it such as to form a larger program,
-in or on a volume of a storage or distribution medium, is called an
-"aggregate" if the compilation and its resulting copyright are not
-used to limit the access or legal rights of the compilation's users
-beyond what the individual works permit. Inclusion of a covered work
-in an aggregate does not cause this License to apply to the other
-parts of the aggregate.
-
- 6. Conveying Non-Source Forms.
-
- You may convey a covered work in object code form under the terms
-of sections 4 and 5, provided that you also convey the
-machine-readable Corresponding Source under the terms of this License,
-in one of these ways:
-
- a) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by the
- Corresponding Source fixed on a durable physical medium
- customarily used for software interchange.
-
- b) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by a
- written offer, valid for at least three years and valid for as
- long as you offer spare parts or customer support for that product
- model, to give anyone who possesses the object code either (1) a
- copy of the Corresponding Source for all the software in the
- product that is covered by this License, on a durable physical
- medium customarily used for software interchange, for a price no
- more than your reasonable cost of physically performing this
- conveying of source, or (2) access to copy the
- Corresponding Source from a network server at no charge.
-
- c) Convey individual copies of the object code with a copy of the
- written offer to provide the Corresponding Source. This
- alternative is allowed only occasionally and noncommercially, and
- only if you received the object code with such an offer, in accord
- with subsection 6b.
-
- d) Convey the object code by offering access from a designated
- place (gratis or for a charge), and offer equivalent access to the
- Corresponding Source in the same way through the same place at no
- further charge. You need not require recipients to copy the
- Corresponding Source along with the object code. If the place to
- copy the object code is a network server, the Corresponding Source
- may be on a different server (operated by you or a third party)
- that supports equivalent copying facilities, provided you maintain
- clear directions next to the object code saying where to find the
- Corresponding Source. Regardless of what server hosts the
- Corresponding Source, you remain obligated to ensure that it is
- available for as long as needed to satisfy these requirements.
-
- e) Convey the object code using peer-to-peer transmission, provided
- you inform other peers where the object code and Corresponding
- Source of the work are being offered to the general public at no
- charge under subsection 6d.
-
- A separable portion of the object code, whose source code is excluded
-from the Corresponding Source as a System Library, need not be
-included in conveying the object code work.
-
- A "User Product" is either (1) a "consumer product", which means any
-tangible personal property which is normally used for personal, family,
-or household purposes, or (2) anything designed or sold for incorporation
-into a dwelling. In determining whether a product is a consumer product,
-doubtful cases shall be resolved in favor of coverage. For a particular
-product received by a particular user, "normally used" refers to a
-typical or common use of that class of product, regardless of the status
-of the particular user or of the way in which the particular user
-actually uses, or expects or is expected to use, the product. A product
-is a consumer product regardless of whether the product has substantial
-commercial, industrial or non-consumer uses, unless such uses represent
-the only significant mode of use of the product.
-
- "Installation Information" for a User Product means any methods,
-procedures, authorization keys, or other information required to install
-and execute modified versions of a covered work in that User Product from
-a modified version of its Corresponding Source. The information must
-suffice to ensure that the continued functioning of the modified object
-code is in no case prevented or interfered with solely because
-modification has been made.
-
- If you convey an object code work under this section in, or with, or
-specifically for use in, a User Product, and the conveying occurs as
-part of a transaction in which the right of possession and use of the
-User Product is transferred to the recipient in perpetuity or for a
-fixed term (regardless of how the transaction is characterized), the
-Corresponding Source conveyed under this section must be accompanied
-by the Installation Information. But this requirement does not apply
-if neither you nor any third party retains the ability to install
-modified object code on the User Product (for example, the work has
-been installed in ROM).
-
- The requirement to provide Installation Information does not include a
-requirement to continue to provide support service, warranty, or updates
-for a work that has been modified or installed by the recipient, or for
-the User Product in which it has been modified or installed. Access to a
-network may be denied when the modification itself materially and
-adversely affects the operation of the network or violates the rules and
-protocols for communication across the network.
-
- Corresponding Source conveyed, and Installation Information provided,
-in accord with this section must be in a format that is publicly
-documented (and with an implementation available to the public in
-source code form), and must require no special password or key for
-unpacking, reading or copying.
-
- 7. Additional Terms.
-
- "Additional permissions" are terms that supplement the terms of this
-License by making exceptions from one or more of its conditions.
-Additional permissions that are applicable to the entire Program shall
-be treated as though they were included in this License, to the extent
-that they are valid under applicable law. If additional permissions
-apply only to part of the Program, that part may be used separately
-under those permissions, but the entire Program remains governed by
-this License without regard to the additional permissions.
-
- When you convey a copy of a covered work, you may at your option
-remove any additional permissions from that copy, or from any part of
-it. (Additional permissions may be written to require their own
-removal in certain cases when you modify the work.) You may place
-additional permissions on material, added by you to a covered work,
-for which you have or can give appropriate copyright permission.
-
- Notwithstanding any other provision of this License, for material you
-add to a covered work, you may (if authorized by the copyright holders of
-that material) supplement the terms of this License with terms:
-
- a) Disclaiming warranty or limiting liability differently from the
- terms of sections 15 and 16 of this License; or
-
- b) Requiring preservation of specified reasonable legal notices or
- author attributions in that material or in the Appropriate Legal
- Notices displayed by works containing it; or
-
- c) Prohibiting misrepresentation of the origin of that material, or
- requiring that modified versions of such material be marked in
- reasonable ways as different from the original version; or
-
- d) Limiting the use for publicity purposes of names of licensors or
- authors of the material; or
-
- e) Declining to grant rights under trademark law for use of some
- trade names, trademarks, or service marks; or
-
- f) Requiring indemnification of licensors and authors of that
- material by anyone who conveys the material (or modified versions of
- it) with contractual assumptions of liability to the recipient, for
- any liability that these contractual assumptions directly impose on
- those licensors and authors.
-
- All other non-permissive additional terms are considered "further
-restrictions" within the meaning of section 10. If the Program as you
-received it, or any part of it, contains a notice stating that it is
-governed by this License along with a term that is a further
-restriction, you may remove that term. If a license document contains
-a further restriction but permits relicensing or conveying under this
-License, you may add to a covered work material governed by the terms
-of that license document, provided that the further restriction does
-not survive such relicensing or conveying.
-
- If you add terms to a covered work in accord with this section, you
-must place, in the relevant source files, a statement of the
-additional terms that apply to those files, or a notice indicating
-where to find the applicable terms.
-
- Additional terms, permissive or non-permissive, may be stated in the
-form of a separately written license, or stated as exceptions;
-the above requirements apply either way.
-
- 8. Termination.
-
- You may not propagate or modify a covered work except as expressly
-provided under this License. Any attempt otherwise to propagate or
-modify it is void, and will automatically terminate your rights under
-this License (including any patent licenses granted under the third
-paragraph of section 11).
-
- However, if you cease all violation of this License, then your
-license from a particular copyright holder is reinstated (a)
-provisionally, unless and until the copyright holder explicitly and
-finally terminates your license, and (b) permanently, if the copyright
-holder fails to notify you of the violation by some reasonable means
-prior to 60 days after the cessation.
-
- Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.
-
- Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License. If your rights have been terminated and not permanently
-reinstated, you do not qualify to receive new licenses for the same
-material under section 10.
-
- 9. Acceptance Not Required for Having Copies.
-
- You are not required to accept this License in order to receive or
-run a copy of the Program. Ancillary propagation of a covered work
-occurring solely as a consequence of using peer-to-peer transmission
-to receive a copy likewise does not require acceptance. However,
-nothing other than this License grants you permission to propagate or
-modify any covered work. These actions infringe copyright if you do
-not accept this License. Therefore, by modifying or propagating a
-covered work, you indicate your acceptance of this License to do so.
-
- 10. Automatic Licensing of Downstream Recipients.
-
- Each time you convey a covered work, the recipient automatically
-receives a license from the original licensors, to run, modify and
-propagate that work, subject to this License. You are not responsible
-for enforcing compliance by third parties with this License.
-
- An "entity transaction" is a transaction transferring control of an
-organization, or substantially all assets of one, or subdividing an
-organization, or merging organizations. If propagation of a covered
-work results from an entity transaction, each party to that
-transaction who receives a copy of the work also receives whatever
-licenses to the work the party's predecessor in interest had or could
-give under the previous paragraph, plus a right to possession of the
-Corresponding Source of the work from the predecessor in interest, if
-the predecessor has it or can get it with reasonable efforts.
-
- You may not impose any further restrictions on the exercise of the
-rights granted or affirmed under this License. For example, you may
-not impose a license fee, royalty, or other charge for exercise of
-rights granted under this License, and you may not initiate litigation
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-any patent claim is infringed by making, using, selling, offering for
-sale, or importing the Program or any portion of it.
-
- 11. Patents.
-
- A "contributor" is a copyright holder who authorizes use under this
-License of the Program or a work on which the Program is based. The
-work thus licensed is called the contributor's "contributor version".
-
- A contributor's "essential patent claims" are all patent claims
-owned or controlled by the contributor, whether already acquired or
-hereafter acquired, that would be infringed by some manner, permitted
-by this License, of making, using, or selling its contributor version,
-but do not include claims that would be infringed only as a
-consequence of further modification of the contributor version. For
-purposes of this definition, "control" includes the right to grant
-patent sublicenses in a manner consistent with the requirements of
-this License.
-
- Each contributor grants you a non-exclusive, worldwide, royalty-free
-patent license under the contributor's essential patent claims, to
-make, use, sell, offer for sale, import and otherwise run, modify and
-propagate the contents of its contributor version.
-
- In the following three paragraphs, a "patent license" is any express
-agreement or commitment, however denominated, not to enforce a patent
-(such as an express permission to practice a patent or covenant not to
-sue for patent infringement). To "grant" such a patent license to a
-party means to make such an agreement or commitment not to enforce a
-patent against the party.
-
- If you convey a covered work, knowingly relying on a patent license,
-and the Corresponding Source of the work is not available for anyone
-to copy, free of charge and under the terms of this License, through a
-publicly available network server or other readily accessible means,
-then you must either (1) cause the Corresponding Source to be so
-available, or (2) arrange to deprive yourself of the benefit of the
-patent license for this particular work, or (3) arrange, in a manner
-consistent with the requirements of this License, to extend the patent
-license to downstream recipients. "Knowingly relying" means you have
-actual knowledge that, but for the patent license, your conveying the
-covered work in a country, or your recipient's use of the covered work
-in a country, would infringe one or more identifiable patents in that
-country that you have reason to believe are valid.
-
- If, pursuant to or in connection with a single transaction or
-arrangement, you convey, or propagate by procuring conveyance of, a
-covered work, and grant a patent license to some of the parties
-receiving the covered work authorizing them to use, propagate, modify
-or convey a specific copy of the covered work, then the patent license
-you grant is automatically extended to all recipients of the covered
-work and works based on it.
-
- A patent license is "discriminatory" if it does not include within
-the scope of its coverage, prohibits the exercise of, or is
-conditioned on the non-exercise of one or more of the rights that are
-specifically granted under this License. You may not convey a covered
-work if you are a party to an arrangement with a third party that is
-in the business of distributing software, under which you make payment
-to the third party based on the extent of your activity of conveying
-the work, and under which the third party grants, to any of the
-parties who would receive the covered work from you, a discriminatory
-patent license (a) in connection with copies of the covered work
-conveyed by you (or copies made from those copies), or (b) primarily
-for and in connection with specific products or compilations that
-contain the covered work, unless you entered into that arrangement,
-or that patent license was granted, prior to 28 March 2007.
-
- Nothing in this License shall be construed as excluding or limiting
-any implied license or other defenses to infringement that may
-otherwise be available to you under applicable patent law.
-
- 12. No Surrender of Others' Freedom.
-
- If conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot convey a
-covered work so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you may
-not convey it at all. For example, if you agree to terms that obligate you
-to collect a royalty for further conveying from those to whom you convey
-the Program, the only way you could satisfy both those terms and this
-License would be to refrain entirely from conveying the Program.
-
- 13. Use with the GNU Affero General Public License.
-
- Notwithstanding any other provision of this License, you have
-permission to link or combine any covered work with a work licensed
-under version 3 of the GNU Affero General Public License into a single
-combined work, and to convey the resulting work. The terms of this
-License will continue to apply to the part which is the covered work,
-but the special requirements of the GNU Affero General Public License,
-section 13, concerning interaction through a network will apply to the
-combination as such.
-
- 14. Revised Versions of this License.
-
- The Free Software Foundation may publish revised and/or new versions of
-the GNU General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
- Each version is given a distinguishing version number. If the
-Program specifies that a certain numbered version of the GNU General
-Public License "or any later version" applies to it, you have the
-option of following the terms and conditions either of that numbered
-version or of any later version published by the Free Software
-Foundation. If the Program does not specify a version number of the
-GNU General Public License, you may choose any version ever published
-by the Free Software Foundation.
-
- If the Program specifies that a proxy can decide which future
-versions of the GNU General Public License can be used, that proxy's
-public statement of acceptance of a version permanently authorizes you
-to choose that version for the Program.
-
- Later license versions may give you additional or different
-permissions. However, no additional obligations are imposed on any
-author or copyright holder as a result of your choosing to follow a
-later version.
-
- 15. Disclaimer of Warranty.
-
- THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
-APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
-HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
-OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
-IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
-ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. Limitation of Liability.
-
- IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
-THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
-GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
-USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
-DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
-PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGES.
-
- 17. Interpretation of Sections 15 and 16.
-
- If the disclaimer of warranty and limitation of liability provided
-above cannot be given local legal effect according to their terms,
-reviewing courts shall apply local law that most closely approximates
-an absolute waiver of all civil liability in connection with the
-Program, unless a warranty or assumption of liability accompanies a
-copy of the Program in return for a fee.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-state the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
-
- Copyright (C)
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
-
-Also add information on how to contact you by electronic and paper mail.
-
- If the program does terminal interaction, make it output a short
-notice like this when it starts in an interactive mode:
-
- Copyright (C)
- This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, your program's commands
-might be different; for a GUI interface, you would use an "about box".
-
- You should also get your employer (if you work as a programmer) or school,
-if any, to sign a "copyright disclaimer" for the program, if necessary.
-For more information on this, and how to apply and follow the GNU GPL, see
-.
-
- The GNU General Public License does not permit incorporating your program
-into proprietary programs. If your program is a subroutine library, you
-may consider it more useful to permit linking proprietary applications with
-the library. If this is what you want to do, use the GNU Lesser General
-Public License instead of this License. But first, please read
-.
+Copyright (C) 2016 Micah Lee
+
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc.
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+
+ Copyright (C)
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ Copyright (C)
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+.
diff --git a/resources/locale/cs.json b/resources/locale/cs.json
index 8ac426e4..f33491cf 100644
--- a/resources/locale/cs.json
+++ b/resources/locale/cs.json
@@ -1,9 +1,9 @@
{
- "connecting_ctrlport": "Připojuju se na kontrolní port Toru pro nastavení hidden service na portu {0:d}.",
+ "connecting_ctrlport": "Připojuju se na kontrolní port Toru pro nastavení onion service na portu {0:d}.",
"cant_connect_ctrlport": "Nejde se připojit na kontrolní port Toru na portu {0:s}. OnionShare vyžaduje, aby Tor Browser běžel na pozadí. Pokud ho nemáte, můžete ho stáhnout z https://www.torproject.org/.",
"cant_connect_socksport": "Nejde se připojit na Tor SOCKS5 server na portu {0:s}. OnionShare vyžaduje, aby Tor Browser běžel na pozadí. Pokud ho nemáte, můžete ho stáhnout z https://www.torproject.org/.",
"preparing_files": "Připravuji soubory na sdílení.",
- "wait_for_hs": "Čekám až bude hidden service připravena:",
+ "wait_for_hs": "Čekám až bude onion service připravena:",
"wait_for_hs_trying": "Zkouším...",
"wait_for_hs_nope": "Ještě nepřipraven.",
"wait_for_hs_yup": "Připraven!",
@@ -17,9 +17,9 @@
"large_filesize": "Varování: Posílání velkých souborů může trvat hodiny",
"error_tails_invalid_port": "Nesprávná hodnota, port musí být celé číslo",
"error_tails_unknown_root": "Unknown error with Tails root process",
- "help_tails_port": "Tails only: port for opening firewall, starting hidden service",
+ "help_tails_port": "Tails only: port for opening firewall, starting onion service",
"help_local_only": "Nepoužívat Tor: jen pro vývoj",
- "help_stay_open": "Nechat běžet hidden service po skončení stahování",
+ "help_stay_open": "Nechat běžet onion service po skončení stahování",
"help_transparent_torification": "My system is transparently torified",
"help_debug": "Zaznamenat chyby na disk",
"help_filename": "Seznam souborů a složek ke sdílení",
@@ -35,11 +35,11 @@
"gui_downloads": "Stahování:",
"gui_canceled": "Zrušeno",
"gui_copied_url": "URL zkopírováno do schránky",
- "gui_starting_server1": "Spouštím Tor hidden service...",
+ "gui_starting_server1": "Spouštím Tor onion service...",
"gui_starting_server2": "Crunching files...",
- "gui_starting_server3": "Čekám na Tor hidden service...",
+ "gui_starting_server3": "Čekám na Tor onion service...",
"gui_please_wait": "Prosím čekejte...",
- "error_hs_dir_cannot_create": "Nejde vytvořit složka {0:s} pro hidden service",
- "error_hs_dir_not_writable": "Nejde zapisovat do složky {0:s} pro hidden service",
- "using_ephemeral": "Staring ephemeral Tor hidden service and awaiting publication"
+ "error_hs_dir_cannot_create": "Nejde vytvořit složka {0:s} pro onion service",
+ "error_hs_dir_not_writable": "Nejde zapisovat do složky {0:s} pro onion service",
+ "using_ephemeral": "Staring ephemeral Tor onion service and awaiting publication"
}
diff --git a/resources/locale/de.json b/resources/locale/de.json
index 6960c257..10caa62a 100644
--- a/resources/locale/de.json
+++ b/resources/locale/de.json
@@ -17,9 +17,9 @@
"large_filesize": "Warnung: Das Senden von großen Dateien kann Stunden dauern",
"error_tails_invalid_port": "Ungültiger Wert, Port muss eine ganze Zahl sein",
"error_tails_unknown_root": "Unbekannter Fehler mit Tails root Prozess",
- "help_tails_port": "Nur für Tails: Port um den Firewall zu öffnen, starte Hidden Service",
+ "help_tails_port": "Nur für Tails: Port um den Firewall zu öffnen, starte onion service",
"help_local_only": "Nicht mit Tor benutzen, nur für Entwicklung",
- "help_stay_open": "Den Hidden Service nicht anhalten nachdem ein Download beendet wurde",
+ "help_stay_open": "Den onion service nicht anhalten nachdem ein Download beendet wurde",
"help_debug": "Fehler auf Festplatte schreiben",
"help_filename": "Liste der zu teilenden Dateien oder Verzeichnisse",
"gui_drag_and_drop": "Drag & drop\nDateien hier",
diff --git a/resources/locale/en.json b/resources/locale/en.json
index 88a0cbb3..b35cf178 100644
--- a/resources/locale/en.json
+++ b/resources/locale/en.json
@@ -1,5 +1,5 @@
{
- "connecting_ctrlport": "Connecting to Tor control port to set up hidden service on port {0:d}.",
+ "connecting_ctrlport": "Connecting to Tor control port to set up onion service on port {0:d}.",
"cant_connect_ctrlport": "Can't connect to Tor control port on port {0:s}. OnionShare requires Tor Browser to be running in the background to work. If you don't have it you can get it from https://www.torproject.org/.",
"cant_connect_socksport": "Can't connect to Tor SOCKS5 server on port {0:s}. OnionShare requires Tor Browser to be running in the background to work. If you don't have it you can get it from https://www.torproject.org/.",
"preparing_files": "Preparing files to share.",
@@ -17,9 +17,9 @@
"large_filesize": "Warning: Sending large files could take hours",
"error_tails_invalid_port": "Invalid value, port must be an integer",
"error_tails_unknown_root": "Unknown error with Tails root process",
- "help_tails_port": "Tails only: port for opening firewall, starting hidden service",
+ "help_tails_port": "Tails only: port for opening firewall, starting onion service",
"help_local_only": "Do not attempt to use tor: for development only",
- "help_stay_open": "Keep hidden service running after download has finished",
+ "help_stay_open": "Keep onion service running after download has finished",
"help_transparent_torification": "My system is transparently torified",
"help_debug": "Log errors to disk",
"help_filename": "List of files or folders to share",
@@ -35,13 +35,13 @@
"gui_downloads": "Downloads:",
"gui_canceled": "Canceled",
"gui_copied_url": "Copied URL to clipboard",
- "gui_starting_server1": "Starting Tor hidden service...",
+ "gui_starting_server1": "Starting Tor onion service...",
"gui_starting_server2": "Crunching files...",
- "gui_starting_server3": "Waiting for Tor hidden service...",
+ "gui_starting_server3": "Waiting for Tor onion service...",
"gui_please_wait": "Please wait...",
- "error_hs_dir_cannot_create": "Cannot create hidden service dir {0:s}",
- "error_hs_dir_not_writable": "Hidden service dir {0:s} is not writable",
- "using_ephemeral": "Staring ephemeral Tor hidden service and awaiting publication",
+ "error_hs_dir_cannot_create": "Cannot create onion service dir {0:s}",
+ "error_hs_dir_not_writable": "onion service dir {0:s} is not writable",
+ "using_ephemeral": "Staring ephemeral Tor onion service and awaiting publication",
"gui_download_progress_complete": "%p%, Time Elapsed: {0:s}",
"gui_download_progress_starting": "{0:s}, %p% (Computing ETA)",
"gui_download_progress_eta": "{0:s}, ETA: {1:s}, %p%",
diff --git a/resources/locale/eo.json b/resources/locale/eo.json
index 5970ab95..ae37656e 100644
--- a/resources/locale/eo.json
+++ b/resources/locale/eo.json
@@ -1,5 +1,5 @@
{
- "connecting_ctrlport": "Konektas al Tor-kontrolpordo por starigi hidden service je pordo {0:d}.",
+ "connecting_ctrlport": "Konektas al Tor-kontrolpordo por starigi onion service je pordo {0:d}.",
"cant_connect_ctrlport": "Ne eblas konekti al Tor-kontrolpordo je pordo {0:s}. OnionShare bezonas Tor Browser por esti ŝaltita en la fono. Se vi ne havas ĝin, vi povas ricevi ĝin je https://www.torproject.org/.",
"cant_connect_socksport": "Ne eblas konekti al Tor-SOCKS5-servilo je pordo {0:s}. OnionShare bezonas Tor Browser por esti ŝaltita en la fono. Se vi ne havas ĝin, vi povas ricevi ĝin je https://www.torproject.org/.",
"preparing_files": "Preparas dosierojn por kundivido.",
@@ -17,9 +17,9 @@
"large_filesize": "Atentigo: Sendado de grandaj dosieroj povas daŭri horojn",
"error_tails_invalid_port": "Malĝusta valoro, pordo devas esti plena nombro",
"error_tails_unknown_root": "Nekonata eraro kun Tails-root-procezo",
- "help_tails_port": "Tails only: port for opening firewall, starting hidden service",
+ "help_tails_port": "Tails only: port for opening firewall, starting onion service",
"help_local_only": "Ne strebu uzi tor: nur por evoluado",
- "help_stay_open": "Lasu hidden service funkcii post fino de elŝuto",
+ "help_stay_open": "Lasu onion service funkcii post fino de elŝuto",
"help_transparent_torification": "My system is transparently torified",
"help_debug": "Protokoli erarojn sur diskon",
"help_filename": "Listo de dosieroj aŭ dosierujoj por kundividi",
@@ -35,11 +35,11 @@
"gui_downloads": "Elŝutoj:",
"gui_canceled": "Nuligita",
"gui_copied_url": "URL kopiita en tondujon",
- "gui_starting_server1": "Startigas Tor hidden service...",
+ "gui_starting_server1": "Startigas Tor onion service...",
"gui_starting_server2": "Crunching files...",
- "gui_starting_server3": "Atendas por Tor hidden service...",
+ "gui_starting_server3": "Atendas por Tor onion service...",
"gui_please_wait": "Bonvolu atendi...",
"error_hs_dir_cannot_create": "Ne eblas krei hidden-service-dosierujon {0:s}",
"error_hs_dir_not_writable": "Ne eblas konservi dosierojn en hidden-service-dosierujo {0:s}",
- "using_ephemeral": "Staring ephemeral Tor hidden service and awaiting publication"
+ "using_ephemeral": "Staring ephemeral Tor onion service and awaiting publication"
}
diff --git a/resources/locale/es.json b/resources/locale/es.json
index 61f38d24..79dd8023 100644
--- a/resources/locale/es.json
+++ b/resources/locale/es.json
@@ -15,10 +15,10 @@
"close_on_finish": "Apagar el servidor automáticamente.",
"closing_automatically": "Apagando automáticamente porque la descarga finalizó",
"error_tails_invalid_port": "Valor inválido, el puerto debe ser un entero",
- "error_tails_unknown_root": "Error desconocido en el proceso de Tails corriendo como root",
+ "error_tails_unknown_root": "Error desconocido en el proceso de Tails ejecutando como roo",
"help_tails_port": "Sólo Tails: puerto para abrir en el firewall, al levantar el servicio oculto",
- "help_local_only": "No intentar usar tor: para desarrollo solamente",
- "help_stay_open": "Mantener el servicio oculto corriendo después de que la descarga haya finalizado",
+ "help_local_only": "No intentar usar Tor: sólo para desarrollo",
+ "help_stay_open": "Mantener el servicio oculto ejecutando después de que la descarga haya finalizado",
"help_debug": "Guardar registro de errores en el disco",
"help_filename": "Lista de archivos o carpetas para compartir",
"gui_drag_and_drop": "Arrastre\narchivos aquí",
diff --git a/resources/locale/fr.json b/resources/locale/fr.json
index f286d740..b38653c1 100644
--- a/resources/locale/fr.json
+++ b/resources/locale/fr.json
@@ -1,5 +1,5 @@
{
- "connecting_ctrlport": "Connexion au réseau Tor pour mettre en place un Hidden Service sur le port {0:d}.",
+ "connecting_ctrlport": "Connexion au réseau Tor pour mettre en place un onion service sur le port {0:d}.",
"cant_connect_ctrlport": "Impossible de se connecter au port de contrôle Tor sur le port {0:s}. Est-ce que Tor tourne ?",
"preparing_files": "Préparation des fichiers à partager.",
"wait_for_hs": "En attente du HS:",
@@ -15,9 +15,9 @@
"closing_automatically": "Fermeture automatique car le téléchargement est fini",
"error_tails_invalid_port": "Valeur invalide, le port doit être un nombre entier",
"error_tails_unknown_root": "Erreur inconnue avec un processus root sur Tails",
- "help_tails_port": "Seulement sur Tails: port pour ouvrir le firewall, démarrage du Hidden Service",
+ "help_tails_port": "Seulement sur Tails: port pour ouvrir le firewall, démarrage du onion service",
"help_local_only": "Ne tentez pas d'utiliser Tor, uniquement pour développement",
- "help_stay_open": "Laisser tourner le Hidden Service après que le téléchargment soit fini",
+ "help_stay_open": "Laisser tourner le onion service après que le téléchargment soit fini",
"help_debug": "Enregistrer les erreurs sur le disque",
"help_filename": "Liste des fichiers ou dossiers à partager",
"gui_drag_and_drop": "Glissez déposez\nles fichiers ici",
diff --git a/resources/locale/nl.json b/resources/locale/nl.json
index 5da91706..ced76f01 100644
--- a/resources/locale/nl.json
+++ b/resources/locale/nl.json
@@ -35,11 +35,11 @@
"gui_downloads": "Downloads:",
"gui_canceled": "Afgebroken",
"gui_copied_url": "URL gekopieerd naar klembord",
- "gui_starting_server1": "Tor hidden service wordt gestart...",
+ "gui_starting_server1": "Tor onion service wordt gestart...",
"gui_starting_server2": "Bestanden verwerken...",
- "gui_starting_server3": "Wachten op Tor hidden service...",
+ "gui_starting_server3": "Wachten op Tor onion service...",
"gui_please_wait": "Moment geduld...",
"error_hs_dir_cannot_create": "Kan verborgen service map {0:s} niet aanmaken",
"error_hs_dir_not_writable": "Verborgen service map {0:s} is niet schrijfbaar",
- "using_ephemeral": "Kortstondige Tor hidden service gestart en in afwachting van publicatie"
+ "using_ephemeral": "Kortstondige Tor onion service gestart en in afwachting van publicatie"
}
diff --git a/resources/locale/tr.json b/resources/locale/tr.json
index 242f5038..3b777b9d 100644
--- a/resources/locale/tr.json
+++ b/resources/locale/tr.json
@@ -17,7 +17,7 @@
"large_filesize": "Uyarı: Büyük dosyaların gönderimi saatler sürebilir",
"error_tails_invalid_port": "Geçersiz değer, port sayı olmalıdır",
"error_tails_unknown_root": "Tails ana işlemi ile ilgili bilinmeyen hata",
- "help_tails_port": "Sadece Tails: port for opening firewall, starting hidden service",
+ "help_tails_port": "Sadece Tails: port for opening firewall, starting onion service",
"help_local_only": "Tor kullanmaya kalkışmayın: sadece geliştirme için",
"help_stay_open": "İndirme tamamlandıktan sonra gizli hizmeti çalıştırmaya devam et",
"help_transparent_torification": "Sistemim apaçık torlu",
diff --git a/resources/version.txt b/resources/version.txt
index b63ba696..dc9bff91 100644
--- a/resources/version.txt
+++ b/resources/version.txt
@@ -1 +1 @@
-0.9
+0.9.1-dev
diff --git a/setup.py b/setup.py
index 8ae56fe9..40623c73 100644
--- a/setup.py
+++ b/setup.py
@@ -19,12 +19,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
"""
-import os, sys
-
-try:
- from setuptools import setup
-except ImportError:
- from distutils.core import setup
+import os, sys, platform, tempfile
def file_list(path):
files = []
@@ -34,72 +29,120 @@ def file_list(path):
return files
version = open('resources/version.txt').read().strip()
-
description = (
"""OnionShare lets you securely and anonymously share a file of any size with someone. """
"""It works by starting a web server, making it accessible as a Tor hidden service, """
"""and generating an unguessable URL to access and download the file.""")
-
long_description = description + " " + (
"""It doesn't require setting up a server on the internet somewhere or using a third """
"""party filesharing service. You host the file on your own computer and use a Tor """
"""hidden service to make it temporarily accessible over the internet. The other user """
"""just needs to use Tor Browser to download the file from you."""
)
+author = 'Micah Lee'
+author_email = 'micah@micahflee.com'
+url = 'https://github.com/micahflee/onionshare'
+license = 'GPL v3'
+keywords = 'onion, share, onionshare, tor, anonymous, web server'
-images = [
- 'resources/images/logo.png',
- 'resources/images/drop_files.png',
- 'resources/images/server_stopped.png',
- 'resources/images/server_started.png',
- 'resources/images/server_working.png'
-]
+p = platform.system()
-locale = [
- 'resources/locale/cs.json',
- 'resources/locale/de.json',
- 'resources/locale/en.json',
- 'resources/locale/eo.json',
- 'resources/locale/es.json',
- 'resources/locale/fi.json',
- 'resources/locale/fr.json',
- 'resources/locale/it.json',
- 'resources/locale/nl.json',
- 'resources/locale/no.json',
- 'resources/locale/pt.json',
- 'resources/locale/ru.json',
- 'resources/locale/tr.json'
-]
+# Windows and Mac
+if p == 'Windows' or p == 'Darwin':
+ from cx_Freeze import setup, Executable
-html = [
- 'resources/html/index.html',
- 'resources/html/denied.html',
- 'resources/html/404.html'
-]
+ if p == 'Windows':
+ executables = [
+ Executable('install/scripts/onionshare',
+ icon='install/onionshare.ico',
+ base=None),
+ Executable('install/scripts/onionshare-gui',
+ icon='install/onionshare.ico',
+ shortcutName='OnionShare',
+ shortcutDir='ProgramMenuFolder',
+ base='Win32GUI')
+ ]
+ custom_info_plist = ''
-setup(
- name='onionshare',
- version=version,
- description=description,
- long_description=long_description,
- author='Micah Lee',
- author_email='micah@micahflee.com',
- url='https://github.com/micahflee/onionshare',
- license="GPL v3",
- keywords='onion, share, onionshare, tor, anonymous, web server',
- packages=['onionshare', 'onionshare_gui'],
- include_package_data=True,
- scripts=['install/scripts/onionshare', 'install/scripts/onionshare-gui'],
- data_files=[
- (os.path.join(sys.prefix, 'share/applications'), ['install/onionshare.desktop']),
- (os.path.join(sys.prefix, 'share/appdata'), ['install/onionshare.appdata.xml']),
- (os.path.join(sys.prefix, 'share/pixmaps'), ['install/onionshare80.xpm']),
- (os.path.join(sys.prefix, 'share/onionshare'), [
- 'resources/version.txt',
- 'resources/wordlist.txt'
- ]),
- (os.path.join(sys.prefix, 'share/onionshare/images'), images),
- (os.path.join(sys.prefix, 'share/onionshare/locale'), locale),
- (os.path.join(sys.prefix, 'share/onionshare/html'), html)
- ]
-)
+ elif p == 'Darwin':
+ executables = [
+ Executable('install/scripts/onionshare-gui'),
+ Executable('install/scripts/onionshare')
+ ]
+
+ # Write the correct version into Info.plist
+ f = tempfile.NamedTemporaryFile(mode='w')
+ custom_info_plist = f.name
+ f.write(open('install/Info.plist').read().replace('{VERSION}', str(version)))
+ f.flush()
+
+ setup(
+ name='OnionShare', version=version,
+ description=description, long_description=long_description,
+ author=author, author_email=author_email,
+ url=url, license=license, keywords=keywords,
+ options={
+ 'build_exe': {
+ 'packages': ['jinja2.ext'],
+ 'excludes': [],
+ 'include_files': ['resources']
+ },
+ 'bdist_mac': {
+ 'iconfile': 'install/onionshare.icns',
+ 'bundle_name': 'OnionShare',
+ 'qt_menu_nib': '/usr/local/Cellar/qt5/5.6.1-1/plugins/platforms',
+ 'custom_info_plist': custom_info_plist
+ }
+ },
+ executables=executables
+ )
+
+# Linux
+else:
+ from setuptools import setup
+ setup(
+ name='onionshare', version=version,
+ description=description, long_description=long_description,
+ author=author, author_email=author_email,
+ url=url, license=license, keywords=keywords,
+ packages=['onionshare', 'onionshare_gui'],
+ include_package_data=True,
+ scripts=['install/scripts/onionshare', 'install/scripts/onionshare-gui'],
+ data_files=[
+ (os.path.join(sys.prefix, 'share/applications'), ['install/onionshare.desktop']),
+ (os.path.join(sys.prefix, 'share/appdata'), ['install/onionshare.appdata.xml']),
+ (os.path.join(sys.prefix, 'share/pixmaps'), ['install/onionshare80.xpm']),
+ (os.path.join(sys.prefix, 'share/onionshare'), [
+ 'resources/version.txt',
+ 'resources/wordlist.txt'
+ ]),
+ (os.path.join(sys.prefix, 'share/onionshare/images'), [
+ 'resources/images/logo.png',
+ 'resources/images/drop_files.png',
+ 'resources/images/server_stopped.png',
+ 'resources/images/server_started.png',
+ 'resources/images/server_working.png'
+ ]),
+ (os.path.join(sys.prefix, 'share/onionshare/locale'), [
+ 'resources/locale/cs.json',
+ 'resources/locale/de.json',
+ 'resources/locale/en.json',
+ 'resources/locale/eo.json',
+ 'resources/locale/es.json',
+ 'resources/locale/fi.json',
+ 'resources/locale/fr.json',
+ 'resources/locale/it.json',
+ 'resources/locale/nl.json',
+ 'resources/locale/no.json',
+ 'resources/locale/pt.json',
+ 'resources/locale/ru.json',
+ 'resources/locale/tr.json'
+ ]),
+ (os.path.join(sys.prefix, 'share/onionshare/html'), [
+ 'resources/html/index.html',
+ 'resources/html/denied.html',
+ 'resources/html/404.html'
+ ]),
+ ('/usr/share/nautilus-python/extensions/', ['install/scripts/onionshare-nautilus.py']),
+ ]
+ )
diff --git a/stdeb.cfg b/stdeb.cfg
index 50ebaf75..4dc410b7 100644
--- a/stdeb.cfg
+++ b/stdeb.cfg
@@ -1,6 +1,7 @@
[DEFAULT]
Package3: onionshare
-Depends3: python3-flask, python3-stem, python3-pyqt5
-Build-Depends3: python3-nose
-Suite: trusty utopic vivid wily xenial jessie
+Depends3: python3-flask, python3-stem, python3-pyqt5, python-nautilus
+Build-Depends3: python3-nose, python3-flask, python3-stem, python3-pyqt5
+Build-Depends: python3-nose, python3-flask, python3-stem, python3-pyqt5
+Suite: wily
X-Python3-Version: >= 3.2
diff --git a/test/onionshare_helpers_test.py b/test/onionshare_helpers_test.py
index b5c16ffe..d8e896c4 100644
--- a/test/onionshare_helpers_test.py
+++ b/test/onionshare_helpers_test.py
@@ -17,9 +17,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
"""
from onionshare import helpers
-from nose import with_setup
-import test_helpers
def test_get_platform_returns_platform_system():
"""get_platform() returns platform.system() when ONIONSHARE_PLATFORM is not defined"""
diff --git a/test/onionshare_strings_test.py b/test/onionshare_strings_test.py
index 250df28f..7b588f29 100644
--- a/test/onionshare_strings_test.py
+++ b/test/onionshare_strings_test.py
@@ -17,10 +17,15 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
"""
-import locale
-from onionshare import strings
-from nose import with_setup
+import locale, os
+from onionshare import helpers, strings
+# Stub get_resource_path so it finds the correct path while running tests
+def get_resource_path(filename):
+ resources_dir = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'resources')
+ path = os.path.join(resources_dir, filename)
+ return path
+helpers.get_resource_path = get_resource_path
def test_starts_with_empty_strings():
"""creates an empty strings dict by default"""
@@ -30,12 +35,12 @@ def test_starts_with_empty_strings():
def test_load_strings_defaults_to_english():
"""load_strings() loads English by default"""
locale.getdefaultlocale = lambda: ('en_US', 'UTF-8')
- strings.load_strings()
+ strings.load_strings(helpers)
assert strings._('wait_for_hs') == "Waiting for HS to be ready:"
def test_load_strings_loads_other_languages():
"""load_strings() loads other languages in different locales"""
locale.getdefaultlocale = lambda: ('fr_FR', 'UTF-8')
- strings.load_strings("fr")
+ strings.load_strings(helpers, "fr")
assert strings._('wait_for_hs') == "En attente du HS:"
diff --git a/test/onionshare_test.py b/test/onionshare_test.py
index 20a00227..a0c77fa9 100644
--- a/test/onionshare_test.py
+++ b/test/onionshare_test.py
@@ -18,7 +18,6 @@ along with this program. If not, see .
"""
import socket
from onionshare import OnionShare
-from nose import with_setup
def test_choose_port_returns_a_port_number():
diff --git a/test/test_helpers.py b/test/test_helpers.py
index 2ddc1e13..b07021c5 100644
--- a/test/test_helpers.py
+++ b/test/test_helpers.py
@@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
"""
import tempfile
+import os
class MockSubprocess():
@@ -31,9 +32,7 @@ class MockSubprocess():
def write_tempfile(text):
- tempdir = tempfile.mkdtemp()
- path = tempdir + "/test-file.txt"
+ path = os.path.join(tempfile.mkdtemp(), "/test-file.txt")
with open(path, "w") as f:
f.write(text)
- f.close()
return path