From 562fc28cda29c3c438b4829e3cafe16821a37a33 Mon Sep 17 00:00:00 2001 From: theanarkh Date: Wed, 10 Sep 2025 00:43:18 +0800 Subject: [PATCH] dns: support rotate dns servers --- doc/api/dns.md | 5 + lib/internal/dns/utils.js | 29 ++++-- src/cares_wrap.cc | 25 ++++- src/cares_wrap.h | 5 +- test/parallel/test-dns-resolver-rotate.js | 108 ++++++++++++++++++++++ 5 files changed, 160 insertions(+), 12 deletions(-) create mode 100644 test/parallel/test-dns-resolver-rotate.js diff --git a/doc/api/dns.md b/doc/api/dns.md index 61846f6f621014..3a44e69232ccef 100644 --- a/doc/api/dns.md +++ b/doc/api/dns.md @@ -139,6 +139,9 @@ The following methods from the `node:dns` module are available: