h2o 2.2.5
So it is likely I am doing it wrong, or that I have unrealistic expectations.
The repo is: https://github.com/ahupowerdns/pdns/tree/dnsdist-doh The file with all the H2O in there: https://github.com/ahupowerdns/pdns/blob/dnsdist-doh/pdns/dnsdistdist/doh.cc
The model is that I register a handler (in register_handler
). This receives DNS over HTTPS requests, in the function doh_handler
, and forwards these queries to a DNS thread which does no h2o interactions. Crucially, it forwards the h2o_req_t pointer to that thread too.
This separate DNS thread does its thing, and then forwards the answer to yet another thread that receives DNS responses and feeds them back to h2o. This sender thread receives the h2o_req_t pointer that was originally sent from the doh_handler
and uses it to send the response.