main: add address validation and unix domain socket support

You can't bind on a hostname