mirror of
https://github.com/onionshare/onionshare.git
synced 2024-10-01 01:35:40 -04:00
Fix onionshare URLs non-public mode is always http basic auth
This commit is contained in:
parent
29abfd8f87
commit
b667fcc4f8
@ -127,6 +127,13 @@ def main(cwd=None):
|
||||
app = OnionShare(common, onion, local_only, autostop_timer)
|
||||
app.set_stealth(stealth)
|
||||
app.choose_port()
|
||||
|
||||
# Build the URL
|
||||
if common.settings.get('public_mode'):
|
||||
url = 'http://{0:s}'.format(app.onion_host)
|
||||
else:
|
||||
url = 'http://onionshare:{0:s}@{1:s}'.format(web.slug, app.onion_host)
|
||||
|
||||
# Delay the startup if a startup timer was set
|
||||
if autostart_timer > 0:
|
||||
# Can't set a schedule that is later than the auto-stop timer
|
||||
@ -135,10 +142,6 @@ def main(cwd=None):
|
||||
sys.exit()
|
||||
|
||||
app.start_onion_service(False, True)
|
||||
if common.settings.get('public_mode'):
|
||||
url = 'http://{0:s}'.format(app.onion_host)
|
||||
else:
|
||||
url = 'http://{0:s}/{1:s}'.format(app.onion_host, web.slug)
|
||||
schedule = datetime.now() + timedelta(seconds=autostart_timer)
|
||||
if mode == 'receive':
|
||||
print("Files sent to you appear in this folder: {}".format(common.settings.get('data_dir')))
|
||||
@ -215,12 +218,6 @@ def main(cwd=None):
|
||||
common.settings.set('slug', web.slug)
|
||||
common.settings.save()
|
||||
|
||||
# Build the URL
|
||||
if common.settings.get('public_mode'):
|
||||
url = 'http://{0:s}'.format(app.onion_host)
|
||||
else:
|
||||
url = 'http://onionshare:{0:s}@{1:s}'.format(web.slug, app.onion_host)
|
||||
|
||||
print('')
|
||||
if autostart_timer > 0:
|
||||
print("Server started")
|
||||
|
@ -420,8 +420,6 @@ class ServerStatus(QtWidgets.QWidget):
|
||||
"""
|
||||
if self.common.settings.get('public_mode'):
|
||||
url = 'http://{0:s}'.format(self.app.onion_host)
|
||||
elif self.mode == ServerStatus.MODE_WEBSITE:
|
||||
url = 'http://onionshare:{0:s}@{1:s}'.format(self.web.slug, self.app.onion_host)
|
||||
else:
|
||||
url = 'http://{0:s}/{1:s}'.format(self.app.onion_host, self.web.slug)
|
||||
url = 'http://onionshare:{0:s}@{1:s}'.format(self.web.slug, self.app.onion_host)
|
||||
return url
|
||||
|
Loading…
Reference in New Issue
Block a user