// Undici tokenizes NO_PROXY on BOTH commas and whitespace (single-char // class, empty entries filtered below). Values like `"localhost *.corp"` // or `"a, b\tc"` must all parse correctly. for (const rawEntry of raw.split(/[,\s]/)) { const entry = rawEntry.trim().toLowerCase(); if (!entry) { continue;
} if (entry === "*") { returntrue;
}
let entryHost: string;
let entryPort: string | undefined; if (entry.startsWith("[")) { const m = entry.match(/^\[([^\]]+)\](?::(\d+))?$/); if (!m) { continue;
}
entryHost = m[1];
entryPort = m[2];
} else { const colonIdx = entry.lastIndexOf(":"); if (colonIdx > 0 && /^\d+$/.test(entry.slice(colonIdx + 1))) {
entryHost = entry.slice(0, colonIdx);
entryPort = entry.slice(colonIdx + 1);
} else {
entryHost = entry;
}
}
if (entryPort && entryPort !== targetPort) { continue;
}
// Mirror undici: strip optional leading `*` followed by `.` so both // `.example.com` and `*.example.com` normalize to `example.com`. const normalizedEntry = entryHost.replace(/^\*?\./, ""); if (!normalizedEntry) { continue;
}
if (targetHost === normalizedEntry) { returntrue;
} if (targetHost.endsWith("." + normalizedEntry)) { returntrue;
}
}
returnfalse;
}
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.13 Sekunden
(vorverarbeitet am 2026-06-10)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.