Expand 'public mode' (optional slugs) to be possible for sharing too, not just receiving, with no rate-limiting/self-destruct on invalid routes.

This commit is contained in:
Miguel Jacq 2018-07-21 17:06:11 +10:00
parent f5ccfcf2cc
commit 3b45f93dbe
No known key found for this signature in database
GPG key ID: EEA4341C6D97A0B6
8 changed files with 87 additions and 47 deletions

View file

@ -144,13 +144,14 @@ class Mode(QtWidgets.QWidget):
self.app.choose_port()
# Start http service in new thread
t = threading.Thread(target=self.web.start, args=(self.app.port, not self.common.settings.get('close_after_first_download'), self.common.settings.get('slug')))
t = threading.Thread(target=self.web.start, args=(self.app.port, not self.common.settings.get('close_after_first_download'), self.common.settings.get('public_mode'), self.common.settings.get('slug')))
t.daemon = True
t.start()
# Wait for the web app slug to generate before continuing
while self.web.slug == None:
time.sleep(0.1)
if not self.common.settings.get('public_mode'):
while self.web.slug == None:
time.sleep(0.1)
# Now start the onion service
try: