Move Tor client endpoint parser to separate module