connection failure tests and fixes with TCP proxy

more to come