Live data from Hacker News

I Got Sick of Remembering Port Numbers

gregraiz.com

61–70 of 171 posts

Re: I Got Sick of Remembering Port Numbers

#61
post #6

It's like someone should make a file... maybe in /etc ... and put short names for services in it... maybe it could be called /etc/services...

If the port number space was bigger, I wonder if we would have gotten a global naming service (ala DNS) for unique service names.

You can still publish port numbers along with addresses in DNS though (SRV records).

Re: I Got Sick of Remembering Port Numbers

#62

There is no need to come up with "local TLDs" like .vibe, .local, .test and so on -- there is already an industry convention! macOS and most Linux distros support subdomains of localhost, so .localhost works. You still need the reverse proxy to do the host->port mapping, but you save yourself local DNS fiddling.

> There is no need to come up with "local TLDs" like .vibe, .local, .test and so on -- there is already an industry convention! macOS and most Linux distros support subdomains of localhost, so .localhost works. That would work if your goal was to route traffic to localhost. What if it isn't? There are reasons why the likes of example.com exists.

From the article:

> So I built local.vibe — a friendly dashboard and local .vibe hostname for every local web app on your Mac. No more localhost:3000 vs localhost:5173 roulette.

> The whole thing communicates over a Unix socket acting as a reverse proxy. No external services, no accounts, no telemetry.

We’re discussing a tool that is designed for – and is only capable of – routing traffic to localhost. It’s perfectly reasonable to point out that there’s an easier solution for this use case.

Re: I Got Sick of Remembering Port Numbers

#63

I know it's mixing of layers, but I can't help but feel the IPv6 transition missed the boat when they didn't just get rid of ports in the process. They've changed so much else anyway. Want to run another webserver instance or whatever on your computer? Get the OS to allocate a new IP for it. Ports be damned. Could be implemented in a backwards compatible way by requiring all IPv6 TCP/UDP traffic to use a fixed port n…

ipv6 packet does not have any port field. ports are on the level of tcp and udp, and you don't have to use tcp or udp on top of ipv6. ipv4 packet does not have any port information as well.

Re: I Got Sick of Remembering Port Numbers

#64
There's a simple method you can use with nginx and /etc/hosts, I wrote about it couple days ago [0]. I used it for an internal demo recently and realized that a new breed of devs have never seen a non localhost url run locally.

[0]: https://idiallo.com/blog/say-no-to-localhost3000-use-custom-...

Re: I Got Sick of Remembering Port Numbers

#65
post #6

It's like someone should make a file... maybe in /etc ... and put short names for services in it... maybe it could be called /etc/services...

Not modern enough. Unix is too low level, antiquated, and discriminates against those who just want to get shit done instead of reading manpages or documentation by hand.
Post reply on HN