I know the one in bash is fake but I'm saying that /dev/tcp and /dev/udp could be filesystems like /dev or /proc
Open /dev/tcp/google.com/80 or /dev/tcp/192.168.1.1/22 or whatever.
Instead of having your web server start as root and then do some UID switching to drop priveleges why not have it start as a non priveleged user from the beginning?
The ports under 1024 are reserved for root but how about we get rid of that and have files for every port number? Then use chown and chmod to set permissions and only let the httpd user account read and write to port 80?
That's wrong. /dev/tcp or /dev/udp should be devices themselves, not a fake one for bash.