News for hackers. Stuff that matters.
Re:Why TCP over TCP Is a Bad Idea (2000) by lxgr on Friday October 25, 2024 @07:26PM (#41950969)
> In practice retransmits are rare between my endpoints

You seem to be mistaken about how (most) TCP implementations work. They regularly trigger packet loss and retransmissions as part of their mechanism to determine the optimal transmission rate over an entire path (made up of potentially multiple point-to-point connections with dynamically varying capacity).

That mechanism breaks down horribly when using TCP-over-TCP.

Re:Why TCP over TCP Is a Bad Idea (2000) by mlyle on Friday October 25, 2024 @08:00PM (#41951271)
But, my connection speed is usually greater and my loss is much less to my VPN endpoint than to whatever services I am accessing though that endpoint. As a result it doesn't affect things much. Further, accessing it with UDP is not always possible.
Re:Why TCP over TCP Is a Bad Idea (2000) by lxgr on Friday October 25, 2024 @09:32PM (#41951768)
> [...] my loss is much less [...]

Unless it's actually zero, any loss on the "outer" TCP stream will cause a retransmission, visible to the inner one as a sharp jump in latency of all data following the loss. Most TCP stacks don't handle that very well either.

Re:Why TCP over TCP Is a Bad Idea (2000) by mlyle on Friday October 25, 2024 @09:53PM (#41951852)
Sure, even when outer loss is pretty close to zero, it's conceptually not great.

On the other hand, I get 400mbps over TCP-over-TCP connections, and can't connect in any other reasonable way. 400mbps > 0.

Even tunneling in UDP is not great due to MTU effects.

Re:Why TCP over TCP Is a Bad Idea (2000) by screcth on Friday October 25, 2024 @08:37PM (#41951509)
Can't the tunneling software detect when the upper TCP is retransmitting segments and drop them?

That would give the lower TCP enough time to transmit the original segment.

Re:Why TCP over TCP Is a Bad Idea (2000) by lxgr on Friday October 25, 2024 @09:10PM (#41951663)
Maybe, but packet loss isn't the only problem. You'll also want to preserve latency (TCP has a pretty sophisticated latency estimation mechanism), for example.

Some middleboxes will also do terrible things to your TCP streams (restrictive firewalls only allowing TCP are good candidates for that), and then all bets are off.

If you're really required to use TCP, the "fake TCP" approach that others in sibling threads have mentioned seems more promising (but again, beware of middleboxes).