tina-hello/doh-cf-workers

ecs support

Auction99 opened this issue · 1 comments

If the upstream dns supports ecs, can cf-doh support ecs?

Yes, by passing the subnet in the request. It's pretty simple for GET request, as shown in https://github.com/justid/doh-cf-workers/blob/main/index.js, but for POST I'd have to parse the DNS message, which is far more complex (I think there was a library that handle that, but I'm not sure if it would work on workers). The problem is, one of the most popular way to use DoH is through browsers, and AFAIK both Chromium and Firefox use POST.

There's also another problem with some upstream and nameserver returning NXDOMAIN/REFUSED if ECS is used, so it would be a bit of trial and error to verify that the setup works.

If I ever going to tackle this, I'd probably going to do it in another repo because the result will be far more complicated than this repo's goal.