main: add address validation and unix domain socket support

can we use http://golang.org/pkg/net/#SplitHostPort?