progress removing onionr.py
This commit is contained in:
parent
cbe10f914a
commit
6bf8bb1db6
@ -41,7 +41,6 @@ class PrivateAPI:
|
|||||||
This also saves the used host (random localhost IP address) to the data folder in host.txt
|
This also saves the used host (random localhost IP address) to the data folder in host.txt
|
||||||
'''
|
'''
|
||||||
self.config = config
|
self.config = config
|
||||||
self.serializer = serializeddata.SerializedData()
|
|
||||||
self.startTime = epoch.get_epoch()
|
self.startTime = epoch.get_epoch()
|
||||||
app = flask.Flask(__name__)
|
app = flask.Flask(__name__)
|
||||||
bindPort = int(config.get('client.client.port', 59496))
|
bindPort = int(config.get('client.client.port', 59496))
|
||||||
|
@ -7,15 +7,17 @@ class FDSafeHandler(WSGIHandler):
|
|||||||
self.timeout.start()
|
self.timeout.start()
|
||||||
try:
|
try:
|
||||||
WSGIHandler.handle(self)
|
WSGIHandler.handle(self)
|
||||||
except Exception as e:
|
except gevent.Timeout as ex:
|
||||||
self.handle_error(e)
|
if ex is self.timeout:
|
||||||
finally:
|
pass
|
||||||
self.timeout.close()
|
else:
|
||||||
|
raise
|
||||||
|
'''
|
||||||
def handle_error(self, two, three, four):
|
def handle_error(self, two, three, four):
|
||||||
if two is self.timeout:
|
if two is self.timeout:
|
||||||
self.result = [b"Timeout"]
|
self.result = [b"Timeout"]
|
||||||
self.start_response("200 OK", [])
|
self.start_response("200 OK", [])
|
||||||
self.process_result()
|
self.process_result()
|
||||||
else:
|
else:
|
||||||
WSGIHandler.handle_error(self)
|
WSGIHandler.handle_error(self)
|
||||||
|
'''
|
@ -116,4 +116,4 @@ class PrivateEndpoints:
|
|||||||
|
|
||||||
@private_endpoints_bp.route('/gettorsocks')
|
@private_endpoints_bp.route('/gettorsocks')
|
||||||
def get_tor_socks():
|
def get_tor_socks():
|
||||||
return Response(client_api._too_many.get(NetController).socksPort)
|
return Response(str(client_api._too_many.get(NetController).socksPort))
|
@ -144,5 +144,4 @@ def insert_block(data, header='txt', sign=False, encryptType='', symKey='', asym
|
|||||||
events.event('insertdeniable', {'content': plaintext, 'meta': plaintextMeta, 'hash': retData, 'peer': bytesconverter.bytes_to_str(asymPeer)}, threaded = True)
|
events.event('insertdeniable', {'content': plaintext, 'meta': plaintextMeta, 'hash': retData, 'peer': bytesconverter.bytes_to_str(asymPeer)}, threaded = True)
|
||||||
else:
|
else:
|
||||||
events.event('insertblock', {'content': plaintext, 'meta': plaintextMeta, 'hash': retData, 'peer': bytesconverter.bytes_to_str(asymPeer)}, threaded = True)
|
events.event('insertblock', {'content': plaintext, 'meta': plaintextMeta, 'hash': retData, 'peer': bytesconverter.bytes_to_str(asymPeer)}, threaded = True)
|
||||||
|
|
||||||
return retData
|
return retData
|
Loading…
Reference in New Issue
Block a user