hannesm / jackline

minimalistic secure XMPP client in OCaml
BSD 2-Clause "Simplified" License
251 stars 20 forks source link

DNS resolver issues #213

Closed hannesm closed 2 years ago

hannesm commented 4 years ago

since ffd30e2bdbeba9394df9d4486882d02fd59a50de (Mar 2019), the uDNS / ocaml-dns resolver implementation is used by default (in contrast to gethostbyname / getaddrinfo) -- with the hardcoded 91.239.100.100 (uncensoreddns.org) via TCP recurser. This does not work in some environments where upstream blocks DNS queries which are not sent to upstream's resolver.

I got several reports about this, a workaround with the current (ec29ea96797aff0ea36afbcfce1956156f9ce120, Apr 2020) code is: export LD_PRELOAD 1 ; jackline (this way, the old getaddrinfo code path is taken).

Fixes include:

My preference is to get (1) and (3).

hannesm commented 4 years ago

@cfcs since you read up and worked on menhir recently, any chance you can come up with a /etc/resolv.conf parser for ocaml-dns? That'd be great (I suggest to put that into a dns-client.resolvconf package, part of the dns-client opam package).

hannesm commented 2 years ago

the dns client now uses /etc/resolv.conf and expects a nameserver that serves via TCP or TLS.