From 592663c77fac44accbbdc90b7485bd13551d4c62 Mon Sep 17 00:00:00 2001 From: Seth Schoen Date: Fri, 9 Nov 2012 11:57:23 -0800 Subject: [PATCH] forgot to commit the exit geography demo a while ago --- server-ca/sni_challenge/exit.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 server-ca/sni_challenge/exit.py diff --git a/server-ca/sni_challenge/exit.py b/server-ca/sni_challenge/exit.py new file mode 100644 index 000000000..fd513473f --- /dev/null +++ b/server-ca/sni_challenge/exit.py @@ -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))