Add support for specifying external port