main: add address validation and unix domain socket support

If you're just passing the value of `proto` through to `net.Listen()`, this switch statement seems like overkill