diff --git a/misc.py b/misc.py index 0dc4519..6d31222 100644 --- a/misc.py +++ b/misc.py @@ -187,12 +187,9 @@ def categorize_error(exc): def tor_proxy_url(torhost): - """Generate Tor SOCKS5 proxy URL with random credentials for circuit isolation. + """Generate Tor SOCKS5 proxy URL. - Tor treats different username:password as separate streams, using different - circuits. This ensures each connection gets a fresh circuit. + Uses no auth to allow Tor to reuse circuits naturally, avoiding + circuit exhaustion from IsolateSOCKSAuth behavior. """ - chars = string.ascii_lowercase + string.digits - user = ''.join(random.choice(chars) for _ in range(8)) - passwd = ''.join(random.choice(chars) for _ in range(8)) - return 'socks5://%s:%s@%s' % (user, passwd, torhost) + return 'socks5://%s' % torhost