[WIP] Add proxy support

This looks broken, why is the nex host expected to be a string as long as the proxy one? This will overflow the buffer.