On 7 Dec 2022, at 20:59, Niall O'Reilly wrote:

On 6 Dec 2022, at 7:33, Daniel Stenberg wrote:

I think we could just extend the current logic and add the scheme to the mix. It's not like many users are going to first use one scheme and then switch to another to the same host name and port number (within the DNS cache timeout period) and get upset if we don't cache the address for that.

If I get time before someone else does, that looks like a place for me to start.

I've started on this, with the goal of making a roadmap for implementing
SVCB/HTTPS support in libcurl.

I'm using code based on doh.c from the curl/doh repo,
because DOH as the DNS interface is for me the least effort.

The steps I have in mind for the first stage are:

- accept a URL (rather than a hostname) as first argument;
- parse the URL to extract scheme, hostname, and port;
- construct QNAME and select QTYPE according to SVCB/HTTPS draft;
- submit DNS queries for QNAME/QTYPE, hostname/A, hostname/AAAA;
- follow redirection chains for Alias-mode SVCB/HTTPS and CNAME;
- report the "shopping list" of session parameters, matching these
  to features of released libcurl or of POC code in other forks,
  or else noting the need for new work.

When I've understood all of that, I plan to import some of this
code into a fork of curl itself, extending earlier ECH POC work.


Best regards,

Niall O'Reilly
-- 
Unsubscribe: https://lists.haxx.se/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html

Reply via email to