mirror of
https://github.com/onionshare/onionshare.git
synced 2025-05-10 10:25:03 -04:00
Support stem versions older than 1.5.0 again. Fix for issue #332
This commit is contained in:
parent
5241d756bf
commit
0061f00f49
1 changed files with 6 additions and 1 deletions
|
@ -130,7 +130,12 @@ class Onion(object):
|
||||||
else:
|
else:
|
||||||
basic_auth = None
|
basic_auth = None
|
||||||
|
|
||||||
res = self.c.create_ephemeral_hidden_service({ 80: port }, await_publication=True, basic_auth=basic_auth)
|
if basic_auth != None :
|
||||||
|
res = self.c.create_ephemeral_hidden_service({ 80: port }, await_publication=True, basic_auth=basic_auth)
|
||||||
|
else :
|
||||||
|
# if the stem interface is older than 1.5.0, basic_auth isn't a valid keyword arg
|
||||||
|
res = self.c.create_ephemeral_hidden_service({ 80: port }, await_publication=True)
|
||||||
|
|
||||||
self.service_id = res.content()[0][2].split('=')[1]
|
self.service_id = res.content()[0][2].split('=')[1]
|
||||||
onion_host = self.service_id + '.onion'
|
onion_host = self.service_id + '.onion'
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue