tor_manager: accept websocket URLs too

This commit is contained in:
Brian Warner 2016-04-20 12:05:27 -07:00
parent 611a7d05e9
commit a57845eb0b

View File

@ -26,7 +26,7 @@ class TorWebAgentEndpointFactory(object):
"contains non-ASCII octets, it should be ASCII " "contains non-ASCII octets, it should be ASCII "
"decodable.").format(uri=uri)) "decodable.").format(uri=uri))
if uri.scheme == b'http': if uri.scheme == b'http' or uri.scheme == b'ws':
print("building URI endpoint with tor for %s" % uri.toBytes()) print("building URI endpoint with tor for %s" % uri.toBytes())
return txtorcon.TorClientEndpoint(#self._reactor, return txtorcon.TorClientEndpoint(#self._reactor,
host, uri.port, host, uri.port,