changning to also support unix domain socket for local server