Re: [dev] suckless dns over http client

From: harry666t <harry666t_AT_gmail.com>
Date: Tue, 3 Apr 2018 22:12:02 +0200

My take - if you don't mind Go...
https://github.com/rollcat/gdoh
No forking, no dependencies outside of stdlib, async
queries/responses, allows using multiple providers, 78 loc.

> I'm pretty sure DNS over HTTPS runs on top of a TCP stream and not a UDP stream.

In Calvin's sdohd, it's curl doing all of the TCP+TLS+HTTPS heavy lifting.
The UDP socket accepts actual DNS requests from the local machine and
mangles them into DoH.

<3,K.

On 3 April 2018 at 21:43, Laslo Hunhold <dev_AT_frign.de> wrote:
> On Tue, 3 Apr 2018 00:12:01 -0400
> Calvin Morrison <mutantturkey_AT_gmail.com> wrote:
>
> Hey Calvin,
>
>> Presenting sdohd(1) - simple dns over https daemon [0]f
>>
>> okay I wrote it see below. depends on curl, also i havent written C in
>> a long time so I didn't really have a good grasp on allocating stuff,
>> nor did i read the actual spec on dns so i hope bufsize = 256 is big
>> enough for any dns response, who knows, whatever, it kind of works.
>
> I'm pretty sure DNS over HTTPS runs on top of a TCP stream and not a
> UDP stream.
>
> if ((fd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
> perror("cannot create socket\n");
> return 0;
> }
>
> Taken from here[0].
>
> With best regards
>
> Laslo
>
> [0]:https://github.com/mutantturkey/sdohd/blob/master/sdohd.c
>
> --
> Laslo Hunhold <dev_AT_frign.de>
>
Received on Tue Apr 03 2018 - 22:12:02 CEST

This archive was generated by hypermail 2.3.0 : Tue Apr 03 2018 - 22:24:19 CEST