stem
stem copied to clipboard
Python controller library for Tor
As time goes by Stem will fall behind Tor's specification. I kept us in sync many years, but with my departure I should leave a marker on where we left...
With v2 onions being killed by Tor in October 2021, it doesn't make much sense to keep around onion-2 support in Stem much longer. https://lists.torproject.org/pipermail/tor-dev/2020-June/014365.html I'm willing to help with...
It appears that it is not possible to download a consensus over the `ORPort` of a relay due to Stem not sending SENDMEs (flow control cell) which means that after...
To transparently support both synchronous and asynchronous usage we [use metaprogrmming](https://gitweb.torproject.org/stem.git/tree/stem/util/asyncio.py#n18). Basically, our mixin matches method calls to the context type we run within. When a synchronous controller is used...
Our Descriptor class' construction and validation are coupled together, which complicates validation of individual descriptors (rather than whole files) as discussed on [BridgeDB ticket 40006](https://gitlab.torproject.org/tpo/anti-censorship/bridgedb/-/merge_requests/13). Stem evolved this way for...
When the exit policy accepts traffic to that port only to a subnet. For instance, a relay with exit policy: ``` accept 133.0.0.0/8:443 ``` ``` >>> rs = controller.get_network_status("63BF46A63F9C21FD315CD061B3EAA3EB05283A0A") >>>...
Current version Stem library doesn't have `network-status-diff` document. https://github.com/torproject/torspec/blob/e576760a2136f0efb917bf7fb47f4fe8a22cd7d9/proposals/140-consensus-diffs.txt You can try take some code from torpy https://github.com/torpyorg/torpy/blob/master/torpy/documents/network_status_diff.py#L92
Inside NetworkStatusDocumentV3 you have is_fresh method: ```python def is_fresh(self): """ Checks if the current time is between this document's **valid_after** and **fresh_until** timestamps. To be fresh means this should be...
Our Descriptor class' `from_str` function converts strings to descriptors. When used from a subclass we should (and are documented as) providing a descriptor of that type. However, this fails with......
**Migrated from ticket [19679](https://trac.torproject.org/projects/tor/ticket/19679).** To make things manageable [Stem's FAQ](https://stem.torproject.org/faq.html) starts with a header linking to the questions. A nicer approach would be for us to only show the questions,...