mirror of
https://github.com/onionshare/onionshare.git
synced 2025-01-10 19:52:50 -03:00
made --local-only work in GUI (#58)
This commit is contained in:
parent
2b8be2781c
commit
c74e259fb4
1 changed files with 11 additions and 6 deletions
|
@ -106,11 +106,13 @@ def main():
|
|||
|
||||
# try starting hidden service
|
||||
onionshare_port = onionshare.choose_port()
|
||||
try:
|
||||
onion_host = onionshare.start_hidden_service(onionshare_port)
|
||||
except onionshare.NoTor as e:
|
||||
alert(e.args[0], QMessageBox.Warning)
|
||||
return
|
||||
local_host = "127.0.0.1:{0}".format(onionshare_port)
|
||||
if not local_only:
|
||||
try:
|
||||
onion_host = onionshare.start_hidden_service(onionshare_port)
|
||||
except onionshare.NoTor as e:
|
||||
alert(e.args[0], QMessageBox.Warning)
|
||||
return
|
||||
onionshare.tails_open_port(onionshare_port)
|
||||
|
||||
# select file to share
|
||||
|
@ -122,7 +124,10 @@ def main():
|
|||
webapp.onionshare = onionshare
|
||||
webapp.onionshare_port = onionshare_port
|
||||
webapp.filename = filename
|
||||
webapp.onion_host = onion_host
|
||||
if not local_only:
|
||||
webapp.onion_host = onion_host
|
||||
else:
|
||||
webapp.onion_host = local_host
|
||||
webapp.qtapp = app
|
||||
webapp.clipboard = app.clipboard()
|
||||
|
||||
|
|
Loading…
Reference in a new issue