Add Tor support in protocol.py to connect to .onion nodes via Tor proxy