@push.rocks/smartdns 8.1.0 → 8.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,14 @@
1
+ {
2
+ "format": "tsrust.build-provenance.v2",
3
+ "binarySha256": "b0419c40c34a6d5fa6d6687847f9e7cb2290348d1fc0930fe4e83c808760078a",
4
+ "buildInfo": {
5
+ "projectName": "@push.rocks/smartdns",
6
+ "projectVersion": "8.2.1",
7
+ "gitCommit": "81f8e6aa1589378fc9883a3038bc8e39f6db6be4",
8
+ "gitDirty": false,
9
+ "builtAt": "2026-08-23T09:51:59.907Z",
10
+ "tsrustVersion": "1.10.0",
11
+ "binary": "rustdns-client",
12
+ "target": "linux_amd64"
13
+ }
14
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "format": "tsrust.build-provenance.v2",
3
+ "binarySha256": "8b24aa046dbac269aa71e6b7b554565d5f50e5664f8f6a54c59d7fe05d232ab5",
4
+ "buildInfo": {
5
+ "projectName": "@push.rocks/smartdns",
6
+ "projectVersion": "8.2.1",
7
+ "gitCommit": "81f8e6aa1589378fc9883a3038bc8e39f6db6be4",
8
+ "gitDirty": false,
9
+ "builtAt": "2026-08-23T09:52:00.225Z",
10
+ "tsrustVersion": "1.10.0",
11
+ "binary": "rustdns-client",
12
+ "target": "linux_arm64"
13
+ }
14
+ }
Binary file
@@ -0,0 +1,14 @@
1
+ {
2
+ "format": "tsrust.build-provenance.v2",
3
+ "binarySha256": "562c4ff14d42e17d0fccd653729eea025dc4eba7be56cb4b49cd2aafe1203bb4",
4
+ "buildInfo": {
5
+ "projectName": "@push.rocks/smartdns",
6
+ "projectVersion": "8.2.1",
7
+ "gitCommit": "81f8e6aa1589378fc9883a3038bc8e39f6db6be4",
8
+ "gitDirty": false,
9
+ "builtAt": "2026-08-23T09:51:59.907Z",
10
+ "tsrustVersion": "1.10.0",
11
+ "binary": "rustdns",
12
+ "target": "linux_amd64"
13
+ }
14
+ }
Binary file
@@ -0,0 +1,14 @@
1
+ {
2
+ "format": "tsrust.build-provenance.v2",
3
+ "binarySha256": "b2d37952a49874fc35b8ee7bdd5d4c794458dd93e1f2c315425351aa111f2c49",
4
+ "buildInfo": {
5
+ "projectName": "@push.rocks/smartdns",
6
+ "projectVersion": "8.2.1",
7
+ "gitCommit": "81f8e6aa1589378fc9883a3038bc8e39f6db6be4",
8
+ "gitDirty": false,
9
+ "builtAt": "2026-08-23T09:52:00.225Z",
10
+ "tsrustVersion": "1.10.0",
11
+ "binary": "rustdns",
12
+ "target": "linux_arm64"
13
+ }
14
+ }
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@push.rocks/smartdns',
6
- version: '8.1.0',
6
+ version: '8.2.1',
7
7
  description: 'A robust TypeScript library providing advanced DNS management and resolution capabilities including support for DNSSEC, custom DNS servers, and integration with various DNS providers.'
8
8
  };
9
9
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMDBfY29tbWl0aW5mb19kYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvMDBfY29tbWl0aW5mb19kYXRhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHO0lBQ3hCLElBQUksRUFBRSxzQkFBc0I7SUFDNUIsT0FBTyxFQUFFLE9BQU87SUFDaEIsV0FBVyxFQUFFLHlMQUF5TDtDQUN2TSxDQUFBIn0=
@@ -93,7 +93,7 @@ interface LetsEncryptOptions {
93
93
  export interface IDnsQueryCompletedEvent {
94
94
  /** The original questions from the query */
95
95
  questions: IIpcDnsQuestion[];
96
- /** Whether any handler answered the query */
96
+ /** Whether the response contains or synthesizes an answer */
97
97
  answered: boolean;
98
98
  /** The outcome actually sent on the wire */
99
99
  responseKind: TDnsQueryResponseKind;
@@ -127,9 +127,18 @@ export declare class DnsServer extends plugins.events.EventEmitter {
127
127
  /** Stable for the lifetime of this server, so the apex SOA does not churn. */
128
128
  private readonly soaSerial;
129
129
  private bridgeSpawned;
130
+ private lifecycleState;
131
+ private lifecycleTail;
132
+ private pendingLifecycleOperations;
130
133
  private httpsServer;
131
134
  private udpServer;
132
135
  private tcpServer;
136
+ private readonly manualHttp1Server;
137
+ private readonly manualHttp2Server;
138
+ private readonly manualHttpSockets;
139
+ private readonly manualHttpStreams;
140
+ private readonly manualHttpTimeouts;
141
+ private readonly manualHttpHeaderTimeouts;
133
142
  constructor(options: IDnsServerOptions);
134
143
  /**
135
144
  * Register a DNS handler for a domain pattern and record types.
@@ -165,14 +174,25 @@ export declare class DnsServer extends plugins.events.EventEmitter {
165
174
  unregisterHandlersByOwner(owner: string): number;
166
175
  /** Every currently registered handler, for introspection and leak checks. */
167
176
  listHandlers(): IDnsHandlerInfo[];
177
+ /**
178
+ * Replace the authoritative zone set used by subsequent queries without
179
+ * restarting any listener. The input is validated and copied before the live
180
+ * set changes; an explicit empty array means the server claims no DNS zone.
181
+ */
182
+ setAuthoritativeZones(authoritativeZones: string[]): void;
168
183
  /**
169
184
  * Start the DNS server.
170
185
  */
171
186
  start(): Promise<void>;
187
+ private startInternal;
172
188
  /**
173
- * Stop the DNS server.
189
+ * Stop the DNS server and resolve only after the Rust process has closed.
174
190
  */
175
191
  stop(): Promise<void>;
192
+ private stopInternal;
193
+ private enqueueLifecycle;
194
+ private confirmBridgeTerminationAfterFailure;
195
+ private clearBridgeOwnership;
176
196
  /**
177
197
  * Initialize servers (no-op with Rust bridge, kept for API compatibility).
178
198
  */
@@ -190,6 +210,23 @@ export declare class DnsServer extends plugins.events.EventEmitter {
190
210
  * In Rust mode, this is not directly supported — use processRawDnsPacket instead.
191
211
  */
192
212
  handleHttpsSocket(socket: plugins.net.Socket): void;
213
+ /**
214
+ * Handle a cleartext HTTP stream after an upstream proxy has terminated TLS.
215
+ * Supports HTTP/1.1 and prior-knowledge HTTP/2 RFC 8484 requests. Encrypted
216
+ * TLS sockets must not be passed here.
217
+ */
218
+ handleHttpSocket(socket: plugins.net.Socket): void;
219
+ /** Replay sniffed bytes through a Duplex because Node's native HTTP/2 parser bypasses unshift(). */
220
+ private createReplayStream;
221
+ private createHttpTimeout;
222
+ private clearHttpTimeout;
223
+ private armHttpHeaderTimeout;
224
+ private clearHttpHeaderTimeout;
225
+ private handleDohHttpRequest;
226
+ private readDohRequestBody;
227
+ private rejectDohRequest;
228
+ private handleDohHttpFailure;
229
+ private writeDohError;
193
230
  /**
194
231
  * Handle a UDP message manually.
195
232
  */
@@ -215,6 +252,8 @@ export declare class DnsServer extends plugins.events.EventEmitter {
215
252
  * Filter domains to include only those the server is authoritative for.
216
253
  */
217
254
  filterAuthorizedDomains(domainNames: string[]): string[];
255
+ private applyUpdatedCertificates;
256
+ private isOperational;
218
257
  /**
219
258
  * Resolve a DNS query event from Rust using TypeScript handlers.
220
259
  *
@@ -227,6 +266,9 @@ export declare class DnsServer extends plugins.events.EventEmitter {
227
266
  private normalizeName;
228
267
  /** Configured authoritative zones, most specific first. */
229
268
  private normalizedAuthoritativeZones;
269
+ /** Canonical set used only to detect semantically equivalent updates. */
270
+ private canonicalAuthoritativeZoneSet;
271
+ private warnIfHandlerIsOutsideAuthority;
230
272
  /** The most specific configured zone containing `name`, if any. */
231
273
  private zoneForName;
232
274
  /**