vercel / serve

Static file serving and directory listing
https://npmjs.com/package/serve
MIT License
9.25k stars 683 forks source link

Don't show VMware Network Address #671

Open nnnbbb opened 2 years ago

nnnbbb commented 2 years ago

My computer is installed VMware, http://192.168.62.1 Is the network address of the VMware

   ┌──────────────────────────────────────────────────┐
   │                                                  │
   │   Serving!                                       │
   │                                                  │
   │   - Local:            http://localhost:5000      │
   │   - On Your Network:  http://192.168.62.1:5000   │
   │                                                  │
   │   Copied local address to clipboard!             │
   │                                                  │
   └──────────────────────────────────────────────────┘

if (family === 'IPv4' && !internal) {https://github.com/vercel/serve/blob/30b06737b41fcab9d0a49bbac8a9b598869550f4/bin/serve.js#L181

fix:

      if (family === 'IPv4' && !internal && name === 'WLAN') {
warren-bank commented 2 years ago

personally, I would disagree..

this would prevent a notification message when the network adapter is: