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 options for disabling the default listen address/transports #398

Merged
merged 2 commits into from
Aug 27, 2018

Conversation

Stebalien
Copy link
Member

So, in go-ipfs at least, we don't pass the listen addresses into the libp2p constructor. Instead, we specify them later.

This option allows us to tell libp2p to not listen by default.

The alternative is to just revert that PR and tell users that they need to configure libp2p to listen on some port. The question is really: "what's more surprising?"

@ghost ghost assigned Stebalien Aug 16, 2018
@ghost ghost added the status/in-progress In progress label Aug 16, 2018
@Stebalien Stebalien added kind/bug A bug in existing code (including security flaws) status/in-progress In progress and removed status/in-progress In progress kind/bug A bug in existing code (including security flaws) labels Aug 16, 2018
options.go Outdated
//
// This will both clear any configured listen addrs and prevent libp2p from
// applying the default listen address option.
var NoListen = func(cfg *Config) error {
Copy link
Member Author

Choose a reason for hiding this comment

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

NoListeners?

Copy link
Contributor

Choose a reason for hiding this comment

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

i'd vote NoListenAddrs

@Stebalien Stebalien requested a review from bigs August 21, 2018 19:27
So, in go-ipfs at least, we *don't* pass the listen addresses into the libp2p
constructor. Instead, we specify them later.

This option allows us to tell libp2p to not listen by default.
@Stebalien Stebalien added the need/review Needs a review label Aug 24, 2018
@Stebalien Stebalien merged commit cacf6f4 into master Aug 27, 2018
@ghost ghost removed the status/in-progress In progress label Aug 27, 2018
@Stebalien Stebalien deleted the feat/no-default-listen branch August 27, 2018 23:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need/review Needs a review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants