roster-server 2.3.10 → 2.3.14

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 CHANGED
@@ -252,23 +252,20 @@ class Roster {
252
252
  this.portServers = {}; // Store servers by port
253
253
  this.domainPorts = {}; // Store domain → port mapping for local mode
254
254
  this.assignedPorts = new Set(); // Track ports assigned to domains (not OS availability)
255
- this.hostname = options.hostname || '0.0.0.0';
255
+ this.hostname = options.hostname ?? '::';
256
256
  this.filename = options.filename || 'index';
257
257
  this.minLocalPort = options.minLocalPort || 4000;
258
258
  this.maxLocalPort = options.maxLocalPort || 9999;
259
259
  this.tlsMinVersion = options.tlsMinVersion ?? 'TLSv1.2';
260
260
  this.tlsMaxVersion = options.tlsMaxVersion ?? 'TLSv1.3';
261
- this.disableWildcard = options.disableWildcard !== undefined
262
- ? parseBooleanFlag(options.disableWildcard, false)
263
- : parseBooleanFlag(process.env.ROSTER_DISABLE_WILDCARD, false);
264
- const combineDefault = false;
265
- this.combineWildcardCerts = options.combineWildcardCerts !== undefined
266
- ? parseBooleanFlag(options.combineWildcardCerts, combineDefault)
267
- : parseBooleanFlag(process.env.ROSTER_COMBINE_WILDCARD_CERTS, combineDefault);
261
+ this.disableWildcard = parseBooleanFlag(options.disableWildcard, false);
262
+ this.combineWildcardCerts = parseBooleanFlag(options.combineWildcardCerts, false);
268
263
  if (isBunRuntime && this.combineWildcardCerts) {
269
264
  log.info('Bun runtime detected: combined wildcard certificates enabled (SNI bypass)');
270
265
  }
271
266
 
267
+ this.skipLocalCheck = parseBooleanFlag(options.skipLocalCheck, true);
268
+
272
269
  const port = options.port === undefined ? 443 : options.port;
273
270
  if (port === 80 && !this.local) {
274
271
  throw new Error('⚠️ Port 80 is reserved for ACME challenge. Please use a different port.');
@@ -749,6 +746,8 @@ class Roster {
749
746
  maintainerEmail: this.email,
750
747
  cluster: this.cluster,
751
748
  staging: this.staging,
749
+ skipDryRun: this.skipLocalCheck,
750
+ skipChallengeTest: this.skipLocalCheck,
752
751
  notify: (event, details) => {
753
752
  const eventDomain = (() => {
754
753
  if (!details || typeof details !== 'object') return null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "roster-server",
3
- "version": "2.3.10",
3
+ "version": "2.3.14",
4
4
  "description": "👾 RosterServer - A domain host router to host multiple HTTPS.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -302,27 +302,13 @@ describe('Roster', () => {
302
302
  const roster = new Roster({ local: true, disableWildcard: true });
303
303
  assert.strictEqual(roster.disableWildcard, true);
304
304
  });
305
- it('reads disableWildcard from env var', () => {
306
- const previous = process.env.ROSTER_DISABLE_WILDCARD;
307
- process.env.ROSTER_DISABLE_WILDCARD = '1';
308
- try {
309
- const roster = new Roster({ local: true });
310
- assert.strictEqual(roster.disableWildcard, true);
311
- } finally {
312
- if (previous === undefined) delete process.env.ROSTER_DISABLE_WILDCARD;
313
- else process.env.ROSTER_DISABLE_WILDCARD = previous;
314
- }
305
+ it('enables disableWildcard from constructor option (truthy string)', () => {
306
+ const roster = new Roster({ local: true, disableWildcard: '1' });
307
+ assert.strictEqual(roster.disableWildcard, true);
315
308
  });
316
- it('enables combined wildcard certs from env var', () => {
317
- const previous = process.env.ROSTER_COMBINE_WILDCARD_CERTS;
318
- process.env.ROSTER_COMBINE_WILDCARD_CERTS = '1';
319
- try {
320
- const roster = new Roster({ local: false });
321
- assert.strictEqual(roster.combineWildcardCerts, true);
322
- } finally {
323
- if (previous === undefined) delete process.env.ROSTER_COMBINE_WILDCARD_CERTS;
324
- else process.env.ROSTER_COMBINE_WILDCARD_CERTS = previous;
325
- }
309
+ it('enables combined wildcard certs from constructor option', () => {
310
+ const roster = new Roster({ local: false, combineWildcardCerts: true });
311
+ assert.strictEqual(roster.combineWildcardCerts, true);
326
312
  });
327
313
  it('defaults combineWildcardCerts to false', () => {
328
314
  const roster = new Roster({ local: false });
@@ -373,7 +373,9 @@ G.create = function(gconf) {
373
373
  maintainerEmail: gconf.maintainerEmail,
374
374
  packageAgent: packageAgent,
375
375
  notify: greenlock._notify,
376
- debug: greenlock._defaults.debug || args.debug
376
+ debug: greenlock._defaults.debug || args.debug,
377
+ skipDryRun: gconf.skipDryRun || false,
378
+ skipChallengeTest: gconf.skipChallengeTest || false
377
379
  });
378
380
 
379
381
  var dir = caches[dirUrl];