Add support for specifying local endpoint