[tor-dev] Fwd: Stem Tor - Establish a user defined circuit

Aravindan B aravindbros at gmail.com
Sat Nov 16 05:02:45 UTC 2013

Hi all,

Need some help in writing python script for establishing connection in stem
tor using the method

controller.new_circuit() or controller.extend_circuit()

I tried this

from stem import CircStatus
from stem.control import Controller

with Controller.from_port() as controller:

relay_ip_addresses = ["","",""]

circuit_id = controller.extend_circuit('0',relay_ip_addresses)

But i am getting Socket already closed exception. Am i right with the
syntax of the same. The thing i am trying to achieve is that i want tor to
choose the following ip addresses for

1. for entry
2. for middle nodes
3. for exit nodes

I need tor chose only these three ip nodes as the relay. I have to run this
inside CORE Emulator to simulate TOR in CORE. Expecting a reply soon.
Thanks in advance for the help.

Thanks and regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.torproject.org/pipermail/tor-dev/attachments/20131115/11a05fb9/attachment.html>

More information about the tor-dev mailing list