Skip to content

Commit 4931e3e

Browse files
committed
Clarity TCP padding
1 parent fc3ea73 commit 4931e3e

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎ANONYMIZED-DNSCRYPT.txt‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,11 @@ relay as follows:
7272
Queries over UDP are sent as-is. Queries over TCP are prefixed by
7373
their length, encoded as two bytes in big-endian.
7474

75+
Relays always forward <dnscrypt-query> to servers over UDP, and drop
76+
responses larger than it. Clients using TCP to reach a relay should
77+
therefore pad <dnscrypt-query> to 4096 bytes, so that large responses
78+
can still be received. This also applies to post-quantum queries.
79+
7580
3. Relays
7681
---------
7782

@@ -95,7 +100,7 @@ relay must immediately respond with an empty packet.
95100

96101
Once a response from the server has been received, the relay:
97102

98-
- must verify that the response is smaller than the query.
103+
- must verify that the response is not larger than <dnscrypt-query>.
99104
- may validate that the response:
100105
- either starts with <resolver-magic>
101106
(0x72 0x36 0x66 0x6e 0x76 0x57 0x6a 0x38) followed by <client-nonce>

0 commit comments

Comments
 (0)