package dns-stub

  1. Overview
  2. Docs
DNS stub resolver

Install

dune-project
 Dependency

Authors

Maintainers

Sources

dns-10.2.4.tbz
sha256=d852d15ca2f58db573679bf18688745600b91296e2e54486609869d666f3d12f
sha512=09d3b1cf76bccbff1a0c042922a3e9d6fa3605770d3d9d9aab3462f32d9156c87f6468b531f27dbcc1ce9030c1bd5f3c81c051f5f6a7ee7d802c1fddf1848058

doc/dns-stub.mirage/Dns_stub_mirage/Make/index.html

Module Dns_stub_mirage.MakeSource

Parameters

Signature

Sourcetype t
module H : sig ... end
Sourceval create : ?add_reserved:bool -> ?record_clients:bool -> ?cache_size:int -> ?udp:bool -> ?tcp:bool -> ?port:int -> ?tls:Tls.Config.server -> ?tls_port:int -> ?edns:[ `Auto | `Manual of Dns.Edns.t | `None ] -> ?nameservers:string list -> ?timeout:int64 -> ?on_update: (old:Dns_trie.t -> ?authenticated_key:[ `raw ] Domain_name.t -> update_source:Ipaddr.t -> Dns_trie.t -> unit Lwt.t) -> Dns_server.Primary.s -> happy_eyeballs:H.t -> S.t -> t Lwt.t

create ~add_reserved ~record_clients ~cache_size ~edns ~nameservers ~timeout ~on_update server ~happy_eyeballs stack registers a stub resolver on the provided protocols udp, tcp, tls using port for udp and tcp (defaults to 53), tls_port for tls (defaults to 853) using the resolver configuration. The timer is in milliseconds and defaults to 500 milliseconds.

If record_clients is true (the default), the metrics of the resolver will include the amount of clients. This keeps a set of Ipaddr.t of all clients around, which may use some memory if it is a public resolver.

The add_reserved is by default true, and adds reserved zones (from RFC 6303, 6761, 6762) to the primary server (see Dns_resolver_root.reserved_zones).

include Dns_resolver_mirage_shared.S with type t := t
Sourceval resolve_external : t -> (Ipaddr.t * int) -> string -> [ `Close | `Data of int32 * string ] Lwt.t
Sourceval primary_data : t -> Dns_trie.t
Sourceval update_primary_data : t -> Dns_trie.t -> unit
Sourceval update_tls : t -> Tls.Config.server -> unit
Sourceval queries : t -> Dns_resolver_mirage_shared.query_info Lwt_condition.t