move Ryan's proxy code from client.lua to Connection class

also remove connect_old() method in client.lua

No tests yet :(