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 b27b0c20d9
commit e89a74729b
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: