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 ability to pass a connection protector for private networking #210

Merged
merged 1 commit into from
Jul 24, 2018

Conversation

jacobheun
Copy link
Contributor

This adds the ability to specify a connection protector (private networking) via the new libp2p configuration. Once libp2p/js-libp2p-pnet#1 is released, we will be able to add that as a protector, such as through js-ipfs.

This will require an update to the libp2p-switch version once js-libp2p-switch#266 is released.

@ghost ghost assigned jacobheun Jun 28, 2018
@ghost ghost added the status/in-progress In progress label Jun 28, 2018
@jacobheun jacobheun force-pushed the feat/priv-net branch 4 times, most recently from 94404e8 to dea17c7 Compare July 5, 2018 10:05
fix: update protector config and tests
docs: add private network info to the readme
test: fix an issue with config
@@ -135,6 +136,7 @@ class Node extends libp2p {
connEncryption: [
SECIO
],
connProtector: new Protector(/*protector specific opts*/),
Copy link
Member

Choose a reason for hiding this comment

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

Do we want to have multiple Protectors or just just have it inside and enable it as a config value?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The implementation is based off of go which just supports a single, configurable protector. Users will be able to supply any protector they want, so it's extendable in the future as more protectors are created. In theory we could turn it into a list of protectors but I can't think of a use case where you'd want to do that as multiple levels of encryption on top of secio is really expensive.

If we produce more "intelligent" protectors in the future, those would be easy to swap out.

@daviddias daviddias mentioned this pull request Jul 22, 2018
14 tasks
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.

None yet

2 participants