Skip to content

Commit 6b435f3

Browse files
Update README.md for new --ednsopt option
1 parent 5b9389a commit 6b435f3

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

README.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ Application Options:
5959
--refuse-any If specified, refuse ANY requests
6060
--edns Use EDNS Client Subnet extension
6161
--edns-addr= Send EDNS Client Address
62+
--ednsopt= List of EDNS extensions to send along with the DNS query (ex: 8:deadbeaf)
6263
--ipv6-disabled If specified, all AAAA requests will be replied with NoError RCode and empty answer
6364
--bogus-nxdomain= Transform responses that contain only given IP addresses into NXDOMAIN. Can be specified multiple times.
6465
--version Prints the program version
@@ -202,6 +203,25 @@ If you want to use EDNS CS feature when you're connecting to the proxy from a lo
202203

203204
Now even if your IP address is 192.168.0.1 and it's not a public IP, the proxy will pass through 72.72.72.72 to the upstream server.
204205

206+
207+
### EDNS Generic raw option
208+
209+
You can add any EDNS extension of your choice with the `--ednsopt` flag.
210+
211+
The option argument for this flag is of the form:
212+
213+
option_code:base64_data
214+
215+
where:
216+
217+
`option_code` is a 16 bit unsigned integer (0-65535)
218+
`base64_data` is a base64 encoded byte array
219+
220+
```
221+
DATA=$(echo -n "This is a binary string" | base64)
222+
./dnsproxy -u 8.8.8.8:53 --ednsopt="4242:${DATA}"
223+
```
224+
205225
### Bogus NXDomain
206226

207227
This option is similar to dnsmasq `bogus-nxdomain`. If specified, `dnsproxy` transforms responses that contain only the given IP addresses into `NXDOMAIN`. Can be specified multiple times.
@@ -210,4 +230,4 @@ In the example below, we use AdGuard DNS server that returns `0.0.0.0` for block
210230

211231
```
212232
./dnsproxy -u 176.103.130.130:53 --bogus-nxdomain=0.0.0.0
213-
```
233+
```

0 commit comments

Comments
 (0)