Analysis of information sources in references of the Wikipedia article "Tunneling protocol" in English language version.
the TCP forwarding code is pretty speedy as well. Just to pre-answer a question, ssh decapsulates and re-encapsulates TCP, so you don't have classic TCP-over-TCP issues.