Skip to content
This repository has been archived by the owner on Oct 4, 2024. It is now read-only.

Hit the node on IPv4 localhost rather than hostname by default #929

Merged
merged 1 commit into from
Feb 21, 2022

Conversation

Ekleog
Copy link
Contributor

@Ekleog Ekleog commented Feb 7, 2022

The localnet local node (probably the only reason for this default value) defaults to listening only on IPv4.

Instead of defaulting on hostname-localhost, which would break on systems that default localhost to ::1, use 127.0.0.1 by default.

The better fix would be to actually have the node listen on IPv6, but this should be better than the current situation at least.

Fixes #881

The localnet local node (probably the only reason for this default value) defaults to listening only on IPv4.

Instead of defaulting on hostname-localhost, which would break on systems that default localhost to `::1`, use `127.0.0.1` by default.

The better fix would be to actually have the node listen on IPv6, but this should be better than the current situation at least.
@nikurt
Copy link
Contributor

nikurt commented Feb 7, 2022

The better fix would be to actually have the node listen on IPv6, but this should be better than the current situation at least.

Even better would be to support failing over to IPv4 resolution in NodeJS, as mentioned in #881 (comment)

@Ekleog
Copy link
Contributor Author

Ekleog commented Feb 9, 2022

Agreed, though it feels like it'd be much harder to do, especially if it needs to be implemented in NodeJS upstream; so in the meantime I think it makes sense to land that until NodeJS implements happy eyeballs

@nikurt nikurt requested a review from volovyks February 10, 2022 10:44
@volovyks volovyks merged commit 4b6fe76 into master Feb 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot connect to local node from host but can from external
4 participants