Allow remote_api client to connect to custom local port

Tested on local env and here: http://play.golang.org/p/fMogPEfgc8