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

[Proposal] Support port mapping in tor/listen.go #30

Open
parazyd opened this issue Aug 2, 2019 · 2 comments
Open

[Proposal] Support port mapping in tor/listen.go #30

parazyd opened this issue Aug 2, 2019 · 2 comments

Comments

@parazyd
Copy link

parazyd commented Aug 2, 2019

This is a feature request.

Would it be possible to support port maps like stem does in tor/listen.go?

For example, in stem we can do:

service = controller.create_ephemeral_hidden_service({80: 5000, 90:5001}, await_publication = True)

This would yield two listeners, on ports 5000 and 5001, and it would map them to 80 and 90.

@cretz
Copy link
Owner

cretz commented Aug 2, 2019

Yeah, today I only support one LocalPort/LocalListener in the simplified listen API in the tor package (but we do support multiple remote ports). There's no specific reason not to accept more ports/listeners (e.g. AdditionalLocalPorts/AdditionaLocalListeners to retain backwards compatibility). I haven't been able to work on this project in a while, so who knows if/when it'll be impl'd. In the meantime, code can use the lower-level pieces to communicate directly w/ the control port using the control package the way the Listen call does.

@cretz
Copy link
Owner

cretz commented Jun 13, 2021

if I revisit this, I think I may accept a port-mappings structure that will be mutually exclusive with the existing local/remote port pieces. This will give the most flexibility.

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

No branches or pull requests

2 participants