[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #7666 [Stem]: Support TAKEOWNERSHIP command
#7666: Support TAKEOWNERSHIP command
-------------------------+--------------------------------------------------
Reporter: lunar | Owner: atagar
Type: enhancement | Status: needs_review
Priority: normal | Milestone:
Component: Stem | Version:
Keywords: | Parent:
Points: | Actualpoints:
-------------------------+--------------------------------------------------
Comment(by atagar):
> What kind of object does launch_tor return
It provides a process. launch_tor() is not restricted to making a tor
process with a control socket, and even if there is one launch_tor() won't
know the password if HashedControlPassword was set.
We could make a more restricted launch_tor* method that provides back a
Controller. However, I'd rather invest our effort in making an is_local()
check that actually works. You make a good point that it's non-trivial to
figure out, but it would be a useful to detect for reasons other than
TAKEOWNERSHIP. Suggestions on how to do that are welcome.
> and how do callers obtain a Controller object from that one?
There's a few ways. One would be...
{{{
tor_process = stem.process.launch_tor_with_config(
config = {
'ControlPort': '2778',
'CookieAuthentication': '1',
},
)
controller = Controller.from_port(control_port = 2778)
controller.authenticate()
# ... do some stuff...
controller.close()
tor_process.kill()
}}}
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/7666#comment:7>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs