-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Unusable IPv6 address printed #4630
Comments
Thank for report, feel free to send a PR, code is here https://github.com/webpack/webpack-dev-server/blob/master/lib/Server.js#L326, maybe https://github.com/whitequark/ipaddr.js/blob/master/README.md has function to undestand "working IPs" |
I looked into it but the way it's written won't work on my system. It's trying to find the machine's default gateway via the
So the It would be simple to reject link-local addresses:
but then no IPv6 address would be printed at all, unless there was a different logic than via the default gateway. |
The Generally I think webpack-dev-server should likely drop the |
@silverwind Make sense, do you want to send a PR? |
Not right now, but you can take some inspiration from vite. They completely ignore IPv6, which might be a (lazy) option as well. If IPv6 is supported, it should prefer unique global > unique local. |
I'm also getting this error occasionally on Linux (Fedora 38 x86) The order of preferences should be
|
I'll fix it |
I'd suggest to a least drop the |
Bug report
The network IPv6 address printed on my machine is
http://[fe80::1]:9684/
but that works neither on the same host nor over the network.Actual Behavior
This is what is printed on startup:
Opening a browser for
http://[fe80::1]:9684/
is not working.That's because
fe80:...
is a link local address that is not complete without specifying an interface:but
[fe80::1%lo0]
is not valid in URLs, and would not work from other machines on the same network anyways.Expected Behavior
This is what should be printed on my machine:
The last URL (
http://[fdf3:d6d6:1552:47c0:1cbc:d6a:fbe1:7201]:9684/
) actually works on my local machine, as well as from other machines.That's because
fdf3:...
is a "unique local address".How Do We Reproduce?
On macOS Monterey 12.5.1 and a Mac with wifi run
For context, here's the listing for my wifi interface:
The simplest fix for my machine would be excluding link-local addresses:
Please paste the results of
npx webpack-cli info
here, and mention other relevant informationThe text was updated successfully, but these errors were encountered: