Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for hidden services v3 #15

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

thelegy
Copy link

@thelegy thelegy commented Jun 21, 2019

Tor now has support for hidden services v3 for quite a while. This library lacks support for it.

Note: This code exits because I needed a rather quick solution. I would vote for a cleaner solution that is a little more effort. This PR, although being functional, does not feel like the proper solution to the problem.

This PR adds basic support for hidden services v3. To aquire this it applies the following changes:

  • It changes the mapOnion function to create a hidden services v2 key if no secret key is given.
  • Additionally to the mapOnion function it adds another mapOnionV3 function that implements the same behaviour for hidden services v3. Also tests are duplicated for this function.
  • The accept function now uses mapOnionV3.

The latter one is kind of a breaking change as accept is not able to cunsume hidden services v2 keys any longer. But duplicating accept felt somewhat wrong to me.

Mid term I would vote for rewriting this library a bit and utilizing its own types for the keys. This would deduplicate mapOnion and mapOnionV3 again and also would empower accept to work with hidden services v2 again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant