-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dropped TCP/HTTP connections #1658
Comments
Hello! Yes, QUIC is blocked since out HTTP/3 filtering is not yet complete. But work is in progress. We will also check if we can save original socket's keepalive flag. |
Thanks a lot. Please ping me/respond here when the keepalive has been implemented, so I can install AdGuard again. Currently the connection drops are so bad that I had to disable it :/ |
@ViRb3 Hi! It seems like an easy fix is not going to be on the table any time soon since Apple "forgot" (in fact, didn't care) to make the keepalive flag (in fact, all socket options) of the proxied socket available to the transparent proxy via the Still I'd like to look more into this issue. I wonder if the problem is not, or not entirely, with the keepalives not being sent. It seems to me that a NAT should at least send RST when the port binding expires. In order to debug this, can you please do the following:
|
EDIT: Nevermind, seems like it takes a while for the issue to trigger after an initial reboot. Will try to capture logs soon. |
I was able to capture the logs and pcap and have sent them over e-mail. Ticket #622859. Note that I anonymized the pcap via tracewrangler, but I kept the destination IP address intact, which I pinned via
|
This is a dup of #487. |
What about the dropped TCP connections in HTTP2? |
@ViRb3 As a temporary workaround you can either uncheck the problematic apps in |
System
Problem
I recently switched to an ISP which uses a carrier-grade NAT (CGNAT) due to the global shortage of IPv4 addresses. I immediately noticed that some apps, namely Discord and Telegram, started losing connection very frequently. For example, when you first start Discord, it will work great. If you wait for a few minutes, then try to do any action that requires network IO, such as sending a message or loading somebody else's profile picture, this action will hang for up to 30 seconds before it suddenly works again. The app will then work for a few minutes, but after that, the same repeats.
I analyzed the issue with WireShark, and here are my findings.
It is a fact that CGNAT ISPs employ aggressive TCP timeouts in order to keep enough ports free for all of their customers. This means that if a TCP socket does not receive any traffic for a few minutes, it gets dropped and reused. I had the same issue with SSH, but after I enabled keepalive, everything was good. It appears that the problem here is AdGuard does not send these keepalive packets, which in turn allows my ISP to kill all connections used by Discord, Telegram, and most definitely a lot of other apps which reuse connections.
Happy to share pcap files or more information if needed.
Thanks!
The text was updated successfully, but these errors were encountered: