4 ms·
I automatically cringe and walk away when I see tcp over tcp. I’ve been bitten by it too many times. Someone correct me if I’m wrong, but it’s fundamentally inc
by ComputerGuru 7y ago
I automatically cringe and walk away when I see tcp over tcp. I’ve been bitten by it too many times. Someone correct me if I’m wrong, but it’s fundamentally incorrect and is pretty much guaranteed to devolve into pathological cases.
- xrisk 7y agoUseful for tunnelling out of environments where UDP is blocked.
- pkulak 7y agoSOCKS seems okay.
- mrb 7y agoSOCKS is not TCP over TCP. Application data (not TCP packets) is directly transferred over one TCP connection.
- mrb 7y agoHere is what the author of DSVPN says in the readme about that: «TCP-over-TCP is not as bad as some documents describe. It works surprisingly well in practice, especially with modern congestion control algorithms (BBR). For traditional algorithms that rely on packet loss, DSVPN couples the inner and outer congestion controllers by lowering TCP_NOTSENT_LOWAT and dropping packets when congestion is detected at the outer layer.»
- xfs 7y agoThis is wrong. BBR still does retransmission if packets do not arrive on time, and any retransmission in the inner TCP stack automatically becomes badput that wastes the outer TCP stack which is likely at the same time also doing retransmission for packet losses at lower layer. TCP_NOTSENT_LOWAT is not a solution to this either. It is a solution for HTTP/2 to be more aware of the congestion state and prioritize traffic properly, which itself does not do retransmission. It makes the buffer smaller so congestion is reported to upper layer earlier but still much later than when the actual congestion happens, distorting the upper/inner TCP congestion control. Also, a 128KiB value is hardcoded here for this knob, effectively rendering it only useful for a bandwidth delay product of 5Mbps * 200ms RTT.
- apenwarr 7y agoI’ve noticed a pattern where crypto people don’t seem to understand the edge cases of tcp congestion control, so I agree that this workaround is suspicious. Of course, it’s better than no VPN if your UDP is blocked. I like sshuttle’s way better (but I’m biased). However, it’s not broken in the exact way you’re thinking. TCP_NOTSENT_LOWAT is diffent from TCP_LOWAT. The latter would imply a hardcoded bandwidth-delay product. The one they’re using is a margin on top of the bandwidth-delay product, which mostly just depends on a fast enough CPU. They’re using a surprisingly high value for it though.
- pjc50 7y agoIn the messier parts of the real world where UDP is treated badly, it often works better than UDP VPNs. Unfortunate but there we go. The main reason for using a TCP port 443 VPN is if your network administrator blocks everything else.
- wongarsu 7y agoI often use a VPN over TCP port 443 from a network that blocks all UDP traffic. It works quite well in practice. I use a wired connection, all routers and switches on our side are oversized professional units and the uplink is a beefy fiber link, so my packet loss rate is basically zero. Your results may vary.
- ComputerGuru 7y agoYeah, if the environment is tightly controlled with known configurations and not too much congestion, it’ll work alright. But try with a spotty connection, differing MTUs, irregular latencies, etc. I am much more intrigued by the attempts at breaking out of networks by tunneling over DNS (where that flavor of UDP traffic is let through) and ICMP (when not blocked).
- samoa42 7y agotcp-over-tcp is bad but tcp-over-dns is ok? man ... get out more
- samoa42 7y agoyes. in theory it is a bad idea. in practice it works absolutely fine and infinite-percent better than a blocked udp-tunnel.
- peterwwillis 7y agoThis. I get that WireGuard maintainers don't want to deal with users complaining about TCP performance problems, but the result is users have to use a different VPN client which may be less secure. Totally within their rights, but annoying.