Re: [dev] suckless dns over http client

From: Laslo Hunhold <dev_AT_frign.de>
Date: Tue, 3 Apr 2018 21:43:32 +0200

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 - 21:43:32 CEST

This archive was generated by hypermail 2.3.0 : Tue Apr 03 2018 - 21:48:29 CEST