mirror of
https://github.com/onionshare/onionshare.git
synced 2024-10-01 01:35:40 -04:00
Merge branch 'develop' into 663_zip_away
This commit is contained in:
commit
017a4ebe31
4
BUILD.md
4
BUILD.md
@ -11,11 +11,11 @@ cd onionshare
|
||||
|
||||
Install the needed dependencies:
|
||||
|
||||
For Debian-like distros: `apt install -y build-essential fakeroot python3-all python3-stdeb dh-python python3-flask python3-stem python3-pyqt5 python-nautilus python3-pytest tor obfs4proxy python3-cryptography python3-crypto python3-nacl python3-pip python3-socks python3-sha3`
|
||||
For Debian-like distros: `apt install -y python3-flask python3-stem python3-pyqt5 python3-cryptography python3-crypto python3-nacl python3-socks python-nautilus tor obfs4proxy python3-pytest build-essential fakeroot python3-all python3-stdeb dh-python`
|
||||
|
||||
On some older versions of Debian you may need to install pysha3 with `pip3 install pysha3` if python3-sha3 is not available.
|
||||
|
||||
For Fedora-like distros: `dnf install -y rpm-build python3-flask python3-stem python3-qt5 python3-pytest nautilus-python tor obfs4 python3-pynacl python3-cryptography python3-crypto python3-pip python3-pysocks`
|
||||
For Fedora-like distros: `dnf install -y python3-flask python3-stem python3-qt5 python3-pynacl python3-cryptography python3-crypto python3-pysocks nautilus-python tor obfs4 python3-pytest rpm-build`
|
||||
|
||||
After that you can try both the CLI and the GUI version of OnionShare:
|
||||
|
||||
|
@ -9,7 +9,7 @@ VERSION=`cat share/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, nautilus-python, tor, obfs4"
|
||||
python3 setup.py bdist_rpm --requires="python3-flask, python3-stem, python3-qt5, python3-pynacl, python3-cryptography, python3-crypto, python3-pysocks, nautilus-python, tor, obfs4"
|
||||
|
||||
# install it
|
||||
echo ""
|
||||
|
@ -72,7 +72,7 @@ def main(cwd=None):
|
||||
|
||||
# Make sure filenames given if not using receiver mode
|
||||
if mode == 'share' and len(filenames) == 0:
|
||||
print(strings._('no_filenames'))
|
||||
parser.print_help()
|
||||
sys.exit()
|
||||
|
||||
# Validate filenames
|
||||
|
@ -427,7 +427,6 @@ class Onion(object):
|
||||
raise TorTooOld(strings._('error_stealth_not_supported'))
|
||||
|
||||
print(strings._("config_onion_service").format(int(port)))
|
||||
print(strings._('using_ephemeral'))
|
||||
|
||||
if self.stealth:
|
||||
if self.settings.get('hidservauth_string'):
|
||||
|
@ -18,7 +18,11 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
"""
|
||||
from __future__ import division
|
||||
import os, sys, platform, argparse
|
||||
import os
|
||||
import sys
|
||||
import platform
|
||||
import argparse
|
||||
import signal
|
||||
from .widgets import Alert
|
||||
from PyQt5 import QtCore, QtWidgets
|
||||
|
||||
@ -58,6 +62,10 @@ def main():
|
||||
strings.load_strings(common)
|
||||
print(strings._('version_string').format(common.version))
|
||||
|
||||
# Allow Ctrl-C to smoothly quit the program instead of throwing an exception
|
||||
# https://stackoverflow.com/questions/42814093/how-to-handle-ctrlc-in-python-app-with-pyqt
|
||||
signal.signal(signal.SIGINT, signal.SIG_DFL)
|
||||
|
||||
# Start the Qt app
|
||||
global qtapp
|
||||
qtapp = Application(common)
|
||||
|
7
setup.py
7
setup.py
@ -65,7 +65,12 @@ setup(
|
||||
description=description, long_description=long_description,
|
||||
author=author, author_email=author_email,
|
||||
url=url, license=license, keywords=keywords,
|
||||
packages=['onionshare', 'onionshare_gui'],
|
||||
packages=[
|
||||
'onionshare',
|
||||
'onionshare_gui',
|
||||
'onionshare_gui.share_mode',
|
||||
'onionshare_gui.receive_mode'
|
||||
],
|
||||
include_package_data=True,
|
||||
scripts=['install/scripts/onionshare', 'install/scripts/onionshare-gui'],
|
||||
data_files=data_files
|
||||
|
@ -1,7 +1,6 @@
|
||||
{
|
||||
"config_onion_service": "Nastavuji onion service na portu {0:d}.",
|
||||
"preparing_files": "Připravuji soubory ke sdílení.",
|
||||
"wait_for_hs": "Čekám na HS až bude připravena:",
|
||||
"give_this_url": "Dejte tuto URL osobě, které dané soubory posíláte:",
|
||||
"give_this_url_stealth": "Give this URL and HidServAuth line to the person you're sending the file to:",
|
||||
"ctrlc_to_stop": "Stiskněte Ctrl-C pro zastavení serveru",
|
||||
@ -27,7 +26,6 @@
|
||||
"gui_copied_url": "URL zkopírováno do schránky",
|
||||
"gui_copied_hidservauth": "Copied HidServAuth line to clipboard",
|
||||
"gui_please_wait": "Prosím čekejte...",
|
||||
"using_ephemeral": "Starting ephemeral Tor onion service and awaiting publication",
|
||||
"gui_download_upload_progress_complete": "%p%, Uplynulý čas: {0:s}",
|
||||
"gui_download_upload_progress_starting": "{0:s}, %p% (Computing ETA)",
|
||||
"gui_download_upload_progress_eta": "{0:s}, ETA: {1:s}, %p%",
|
||||
|
@ -1,7 +1,6 @@
|
||||
{
|
||||
"config_onion_service": "Konfigurerer onion-tjeneste på port {0:d}.",
|
||||
"preparing_files": "Forbereder filer som skal deles.",
|
||||
"wait_for_hs": "Venter på at HS bliver klar:",
|
||||
"give_this_url": "Giv denne URL til personen du sender filen til:",
|
||||
"give_this_url_stealth": "Giv denne URL og HidServAuth-linje til personen du sender filen til:",
|
||||
"ctrlc_to_stop": "Tryk på Ctrl-C for at stoppe serveren",
|
||||
@ -40,7 +39,6 @@
|
||||
"gui_copied_url": "Kopierede URL til udklipsholder",
|
||||
"gui_copied_hidservauth": "Kopierede HidServAuth-linje til udklipsholder",
|
||||
"gui_please_wait": "Vent venligst...",
|
||||
"using_ephemeral": "Starter kortvarig Tor onion-tjeneste og afventer udgivelse",
|
||||
"gui_download_upload_progress_complete": "%p%, tid forløbet: {0:s}",
|
||||
"gui_download_upload_progress_starting": "{0:s}, %p% (udregner anslået ankomsttid)",
|
||||
"gui_download_upload_progress_eta": "{0:s}, anslået ankomsttid: {1:s}, %p%",
|
||||
@ -53,9 +51,7 @@
|
||||
"error_stealth_not_supported": "For at oprette usynlige onion-tjenester, skal du mindst have Tor 0.2.9.1-alpha (eller Tor Browser 6.5) og mindst python3-stem 1.5.0.",
|
||||
"error_ephemeral_not_supported": "OnionShare kræver mindst Tor 0.2.7.1 og mindst python3-stem 1.4.0.",
|
||||
"gui_settings_window_title": "Indstillinger",
|
||||
"gui_settings_stealth_label": "Usynlig (avanceret)",
|
||||
"gui_settings_stealth_option": "Opret usynlige onion-tjenester",
|
||||
"gui_settings_stealth_option_details": "Det gør OnionShare mere sikker, men også mere besværlig for modtageren at oprette forbindelse til den.<br><a href=\"https://github.com/micahflee/onionshare/wiki/Stealth-Onion-Services\">Mere information</a>.",
|
||||
"gui_settings_stealth_hidservauth_string": "Du har gemt den private nøgle til at blive brugt igen, så din HidServAuth-streng bruges også igen.\nKlik nedenfor, for at kopiere HidServAuth.",
|
||||
"gui_settings_autoupdate_label": "Søg efter opdateringer",
|
||||
"gui_settings_autoupdate_option": "Giv mig besked når der findes opdateringer",
|
||||
|
@ -1,6 +1,5 @@
|
||||
{
|
||||
"preparing_files": "Dateien werden vorbereitet.",
|
||||
"wait_for_hs": "Warte auf HS:",
|
||||
"give_this_url": "Geben Sie diese URL der Person, der Sie die Datei zusenden möchten:",
|
||||
"ctrlc_to_stop": "Drücken Sie Strg+C um den Server anzuhalten",
|
||||
"not_a_file": "{0:s} ist keine Datei.",
|
||||
|
@ -1,7 +1,6 @@
|
||||
{
|
||||
"config_onion_service": "Configuring onion service on port {0:d}.",
|
||||
"preparing_files": "Preparing files to share.",
|
||||
"wait_for_hs": "Waiting for HS to be ready:",
|
||||
"give_this_url": "Give this address to the person you're sending the file to:",
|
||||
"give_this_url_stealth": "Give this address and HidServAuth line to the person you're sending the file to:",
|
||||
"give_this_url_receive": "Give this address to the people sending you files:",
|
||||
@ -9,7 +8,6 @@
|
||||
"ctrlc_to_stop": "Press Ctrl+C to stop the server",
|
||||
"not_a_file": "{0:s} is not a valid file.",
|
||||
"not_a_readable_file": "{0:s} is not a readable file.",
|
||||
"no_filenames": "You must specify a list of files to share.",
|
||||
"no_available_port": "Could not start the Onion service as there was no available port.",
|
||||
"other_page_loaded": "Address loaded",
|
||||
"close_on_timeout": "Stopped because timer expired",
|
||||
@ -55,7 +53,6 @@
|
||||
"gui_copied_hidservauth_title": "Copied HidServAuth",
|
||||
"gui_copied_hidservauth": "The HidServAuth line has been copied to clipboard",
|
||||
"gui_please_wait": "Starting… Click to cancel",
|
||||
"using_ephemeral": "Starting ephemeral Tor onion service and awaiting publication",
|
||||
"gui_download_upload_progress_complete": "%p%, Time Elapsed: {0:s}",
|
||||
"gui_download_upload_progress_starting": "{0:s}, %p% (Computing ETA)",
|
||||
"gui_download_upload_progress_eta": "{0:s}, ETA: {1:s}, %p%",
|
||||
|
@ -1,7 +1,6 @@
|
||||
{
|
||||
"config_onion_service": "Agordas onion service je pordo {0:d}.",
|
||||
"preparing_files": "Preparas dosierojn por kundivido.",
|
||||
"wait_for_hs": "Atendas al hidden sevice por esti preta:",
|
||||
"give_this_url": "Donu ĉi tiun URL al la persono al kiu vi sendas la dosieron:",
|
||||
"give_this_url_stealth": "Give this URL and HidServAuth line to the person you're sending the file to:",
|
||||
"ctrlc_to_stop": "Presu Ctrl-C por halti la servilon",
|
||||
@ -27,7 +26,6 @@
|
||||
"gui_copied_url": "URL kopiita en tondujon",
|
||||
"gui_copied_hidservauth": "Copied HidServAuth line to clipboard",
|
||||
"gui_please_wait": "Bonvolu atendi...",
|
||||
"using_ephemeral": "Starting ephemeral Tor onion service and awaiting publication",
|
||||
"gui_download_upload_progress_complete": "%p%, Tempo pasinta: {0:s}",
|
||||
"gui_download_upload_progress_starting": "{0:s}, %p% (Computing ETA)",
|
||||
"gui_download_upload_progress_eta": "{0:s}, ETA: {1:s}, %p%",
|
||||
|
@ -1,6 +1,5 @@
|
||||
{
|
||||
"preparing_files": "Preparando los archivos para compartir.",
|
||||
"wait_for_hs": "Esperando a que HS esté listo:",
|
||||
"give_this_url": "Entregue esta URL a la persona a la que está enviando el archivo:",
|
||||
"ctrlc_to_stop": "Pulse Ctrl-C para detener el servidor",
|
||||
"not_a_file": "{0:s} no es un archivo.",
|
||||
|
@ -1,6 +1,5 @@
|
||||
{
|
||||
"preparing_files": "Valmistellaan tiedostoja jaettavaksi.",
|
||||
"wait_for_hs": "Odotetaan piilopalvelun valmistumista:",
|
||||
"give_this_url": "Anna tämä URL-osoite henkilölle, jolle lähetät tiedostot:",
|
||||
"ctrlc_to_stop": "Näppäin Ctrl-C pysäyttää palvelimen",
|
||||
"not_a_file": "{0:s} Ei ole tiedosto.",
|
||||
@ -22,6 +21,5 @@
|
||||
"gui_canceled": "Peruutettu",
|
||||
"gui_copied_url": "URL-osoite kopioitu leikepöydälle",
|
||||
"gui_please_wait": "Odota...",
|
||||
"using_ephemeral": "Käynnistetään lyhytaikainen Tor piilopalvelu ja odotetaan julkaisua",
|
||||
"zip_progress_bar_format": "Tiivistän tiedostoja: %p%"
|
||||
}
|
||||
|
@ -1,6 +1,5 @@
|
||||
{
|
||||
"preparing_files": "Préparation des fichiers à partager.",
|
||||
"wait_for_hs": "En attente du HS:",
|
||||
"give_this_url": "Donnez cette URL à la personne qui doit recevoir le fichier :",
|
||||
"ctrlc_to_stop": "Ctrl-C arrête le serveur",
|
||||
"not_a_file": "{0:s} n'est pas un fichier.",
|
||||
|
@ -1,6 +1,5 @@
|
||||
{
|
||||
"preparing_files": "Preparazione dei files da condividere.",
|
||||
"wait_for_hs": "In attesa che l'HS sia pronto:",
|
||||
"give_this_url": "Dai questo URL alla persona a cui vuoi inviare il file:",
|
||||
"ctrlc_to_stop": "Premi Ctrl-C per fermare il server",
|
||||
"not_a_file": "{0:s} non è un file.",
|
||||
@ -22,6 +21,5 @@
|
||||
"gui_canceled": "Cancellati",
|
||||
"gui_copied_url": "URL Copiato nella clipboard",
|
||||
"gui_please_wait": "Attendere prego...",
|
||||
"using_ephemeral": "Avviamento del servizio nascosto Tor ephemeral e attesa della pubblicazione",
|
||||
"zip_progress_bar_format": "Elaborazione files: %p%"
|
||||
}
|
||||
|
@ -1,7 +1,6 @@
|
||||
{
|
||||
"config_onion_service": "Onion service configureren op poort {0:d}.",
|
||||
"preparing_files": "Bestanden om te delen aan het voorbereiden.",
|
||||
"wait_for_hs": "Wachten op gereed zijn van HS:",
|
||||
"give_this_url": "Geef deze URL aan de persoon aan wie je dit bestand verzend:",
|
||||
"give_this_url_stealth": "Geef deze URL en de HidServAuth regel aan de persoon aan wie je dit bestand verzend:",
|
||||
"ctrlc_to_stop": "Druk Ctrl-C om de server te stoppen",
|
||||
@ -38,7 +37,6 @@
|
||||
"gui_copied_url": "URL gekopieerd naar klembord",
|
||||
"gui_copied_hidservauth": "HidServAuth regel gekopieerd naar klembord",
|
||||
"gui_please_wait": "Moment geduld...",
|
||||
"using_ephemeral": "Kortstondige Tor onion service gestart en in afwachting van publicatie",
|
||||
"gui_download_upload_progress_complete": "%p%, Tijd verstreken: {0:s}",
|
||||
"gui_download_upload_progress_starting": "{0:s}, %p% (ETA berekenen)",
|
||||
"gui_download_upload_progress_eta": "{0:s}, ETA: {1:s}, %p%",
|
||||
@ -51,9 +49,7 @@
|
||||
"error_stealth_not_supported": "Om een geheime onion service te maken heb je minstens Tor 0.2.9.1-alpha (of Tor Browser 6.5) en minstens python3-stem 1.5.0 nodig.",
|
||||
"error_ephemeral_not_supported": "OnionShare vereist minstens Tor 0.2.7.1 en minstens python3-stem 1.4.0.",
|
||||
"gui_settings_window_title": "Instellingen",
|
||||
"gui_settings_stealth_label": "Stealth (geavanceerd)",
|
||||
"gui_settings_stealth_option": "Maak stealth onion services",
|
||||
"gui_settings_stealth_option_details": "Dit maakt OnionShare veiliger, maar ook lastiger voor de ontvanger om te verbinden.<br><a href=\"https://github.com/micahflee/onionshare/wiki/Stealth-Onion-Services\">Meer informatie</a>.",
|
||||
"gui_settings_autoupdate_label": "Controleer voor updates",
|
||||
"gui_settings_autoupdate_option": "Notificeer me als er updates beschikbaar zijn",
|
||||
"gui_settings_autoupdate_timestamp": "Laatste controle: {}",
|
||||
|
@ -1,6 +1,5 @@
|
||||
{
|
||||
"preparing_files": "Paylaşmak için dosyalar hazırlanıyor.",
|
||||
"wait_for_hs": "GH hazır olması bekleniyor:",
|
||||
"give_this_url": "Dosyayı gönderdiğin kişiye bu URL'i verin:",
|
||||
"ctrlc_to_stop": "Sunucuyu durdurmak için, Ctrl-C basın",
|
||||
"not_a_file": "{0:s} dosya değil.",
|
||||
@ -22,6 +21,5 @@
|
||||
"gui_canceled": "İptal edilen",
|
||||
"gui_copied_url": "Panoya kopyalanan URL",
|
||||
"gui_please_wait": "Lütfen bekleyin...",
|
||||
"using_ephemeral": "Geçici Tor gizli hizmetine bakılıyor ve yayımı bekleniyor",
|
||||
"zip_progress_bar_format": "Dosyalar hazırlanıyor: %p%"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
[DEFAULT]
|
||||
Package3: onionshare
|
||||
Depends3: python3-flask, python3-stem, python3-pyqt5, python-nautilus, tor, obfs4proxy
|
||||
Build-Depends: python3-pytest, python3-flask, python3-stem, python3-pyqt5
|
||||
Depends3: python3-flask, python3-stem, python3-pyqt5, python3-cryptography, python3-crypto, python3-nacl, python3-socks, python-nautilus, tor, obfs4proxy
|
||||
Build-Depends: python3-pytest, python3-flask, python3-stem, python3-pyqt5, python3-cryptography, python3-crypto, python3-nacl, python3-socks, python-nautilus, tor, obfs4proxy
|
||||
Suite: bionic
|
||||
X-Python3-Version: >= 3.6
|
||||
|
@ -47,22 +47,14 @@ class TestLoadStrings:
|
||||
self, common_obj, locale_en, sys_onionshare_dev_mode):
|
||||
""" load_strings() loads English by default """
|
||||
strings.load_strings(common_obj)
|
||||
assert strings._('wait_for_hs') == "Waiting for HS to be ready:"
|
||||
assert strings._('preparing_files') == "Preparing files to share."
|
||||
|
||||
|
||||
def test_load_strings_loads_other_languages(
|
||||
self, common_obj, locale_fr, sys_onionshare_dev_mode):
|
||||
""" load_strings() loads other languages in different locales """
|
||||
strings.load_strings(common_obj, "fr")
|
||||
assert strings._('wait_for_hs') == "En attente du HS:"
|
||||
|
||||
def test_load_partial_strings(
|
||||
self, common_obj, locale_ru, sys_onionshare_dev_mode):
|
||||
strings.load_strings(common_obj)
|
||||
assert strings._("give_this_url") == (
|
||||
"Отправьте эту ссылку тому человеку, "
|
||||
"которому вы хотите передать файл:")
|
||||
assert strings._('wait_for_hs') == "Waiting for HS to be ready:"
|
||||
assert strings._('preparing_files') == "Préparation des fichiers à partager."
|
||||
|
||||
def test_load_invalid_locale(
|
||||
self, common_obj, locale_invalid, sys_onionshare_dev_mode):
|
||||
|
Loading…
Reference in New Issue
Block a user