[Pkg-anonymity-tools] [onionshare] 106/140: warns about sending large files in CLI (#123)
Ulrike Uhlig
u-guest at moszumanska.debian.org
Mon Sep 29 20:33:52 UTC 2014
This is an automated email from the git hooks/post-receive script.
u-guest pushed a commit to branch master
in repository onionshare.
commit 3f3b52c0a7b20deb6c6b4cc093c29684fa5f0a96
Author: Micah Lee <micah at micahflee.com>
Date: Thu Sep 18 00:20:54 2014 +0000
warns about sending large files in CLI (#123)
---
onionshare/onionshare.py | 6 ++++++
onionshare/strings.json | 1 +
2 files changed, 7 insertions(+)
diff --git a/onionshare/onionshare.py b/onionshare/onionshare.py
index afc6a3f..be08910 100644
--- a/onionshare/onionshare.py
+++ b/onionshare/onionshare.py
@@ -238,6 +238,12 @@ def main():
web.set_file_info(filenames)
app.cleanup_filenames.append(web.zip_filename)
+ # warn about sending large files over Tor
+ if web.zip_filesize >= 209715200: # 200mb
+ print ''
+ print strings._("large_filesize").format(helpers.human_readable_filesize(web.zip_filesize))
+ print ''
+
# start onionshare service in new thread
t = threading.Thread(target=web.start, args=(app.port, app.stay_open))
t.daemon = True
diff --git a/onionshare/strings.json b/onionshare/strings.json
index cc1bf29..f675df5 100644
--- a/onionshare/strings.json
+++ b/onionshare/strings.json
@@ -21,6 +21,7 @@
"close_on_finish": "Stop server automatically",
"choose_file": "Choose a file to share",
"closing_automatically": "Closing automatically because download finished",
+ "large_filesize": "You are sending a total of {0}. Transferring large files using OnionShare might 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",
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/onionshare.git
More information about the Pkg-anonymity-tools
mailing list