roster-server 2.1.25 → 2.1.27
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.
- package/index.js +31 -11
- package/package.json +1 -1
- package/vendor/acme-dns-01-cli-wrapper.js +1 -1
package/index.js
CHANGED
|
@@ -258,7 +258,7 @@ class Roster {
|
|
|
258
258
|
provided.module = defaultDnsChallengeModule;
|
|
259
259
|
}
|
|
260
260
|
if (provided.propagationDelay === undefined) {
|
|
261
|
-
provided.propagationDelay =
|
|
261
|
+
provided.propagationDelay = 60000;
|
|
262
262
|
}
|
|
263
263
|
if (provided.autoContinue === undefined) {
|
|
264
264
|
provided.autoContinue = false;
|
|
@@ -270,9 +270,9 @@ class Roster {
|
|
|
270
270
|
} else {
|
|
271
271
|
this.dnsChallenge = {
|
|
272
272
|
module: defaultDnsChallengeModule,
|
|
273
|
-
propagationDelay:
|
|
273
|
+
propagationDelay: 60000,
|
|
274
274
|
autoContinue: false,
|
|
275
|
-
dryRunDelay:
|
|
275
|
+
dryRunDelay: 60000
|
|
276
276
|
};
|
|
277
277
|
}
|
|
278
278
|
}
|
|
@@ -392,7 +392,7 @@ class Roster {
|
|
|
392
392
|
};
|
|
393
393
|
if (shouldCombineWildcard) {
|
|
394
394
|
const dns01 = { ...this.dnsChallenge };
|
|
395
|
-
if (dns01.propagationDelay === undefined) dns01.propagationDelay =
|
|
395
|
+
if (dns01.propagationDelay === undefined) dns01.propagationDelay = 60000;
|
|
396
396
|
if (dns01.autoContinue === undefined) dns01.autoContinue = false;
|
|
397
397
|
if (dns01.dryRunDelay === undefined) dns01.dryRunDelay = dns01.propagationDelay;
|
|
398
398
|
primarySite.challenges = { 'dns-01': dns01 };
|
|
@@ -408,7 +408,7 @@ class Roster {
|
|
|
408
408
|
const wildcardSubject = `*.${domain}`;
|
|
409
409
|
const dns01 = { ...this.dnsChallenge };
|
|
410
410
|
if (dns01.propagationDelay === undefined) {
|
|
411
|
-
dns01.propagationDelay =
|
|
411
|
+
dns01.propagationDelay = 60000; // 120s default for manual DNS (acme-dns-01-cli)
|
|
412
412
|
}
|
|
413
413
|
if (dns01.autoContinue === undefined) {
|
|
414
414
|
dns01.autoContinue = false;
|
|
@@ -777,14 +777,34 @@ class Roster {
|
|
|
777
777
|
|
|
778
778
|
const isBunRuntime = typeof Bun !== 'undefined' || process.release?.name === 'bun';
|
|
779
779
|
if (isBunRuntime && this.wildcardZones.size > 0) {
|
|
780
|
+
const retryDelayMs = Number.isFinite(Number(process.env.ROSTER_BUN_WILDCARD_PREWARM_RETRY_MS))
|
|
781
|
+
? Math.max(1000, Number(process.env.ROSTER_BUN_WILDCARD_PREWARM_RETRY_MS))
|
|
782
|
+
: 30000;
|
|
783
|
+
const maxAttempts = Number.isFinite(Number(process.env.ROSTER_BUN_WILDCARD_PREWARM_MAX_ATTEMPTS))
|
|
784
|
+
? Math.max(0, Number(process.env.ROSTER_BUN_WILDCARD_PREWARM_MAX_ATTEMPTS))
|
|
785
|
+
: 0; // 0 = retry forever
|
|
786
|
+
|
|
780
787
|
for (const zone of this.wildcardZones) {
|
|
781
788
|
const bootstrapHost = `bun-bootstrap.${zone}`;
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
789
|
+
const attemptPrewarm = async (attempt = 1) => {
|
|
790
|
+
try {
|
|
791
|
+
log.warn(`⚠️ Bun runtime detected: prewarming wildcard certificate via ${bootstrapHost} (attempt ${attempt})`);
|
|
792
|
+
await greenlockRuntime.get({ servername: bootstrapHost });
|
|
793
|
+
log.info(`✅ Bun wildcard prewarm succeeded for ${zone} on attempt ${attempt}`);
|
|
794
|
+
} catch (error) {
|
|
795
|
+
log.warn(`⚠️ Bun wildcard prewarm failed for ${zone} (attempt ${attempt}): ${error?.message || error}`);
|
|
796
|
+
if (maxAttempts > 0 && attempt >= maxAttempts) {
|
|
797
|
+
log.warn(`⚠️ Bun wildcard prewarm stopped for ${zone} after ${attempt} attempts`);
|
|
798
|
+
return;
|
|
799
|
+
}
|
|
800
|
+
setTimeout(() => {
|
|
801
|
+
attemptPrewarm(attempt + 1).catch(() => {});
|
|
802
|
+
}, retryDelayMs);
|
|
803
|
+
}
|
|
804
|
+
};
|
|
805
|
+
|
|
806
|
+
// Background prewarm + retries so HTTPS startup is not blocked by DNS propagation timing.
|
|
807
|
+
attemptPrewarm().catch(() => {});
|
|
788
808
|
}
|
|
789
809
|
}
|
|
790
810
|
|
package/package.json
CHANGED
|
@@ -44,7 +44,7 @@ module.exports.create = function create(config = {}) {
|
|
|
44
44
|
const challenger = legacyCli.create(config);
|
|
45
45
|
const propagationDelay = Number.isFinite(config.propagationDelay)
|
|
46
46
|
? config.propagationDelay
|
|
47
|
-
:
|
|
47
|
+
: 60000;
|
|
48
48
|
const envAutoContinue = process.env.ROSTER_DNS_AUTO_CONTINUE;
|
|
49
49
|
const parseAutoContinue = (value, fallback) => {
|
|
50
50
|
if (value === undefined || value === null || value === '') return fallback;
|