Hacker News new | ask | show | jobs
by Tepix 41 days ago
As bandie pointed out, you‘re explicitly making a http request. Duh.

nc is for generic connections and handles it well.

1 comments

i know, but the OP's goal was to host/access http(s) services with names and avoid port numbers, and gopher service name was chosen by me as an example. my point was that /etc/services cannot be used for the OP's need.

if you host an http(s) service on port 11111 you can reach it with url http://127.1:11111, but url http://127.1:vce/ would not work in most software.

  $ grep 11111 /etc/services
  vce  11111/udp   # Viral Computing Environment (VCE)
  vce  11111/tcp   # Viral Computing Environment (VCE)
If I curl my phone number it doesn't connect, that's strange
can you please explain what you mean by this? because technically i do not see any similarity in this "analogy".
But if you want to contact vce, why use „http“? It‘s not going to work
Try http://127.0.0.1:hkp instead of http://127.0.0.1:11371 for an OpenPGP HTTP keyserver. HTTP will work, but using the service name won't. Does that make what they're trying to say clearer?
the question was "can we use port names from /etc/services instead of port numbers?"

how about "ssh://git@ssh.github.com:https/golang/go.git" instead of "ssh://git@ssh.github.com:443/golang/go.git"? does not work, hmm.