main: add address validation and unix domain socket support

Those also supports hostnames, which I don't believe we want to support?