torproject / stem

Python controller library for Tor
https://stem.torproject.org/
GNU Lesser General Public License v3.0
257 stars 75 forks source link

Add support for recently added DROPTIMEOUTS command #73

Closed kloesing closed 3 years ago

kloesing commented 3 years ago

Tor 0.4.5.0-alpha (yet unreleased) and later are going to support a new DROPTIMEOUTS command:

https://gitlab.torproject.org/tpo/core/tor/-/issues/40002

https://gitweb.torproject.org/torspec.git/tree/control-spec.txt#n2005

That new command should be quite similar to DROPGUARDS from Stem's perspective.

Is there a way to execute the new DROPTIMEOUTS command from Stem? If not, can you add a drop_timeouts function to Controller?

Thanks in advance!

atagar commented 3 years ago

Thanks Karsten! Yup, you can execute new commands such as this before Stem adds a method...

my_controller.msg('DROPTIMEOUTS')

That said, I'll add a method for this in a bit.

kloesing commented 3 years ago

Awesome. Thank you for letting me know!

atagar commented 3 years ago

Hi Karsten. As discussed via email if DROPTIMEOUTS is strictly for experiments we probably shouldn't add a method for a few reasons...

  1. OnionPerf and Shadow can invoke this without a special method.
  2. Since DROPTIMEOUTS lacks a response a method doesn't add much. It would effectively just be an alias.
  3. Adding a method will make other Stem users wonder if this is useful to them, which evidently it isn't

That said, if you feel a method is still helpful I'm all ears.

atagar commented 3 years ago

Mike and I discussed this further and decided to add this as a drop_guards() argument.

https://gitweb.torproject.org/stem.git/commit/?id=120715e