Stem officials docs says that new identity is established by the following:
from stem import Signal
from stem.control import Controller
with Controller.from_port(port = 9051) as controller:
controller.authenticate()
controller.signal(Signal.NEWNYM)
And below is my code:
import urllib2
from stem import Signal
from stem.control import Controller
def connect():
with Controller.from_port(port=9051) as controller:
controller.authenticate(my_pass)
controller.signal(Signal.NEWNYM)
for i in range(5):
connect()
print urllib2.urlopen('http://icanhazip.com/').read().strip()
However the ip address does not change.
ps. Yes, I've edited the torrc
file.
p2. I am aware of this and that threads.
Any ideas?