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 Tor Transport support #765

Merged
merged 21 commits into from
Nov 4, 2022
Merged

Add Tor Transport support #765

merged 21 commits into from
Nov 4, 2022

Conversation

diegomrsantos
Copy link
Contributor

@diegomrsantos diegomrsantos commented Sep 8, 2022

Description

Adding a libp2p transport for the Tor Network. We aim to support dialing and listening.

Dialing

The first version assumes a Tor Server is available on localhost and can accept SOCKS5 connections.

Listening

The first version assumes a Tor Server is available and Onion Services are configured to redirect traffic to TCP connections which the peer will be listening on.

@diegomrsantos diegomrsantos changed the title Add socks5 support Add Tor Transport support Sep 19, 2022
@diegomrsantos diegomrsantos changed the base branch from unstable to optional-observed-addr September 22, 2022 12:05
Base automatically changed from optional-observed-addr to unstable September 22, 2022 19:56
@diegomrsantos diegomrsantos force-pushed the add-socks5-support branch 3 times, most recently from 08bdb26 to 13e0508 Compare September 29, 2022 18:04
@diegomrsantos diegomrsantos marked this pull request as ready for review October 25, 2022 14:46
transp: StreamTransport, address: MultiAddress) {.async, gcsafe.} =

let addressArray = ($address).split('/')
let addressStr = addressArray[2].split(':')[0] & ".onion"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this be an index error in certain weird case?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure. Is it possible to do it in a safer way?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if addressArray.len < 2: raise whatever

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

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.

3 participants