move util.JoinStreams into proxy code