Skip to content

Instantly share code, notes, and snippets.

@teor2345
Created September 7, 2020 02:02
Show Gist options
  • Select an option

  • Save teor2345/dbd45dd1bd372f06702106d8682650df to your computer and use it in GitHub Desktop.

Select an option

Save teor2345/dbd45dd1bd372f06702106d8682650df to your computer and use it in GitHub Desktop.
List Zcash-Supporting Tor Exits
import stem.descriptor.remote
try:
for desc in stem.descriptor.remote.get_consensus():
exit_mainnet = desc.exit_policy.can_exit_to(port=8233)
exit_testnet = desc.exit_policy.can_exit_to(port=18233)
if exit_mainnet or exit_testnet:
print("found Zcash-supporting relay %s (%s) weight %d nets:%s%s" %
(desc.nickname, desc.fingerprint, desc.bandwidth,
" main" if exit_mainnet else "",
" test" if exit_testnet else ""))
except Exception as exc:
print("Unable to retrieve the consensus: %s" % exc)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment