[Pkg-privacy-commits] [onionshare] 21/53: Merge branch 'master' into ephemeral
Ulrike Uhlig
u-guest at moszumanska.debian.org
Wed Dec 30 00:20:12 UTC 2015
This is an automated email from the git hooks/post-receive script.
u-guest pushed a commit to branch debian
in repository onionshare.
commit fd39f84bffa12bf0431c3bf817afafc04aa40ab2
Merge: 55c4c0f 34591b5
Author: Micah Lee <micah at micahflee.com>
Date: Sun Nov 15 15:35:59 2015 -0800
Merge branch 'master' into ephemeral
Conflicts:
onionshare/helpers.py
onionshare/onionshare.py
SECURITY.md | 2 +-
locale/nl.json | 5 +++-
onionshare/helpers.py | 23 ++++++++++++++++++
onionshare/onionshare.py | 1 +
onionshare/socks.py | 52 ++++++++++++++++++++--------------------
onionshare/strings.py | 23 +++++++++++-------
onionshare/web.py | 8 +++----
onionshare_gui/common.py | 7 ++++++
onionshare_gui/onionshare_gui.py | 10 +++++++-
onionshare_gui/server_status.py | 2 +-
setup.py | 2 +-
11 files changed, 92 insertions(+), 43 deletions(-)
diff --cc onionshare/helpers.py
index 9d0988d,279cb56..250ef8d
--- a/onionshare/helpers.py
+++ b/onionshare/helpers.py
@@@ -27,7 -27,13 +27,10 @@@ sys.setdefaultencoding("utf-8"
def get_platform():
+ """
+ Returns the platform OnionShare is running on.
+ """
- p = platform.system()
- if p == 'Linux' and platform.uname()[0:2] == ('Linux', 'amnesia'):
- p = 'Tails'
- return p
+ return platform.system()
if get_platform() == 'Darwin':
# this is hacky, but it ultimate ends up returning the absolute path to
diff --cc onionshare/onionshare.py
index 3b7a7de,b923331..3e30567
--- a/onionshare/onionshare.py
+++ b/onionshare/onionshare.py
@@@ -17,19 -17,43 +17,20 @@@ GNU General Public License for more det
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
-import os, sys, subprocess, time, argparse, shutil, socket, threading, urllib2, httplib, tempfile
-import socks
-
-from stem.control import Controller
-
-import strings, helpers, web
-
-
-class NoTor(Exception):
- pass
-
-
-class TailsError(Exception):
- pass
-
-
-class HSDirError(Exception):
- pass
-
-
-def hsdic2list(dic):
- """Convert what we get from get_conf_map to what we need for set_options"""
- return [
- pair for pairs in [
- [('HiddenServiceDir', vals[0]), ('HiddenServicePort', vals[1])]
- for vals in zip(dic.get('HiddenServiceDir', []), dic.get('HiddenServicePort', []))
- ] for pair in pairs
- ]
+import os, sys, subprocess, time, argparse, inspect, shutil, socket, threading
+import strings, helpers, web, hs
class OnionShare(object):
- def __init__(self, debug=False, local_only=False, stay_open=False):
+ def __init__(self, debug=False, local_only=False, stay_open=False, transparent_torification=False):
self.port = None
- self.controller = None
+ self.hs = None
self.hidserv_dir = None
+ self.onion_host = None
+ # files and dirs to delete on shutdown
+ self.cleanup_filenames = []
+
# debug mode
if debug:
web.debug_mode()
diff --cc onionshare_gui/onionshare_gui.py
index babfad2,181b51c..ee5d146
--- a/onionshare_gui/onionshare_gui.py
+++ b/onionshare_gui/onionshare_gui.py
@@@ -39,9 -39,17 +39,17 @@@ from options import Option
class Application(QtGui.QApplication):
def __init__(self):
platform = helpers.get_platform()
- if platform == 'Tails' or platform == 'Linux':
+ if platform == 'Linux':
self.setAttribute(QtCore.Qt.AA_X11InitThreads, True)
QtGui.QApplication.__init__(self, sys.argv)
+ self.installEventFilter(self)
+
+ def eventFilter(self, obj, event):
+ if (event.type() == QtCore.QEvent.KeyPress and
+ event.key() == QtCore.Qt.Key_Q and
+ event.modifiers() == QtCore.Qt.ControlModifier):
+ self.quit()
+ return False
class OnionShareGui(QtGui.QWidget):
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/onionshare.git
More information about the Pkg-privacy-commits
mailing list