Tor mode changes to connection.py