main: add address validation and unix domain socket support

if this is "tcp", how about http://golang.org/pkg/net/#ResolveTCPAddr?