{"id":10764806,"name":"github.com/devnw/dnslib","ecosystem":"go","description":"Package dns implements a full featured interface to the Domain Name System.\nBoth server- and client-side programming is supported. The package allows\ncomplete control over what is sent out to the DNS. The API follows the\nless-is-more principle, by presenting a small, clean interface.\n\nIt supports (asynchronous) querying/replying, incoming/outgoing zone transfers,\nTSIG, EDNS0, dynamic updates, notifies and DNSSEC validation/signing.\n\nNote that domain names MUST be fully qualified before sending them, unqualified\nnames in a message will result in a packing failure.\n\nResource records are native types. They are not stored in wire format. Basic\nusage pattern for creating a new resource record:\n\nOr directly from a string:\n\nOr when the default origin (.) and TTL (3600) and class (IN) suit you:\n\nOr even:\n\nIn the DNS messages are exchanged, these messages contain resource records\n(sets). Use pattern for creating a message:\n\nOr when not certain if the domain name is fully qualified:\n\nThe message m is now a message with the question section set to ask the MX\nrecords for the miek.nl. zone.\n\nThe following is slightly more verbose, but more flexible:\n\nAfter creating a message it can be sent. Basic use pattern for synchronous\nquerying the DNS at a server configured on 127.0.0.1 and port 53:\n\nSuppressing multiple outstanding queries (with the same question, type and\nclass) is as easy as setting:\n\nMore advanced options are available using a net.Dialer and the corresponding API.\nFor example it is possible to set a timeout, or to specify a source IP address\nand port to use for the connection:\n\nIf these \"advanced\" features are not needed, a simple UDP query can be sent,\nwith:\n\nWhen this functions returns you will get dns message. A dns message consists\nout of four sections.\nThe question section: in.Question, the answer section: in.Answer,\nthe authority section: in.Ns and the additional section: in.Extra.\n\nEach of these sections (except the Question section) contain a []RR. Basic\nuse pattern for accessing the rdata of a TXT RR as the first RR in\nthe Answer section:\n\nBoth domain names and TXT character strings are converted to presentation form\nboth when unpacked and when converted to strings.\n\nFor TXT character strings, tabs, carriage returns and line feeds will be\nconverted to \\t, \\r and \\n respectively. Back slashes and quotations marks will\nbe escaped. Bytes below 32 and above 127 will be converted to \\DDD form.\n\nFor domain names, in addition to the above rules brackets, periods, spaces,\nsemicolons and the at symbol are escaped.\n\nDNSSEC (DNS Security Extension) adds a layer of security to the DNS. It uses\npublic key cryptography to sign resource records. The public keys are stored in\nDNSKEY records and the signatures in RRSIG records.\n\nRequesting DNSSEC information for a zone is done by adding the DO (DNSSEC OK)\nbit to a request.\n\nSignature generation, signature verification and key generation are all supported.\n\nDynamic updates reuses the DNS message format, but renames three of the\nsections. Question is Zone, Answer is Prerequisite, Authority is Update, only\nthe Additional is not renamed. See RFC 2136 for the gory details.\n\nYou can set a rather complex set of rules for the existence of absence of\ncertain resource records or names in a zone to specify if resource records\nshould be added or removed. The table from RFC 2136 supplemented with the Go\nDNS function shows which functions exist to specify the prerequisites.\n\nThe prerequisite section can also be left empty. If you have decided on the\nprerequisites you can tell what RRs should be added or deleted. The next table\nshows the options you have and what functions to call.\n\nAn TSIG or transaction signature adds a HMAC TSIG record to each message sent.\nThe supported algorithms include: HmacMD5, HmacSHA1, HmacSHA256 and HmacSHA512.\n\nBasic use pattern when querying with a TSIG name \"axfr.\" (note that these key names\nmust be fully qualified - as they are domain names) and the base64 secret\n\"so6ZGir4GPAqINNh9U5c3A==\":\n\nIf an incoming message contains a TSIG record it MUST be the last record in\nthe additional section (RFC2845 3.2).  This means that you should make the\ncall to SetTsig last, right before executing the query.  If you make any\nchanges to the RRset after calling SetTsig() the signature will be incorrect.\n\nWhen requesting an zone transfer (almost all TSIG usage is when requesting zone\ntransfers), with TSIG, this is the basic use pattern. In this example we\nrequest an AXFR for miek.nl. with TSIG key named \"axfr.\" and secret\n\"so6ZGir4GPAqINNh9U5c3A==\" and using the server 176.58.119.54:\n\nYou can now read the records from the transfer as they come in. Each envelope\nis checked with TSIG. If something is not correct an error is returned.\n\nBasic use pattern validating and replying to a message that has TSIG set.\n\nRFC 6895 sets aside a range of type codes for private use. This range is 65,280\n- 65,534 (0xFF00 - 0xFFFE). When experimenting with new Resource Records these\ncan be used, before requesting an official type code from IANA.\n\nSee https://miek.nl/2014/September/21/idn-and-private-rr-in-go-dns/ for more\ninformation.\n\nEDNS0 is an extension mechanism for the DNS defined in RFC 2671 and updated by\nRFC 6891. It defines an new RR type, the OPT RR, which is then completely\nabused.\n\nBasic use pattern for creating an (empty) OPT RR:\n\nThe rdata of an OPT RR consists out of a slice of EDNS0 (RFC 6891) interfaces.\nCurrently only a few have been standardized: EDNS0_NSID (RFC 5001) and\nEDNS0_SUBNET (draft-vandergaast-edns-client-subnet-02). Note that these options\nmay be combined in an OPT RR. Basic use pattern for a server to check if (and\nwhich) options are set:\n\nSIG(0)\n\nFrom RFC 2931:\n\nIt works like TSIG, except that SIG(0) uses public key cryptography, instead of\nthe shared secret approach in TSIG. Supported algorithms: DSA, ECDSAP256SHA256,\nECDSAP384SHA384, RSASHA1, RSASHA256 and RSASHA512.\n\nSigning subsequent messages in multi-message sessions is not implemented.","homepage":"https://github.com/devnw/dnslib","licenses":"BSD-3-Clause","normalized_licenses":["BSD-3-Clause"],"repository_url":"https://github.com/devnw/dnslib","keywords_array":[],"namespace":"github.com/devnw","versions_count":67,"first_release_published_at":"2017-12-06T09:46:54.000Z","latest_release_published_at":"2022-06-21T08:38:26.000Z","latest_release_number":"v1.1.50","last_synced_at":"2026-05-06T13:08:05.399Z","created_at":"2024-07-30T08:58:52.271Z","updated_at":"2026-05-06T13:08:05.399Z","registry_url":"https://pkg.go.dev/github.com/devnw/dnslib","install_command":"go get github.com/devnw/dnslib","documentation_url":"https://pkg.go.dev/github.com/devnw/dnslib#section-documentation","metadata":{},"repo_metadata":{"id":103031788,"uuid":"513837374","full_name":"devnw/dnslib","owner":"devnw","description":"DNS library in Go","archived":false,"fork":true,"pushed_at":"2024-06-25T03:22:51.000Z","size":15713,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2024-06-25T04:35:11.816Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://miek.nl/2014/august/16/go-dns-package","language":"Go","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"miekg/dns","license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devnw.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null}},"created_at":"2022-07-14T09:25:33.000Z","updated_at":"2024-06-25T03:22:55.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/devnw/dnslib","commit_stats":null,"previous_names":[],"tags_count":67,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devnw%2Fdnslib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devnw%2Fdnslib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devnw%2Fdnslib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devnw%2Fdnslib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devnw","download_url":"https://codeload.github.com/devnw/dnslib/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":213160323,"owners_count":15545954,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"repo_metadata_updated_at":"2024-07-30T09:02:55.851Z","dependent_packages_count":0,"downloads":null,"downloads_period":null,"dependent_repos_count":0,"rankings":{"downloads":null,"dependent_repos_count":6.742734905903086,"dependent_packages_count":6.31677436113705,"stargazers_count":null,"forks_count":null,"docker_downloads_count":null,"average":6.529754633520068},"purl":"pkg:golang/github.com/devnw/dnslib","advisories":[],"docker_usage_url":"https://docker.ecosyste.ms/usage/go/github.com/devnw/dnslib","docker_dependents_count":null,"docker_downloads_count":null,"usage_url":"https://repos.ecosyste.ms/usage/go/github.com/devnw/dnslib","dependent_repositories_url":"https://repos.ecosyste.ms/api/v1/usage/go/github.com/devnw/dnslib/dependencies","status":null,"funding_links":[],"critical":null,"issue_metadata":null,"versions_url":"https://packages.ecosyste.ms/api/v1/registries/proxy.golang.org/packages/github.com%2Fdevnw%2Fdnslib/versions","version_numbers_url":"https://packages.ecosyste.ms/api/v1/registries/proxy.golang.org/packages/github.com%2Fdevnw%2Fdnslib/version_numbers","latest_version_url":"https://packages.ecosyste.ms/api/v1/registries/proxy.golang.org/packages/github.com%2Fdevnw%2Fdnslib/latest_version","dependent_packages_url":"https://packages.ecosyste.ms/api/v1/registries/proxy.golang.org/packages/github.com%2Fdevnw%2Fdnslib/dependent_packages","related_packages_url":"https://packages.ecosyste.ms/api/v1/registries/proxy.golang.org/packages/github.com%2Fdevnw%2Fdnslib/related_packages","codemeta_url":"https://packages.ecosyste.ms/api/v1/registries/proxy.golang.org/packages/github.com%2Fdevnw%2Fdnslib/codemeta","maintainers":[]}