main: add address validation and unix domain socket support

Is there a reason we do not want to support it?
It seems to me that it is free and reduce our responsibility.