torproject / stem

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

Need to be able to find v3 Introduction Points #126

Open emdee-is opened 2 years ago

emdee-is commented 2 years ago

I need to be able to find v3 Introduction Points - it is possible?

stem/docs/_static/example/introduction_points.py needs up dating to have DDG's v3 address: duckduckgogg42xjoc72x3sjasowoarfbgcmvfimaftt6twagswzczad

and then the code needs to be made to work. Can it be done in V3?

atagar commented 2 years ago

and then the code needs to be made to work. Can it be done in V3?

Hi emdee-is. Did you try? On first glance I'd expect so.

emdee-is commented 2 years ago

I wouldn't have raised the issue if it worked! On this code it comes back empty.

NO introduction points for duckduckgogg42xjoc72x3sjasowoarfbgcmvfimaftt6twagswzczad

Reading your comment https://github.com/torproject/stem/issues/96#issuecomment-987257472 made me think that you knew it was " clearly a bug." and it looks like it hasn't been fixed. It's needed badly by any code that manipulates ExitNodes to make sure you don't block Introduction Points when blocking bad Exit Nodes.

Could you fix the DDG onion in stem/docs/_static/example/introduction_points.py?

I think the examples should be run as a part of the release integration test suite and CI to make sure the code works and the examples are right; clearly if the examples have v2 onions they are at least a year out of date.

Does the project use the CI facilities if github? I see `tox.ini but it looks out of date (py37), and there is nothing in the README and no badges to show anything it is being run. I couldn't even get the unittests to run without erroring.

This code is the foundation to a lot of software and has a good test suite so it would be good to have CI.

atagar commented 2 years ago

you knew it was " clearly a bug." and it looks like it hasn't been fixed

Great point! Yup, the issue described in #96 would cause this. Try re-casting as suggested in its example - that should provide a simple workaround.

good test suite so it would be good to have CI

Thanks! I'm a big fan of tests. Stem used Jenkins for CI but iirc TPO discontinued it. I'd definitely like to try github's if I return to this project.

Could you fix...

Please reach out to 'gk at torproject dot org' for fixes. He assumed maintainership when I left tor.

emdee-is commented 2 years ago

that should provide a simple workaround.

Why could I do that: the code isn't even valid Python hs_address is undefined. And there's a lot more to V3 location specifiers than that.

Please reach out to 'gk at torproject dot org'

I think you should do that if he "assumed maintainership", because if he did, he'd be active in the repo replying to issues and fixing things:

  1. The unit tests are not passing
  2. The crypto is broken
  3. The examples are out of date and broken
  4. The master branch in an partially asynced state https://github.com/torproject/stem/issues/77

and the person you handed it off to isn't active.

atagar commented 2 years ago

Why could I do that: the code isn't even valid Python hs_address is undefined.

Hi emdee-is. The get_hidden_service_descriptor() method should accept both V2 and V3 addresses. The bug described in #96 is that Stem provides a V2 object when presented with a V3 address. You can sidestep this by re-casting the object as demonstrated in the comment's code snippet...

desc = HiddenServiceDescriptorV3.from_str(str(desc))  # reparse as HSv3

and the person you handed it off to isn't active.

Yup, they aren't but that's because they have other work and Stem isn't a squeaky wheel. Guess I made Stem too solid. ;P

Nobody complains about Stem's lack of maintenance so they understandably conclude that it's not a priority.

emdee-is commented 10 months ago

Introduction points now work with 1.8.2

You may want to include or adopt https://git.plastiras.org/emdee/stem_examples which are the examples from stem.torproject.org/examples and make a good testsuite. There are some problems that are showing up there.