forgot to commit the exit geography demo a while ago

This commit is contained in:
Seth Schoen 2012-11-09 11:57:23 -08:00
parent 4f7e9ee3b9
commit 592663c77f

View file

@ -0,0 +1,15 @@
#!/usr/bin/env python
import exit_geography, random, socks
# This file is currently unused. It demonstrates how to make a
# connection using exit_geography and a Tor exit node in a chosen
# country. This can be used to implement multipath probing to
# perform SNI challenges from the vantage point of specified
# countries.
node = random.choice(exit_geography.by_country["DE"])
socksocket = socks.socksocket()
socksocket.setproxy(socks.PROXY_TYPE_SOCKS4, "localhost", 9050)
print node
socksocket.connect(("theobroma.info.%s.exit" % node, 80))