3 ms·
I'd be more interested in the security and usability aspect. Loopback sockets (assuming you don't accidentally bind to 0.0.0.0, which would make it even worse)
by rollcat 3y ago
I'd be more interested in the security and usability aspect. Loopback sockets (assuming you don't accidentally bind to 0.0.0.0, which would make it even worse) are effectively rwx to any process on the same machine that has the permission to open network connections, unless you bother with setting up a local firewall (which requires admin privileges). On top of that you need to figure out which port is free to bind to, and have a backup plan in case the port isn't free.
Domain sockets are simpler in both aspects: you can create one in any suitable directory, give it an arbitrary name, chmod it to control access, etc.