Display the URL without the slug for receive_public_mode in the CLI

This commit is contained in:
Micah Lee 2018-04-29 16:44:45 -07:00
parent 9a076635c5
commit b6a15cf6c7
No known key found for this signature in database
GPG Key ID: 403C2657CD994F73

View File

@ -162,6 +162,12 @@ def main(cwd=None):
common.settings.set('slug', web.slug) common.settings.set('slug', web.slug)
common.settings.save() common.settings.save()
# Build the URL
if receive and common.settings.get('receive_public_mode'):
url = 'http://{0:s}'.format(app.onion_host)
else:
url = 'http://{0:s}/{1:s}'.format(app.onion_host, web.slug)
print('') print('')
if receive: if receive:
print(strings._('receive_mode_downloads_dir').format(common.settings.get('downloads_dir'))) print(strings._('receive_mode_downloads_dir').format(common.settings.get('downloads_dir')))
@ -171,19 +177,19 @@ def main(cwd=None):
if stealth: if stealth:
print(strings._("give_this_url_receive_stealth")) print(strings._("give_this_url_receive_stealth"))
print('http://{0:s}/{1:s}'.format(app.onion_host, web.slug)) print(url)
print(app.auth_string) print(app.auth_string)
else: else:
print(strings._("give_this_url_receive")) print(strings._("give_this_url_receive"))
print('http://{0:s}/{1:s}'.format(app.onion_host, web.slug)) print(url)
else: else:
if stealth: if stealth:
print(strings._("give_this_url_stealth")) print(strings._("give_this_url_stealth"))
print('http://{0:s}/{1:s}'.format(app.onion_host, web.slug)) print(url)
print(app.auth_string) print(app.auth_string)
else: else:
print(strings._("give_this_url")) print(strings._("give_this_url"))
print('http://{0:s}/{1:s}'.format(app.onion_host, web.slug)) print(url)
print('') print('')
print(strings._("ctrlc_to_stop")) print(strings._("ctrlc_to_stop"))