curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.


From: Daniel Stenberg via curl-library <>
Date: Thu, 17 Aug 2023 09:38:34 +0200 (CEST)

On Thu, 17 Aug 2023, Magnus Röös via curl-library wrote:

> I can't find anything doing setsockopt on the DoH socket. Would it make
> sense to do something like this? Or would it make things worse? The reason
> is I'm trying to do policy based routing by setting mark/tos on requests. So
> I want everything from libcurl to go through the same routing rules. Or is
> there a reason for not doing it at all?

There's no good reason not to, no.

I have tried to come up with a general policy of what options to inherit or
how to allow the users to select what to inherit or set for DoH transfers, but
I have not really come up with anything better than what we have now: a set of
manually set options that are inherited from "the mother handle".

> This is untested code, and mostly there for discussion. If it makes sense I
> could do a proper pull request, or if there is a will for a separate opt I
> could do that too.

I believe this is a good take for now, go ahead and make a PR I say!

I could imagine creating an option in the future where the user can set what
options the DoH transfer should copy from the mother handle, and perhaps some
special callback way that allows applications to set specific options for DoH
transfer - but I'm not entirely sure how that should look like...

  | Commercial curl support up to 24x7 is available!
  | Private help, bug fixes, support, ports, new features

Received on 2023-08-17