onionv3 support WIP
thanks to @anonymoose, @zeroseed and @geekless
This commit is contained in:
parent
be00a7e855
commit
acb313f481
2 changed files with 34 additions and 11 deletions
|
@ -13,6 +13,7 @@ import gevent
|
|||
|
||||
from Config import config
|
||||
from Crypt import CryptRsa
|
||||
from Crypt import ed25519
|
||||
from Site import SiteManager
|
||||
import socks
|
||||
from gevent.lock import RLock
|
||||
|
@ -214,8 +215,8 @@ class TorManager(object):
|
|||
return False
|
||||
|
||||
def makeOnionAndKey(self):
|
||||
res = self.request("ADD_ONION NEW:RSA1024 port=%s" % self.fileserver_port)
|
||||
match = re.search("ServiceID=([A-Za-z0-9]+).*PrivateKey=RSA1024:(.*?)[\r\n]", res, re.DOTALL)
|
||||
res = self.request(f"ADD_ONION NEW:ED25519-V3 port={self.fileserver_port}")
|
||||
match = re.search("ServiceID=([A-Za-z0-9]+).*PrivateKey=ED25519-V3:(.*?)[\r\n]", res, re.DOTALL)
|
||||
if match:
|
||||
onion_address, onion_privatekey = match.groups()
|
||||
return (onion_address, onion_privatekey)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue