Opened 10 months ago

Closed 8 months ago

#21590 closed enhancement (implemented)

tor-prompt / tor-cli SETEVENTS support

Reported by: adrelanos Owned by: atagar
Priority: Medium Milestone:
Component: Core Tor/Stem Version:
Severity: Normal Keywords:
Cc: whonix-devel@… Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

One can type SETEVENTS circ into tor-prompt, but event replies are silently ignored. It would be useful (to have an option) to watch them.

It would be a usability feature. Always have too look up, copy and paste the following two commands.

socat - UNIX-CONNECT:/var/run/tor/control

echo "AUTHENTICATE $(xxd -c 32 -g 0 /var/run/tor/control.authcookie | awk '{print $2}')" 

Child Tickets

Change History (5)

comment:1 Changed 10 months ago by atagar

Hi adrelanos, please see the following...

https://stem.torproject.org/tutorials/down_the_rabbit_hole.html#event-handling

Did you have any other questions?

comment:2 in reply to:  1 Changed 10 months ago by adrelanos

Replying to atagar:

Hi adrelanos, please see the following...

https://stem.torproject.org/tutorials/down_the_rabbit_hole.html#event-handling

I see.

However, I would say my feature request is still standing.

What I am suggesting with tor-cli (#21541) is a replacement for the following cumbersome procedure.

socat - UNIX-CONNECT:/var/run/tor/control

echo "AUTHENTICATE $(xxd -c 32 -g 0 /var/run/tor/control.authcookie | awk '{print $2}')" 

If I did that above, and entered SETEVENTS circ, then I could see events as they happen. Easy. No manual reading besides Tor control specification.

Currently tor-prompt is more like a python interpreter that simplifies getting up a Tor control connection. What I am suggesting with tor-cli is a simple tool to talk use Tor's control connection automating the two above commands.

Just clarifying my idea. Of course I understand should you not wish to implement this.

Did you have any other questions?

Not at the moment. Thank you! :)

comment:3 Changed 10 months ago by atagar

Gotcha. This sounds similar to your other ticket concerning better support for piping and I like this idea too. Getting buried with other tasks so not getting to either of these tickets as fast as I'd like. Fear I might be starting cold #4 this winter so may be knocked out of commission soon too... :/

So TL;DR I like the idea and will make a stab at this at some point but no promises on when.

comment:4 Changed 10 months ago by adrelanos

Right. Sure thing. Good to know! Keep your time and thank you! :)

comment:5 Changed 8 months ago by atagar

Resolution: implemented
Status: newclosed

Sorry about the long delay. Change pushed that allows you to run...

tor-prompt --run "SETEVENTS BW DEBUG"

This prints the requested events until the user presses a key. This can also be piped.

Feel free to reopen if you'd like anything else.

Note: See TracTickets for help on using tickets.