package dns-stub

  1. Overview
  2. Docs
DNS stub resolver

Install

dune-project
 Dependency

Authors

Maintainers

Sources

dns-10.2.1.tbz
sha256=b488cf4c514fd57d4a2cb29b99d4234ae6845eff0d5e79b1059f779f7342478a
sha512=85a7607aee53e5e8a585938c2ab2405a702a1cafbadb609261f27bc7657af8f852d79e9fa014ff79fb1d143e2a77eb7e9c675cdef17b8e9a231295fdb8ce7d79

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 : ?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 ~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.

include module type of Dns_resolver_mirage_shared with type t := t
Sourceval resolve_external : t -> (Ipaddr.t * int) -> string -> (int32 * string) Lwt.t

resolve_external t (ip, port) data resolves for (ip, port) the query data and returns a pair of the minimum TTL and a response.

Sourceval primary_data : t -> Dns_trie.t

primary_data t is the DNS trie of the primary for the resolver t.

Sourceval update_primary_data : t -> Dns_trie.t -> unit

update_primary_data t data updates the primary for the resolver t with the DNS trie data. Any 'notify's to secondaries are discarded - secondary name servers are not supported in this setup.

Sourceval update_tls : t -> Tls.Config.server -> unit

update_tls t tls_config updates the tls configuration to tls_config. If the resolver wasn't already listening for TLS connections it will start listening.