aarond10 / https_dns_proxy

A lightweight DNS-over-HTTPS proxy.
MIT License
779 stars 114 forks source link

Set DSCP on outgoing https requests #82

Closed ldir-EDB0 closed 4 years ago

ldir-EDB0 commented 4 years ago

It would be really good if there was a way to set the DSCP (aka TOS) field on the outgoing https requests.

Looks like CURLOPT_SOCKOPTFUNCTION might offer a way of doing this. Ultimately I think it needs to do something like:

int tos = IPTOS_CLASS_CS6;

if (family == AF_INET6) setsockopt(fd, IPPROTO_IPV6, IP_TOS, &tos, sizeof(tos)); else rc = setsockopt(fd, IPPROTO_IP, IP_TOS, &tos, sizeof(tos));