Revert "Revert "localhost connection include port number""

This reverts commit 04685502815fb106f096863c22404d1730b69cfb.