SOCKS 5 support for replication

Notably, this allows replication over the Tor network (yes, DNS resolution occurs over Tor also).