proxywatchd: add 0.3s delay before SSL fallback to HTTP
This commit is contained in:
@@ -1519,10 +1519,13 @@ class TargetTestJob():
|
|||||||
sock.disconnect()
|
sock.disconnect()
|
||||||
except Exception:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
|
# Delay before secondary check (allows different Tor circuit)
|
||||||
|
time.sleep(0.3)
|
||||||
if config.watchd.debug:
|
if config.watchd.debug:
|
||||||
_log('SSL failed, fallback to HTTP: %s://%s:%d' % (proto, ps.ip, ps.port), 'debug')
|
_log('SSL failed, fallback to HTTP: %s://%s:%d' % (proto, ps.ip, ps.port), 'debug')
|
||||||
try:
|
try:
|
||||||
http_port = 80
|
http_port = 80
|
||||||
|
# New Tor credentials = new circuit
|
||||||
http_proxies = [
|
http_proxies = [
|
||||||
rocksock.RocksockProxyFromURL(tor_proxy_url(torhost)),
|
rocksock.RocksockProxyFromURL(tor_proxy_url(torhost)),
|
||||||
rocksock.RocksockProxyFromURL('%s://%s:%s' % (proto, ps.ip, ps.port)),
|
rocksock.RocksockProxyFromURL('%s://%s:%s' % (proto, ps.ip, ps.port)),
|
||||||
|
|||||||
Reference in New Issue
Block a user