Automatically detect blocked anonymized DNS relay servers according to transport layer protocol #2137
Replies: 3 comments
-
Some of my thoughts:
Maybe the issue is unique in your scenario, others neither have it nor can reproduce it. It will need you provide more exact information to get helped. |
Beta Was this translation helpful? Give feedback.
-
Yes, the '-p' option should be followed the PID of the process to be observed, and will only show connections for that process. When observing the running
where 37.120.235.187:https is
No.
This is highly probable, but when most TCP connections to a specific relay/server will timeout, should
They are stuck, but it looks very similar that |
Beta Was this translation helpful? Give feedback.
-
With anonymized DNSCrypt (
The logic has no problem.
Any There are 19 TCP and 12 UDP connecting-outs to those relays in your paste. That is not too many. There shouldn't be full client workload all the time.
And for the relays you listed, UDP should be very slow to timeout. Here are 2 inferences:
So, for the
I guess the key problem is the network is not stable enough. Detecting for each query is not good strategy, it still may wait for timeout. |
Beta Was this translation helpful? Give feedback.
-
I once used the following config for anonymized DNS relay config:
But some Autonomous system may block unfamiliar protocol over TCP (e.g. anonymized DNSCrypt protocol over port 443). As I observed, they do so by swallowing the outgoing SYN packets, leaving a lot of TCP connections stuck in SYN state. When observing my dnscrypt-proxy 2.0.45 via its log, I could see
[WARNING] Too many incoming connections
, as such:but in reality, it is OUTGOING TCP connections stuck in SYN state that crowd out the connection pool, and a great amount of them are observable via
lsof(8) -np
.I do not know exactly how dnscrypt-proxy handle network traffics for (anonymized) DNSCrypt protocol, but TCP connections to a server being blocked does not means UDP accesses too being blocked, since UDP is not connection-oriented. A (relay) server may be accessible via UDP, but TCP connections to it are blocked by the intermediary AS. In "Anonymizing queries for" state dnscrypt-proxy may successfully access the server via UDP, and mark the server usable, but when it later tries to query the same server via TCP (may be for queries larger than MTU), connections will get blocked, but dnscrypt-proxy 2.0.45 will keep trying dozens of time, leaving a lot of connections stuck in SYN state crowding out the connection pool.
Now I have to write some scripts to pick relay servers without TCP connections to them blocked, and only use these servers in the config file, but TCP-blocked servers should be programmatically detectable.
I suggest that dnscrypt-proxy should be able to detect and mark whether a DNSCrypt (relay) server is accessible via TCP and UDP independently, and refuse to perform queries via the blocked transport layer protocol until the next checking for configured servers.
Beta Was this translation helpful? Give feedback.
All reactions