querysub 0.71.0 → 0.72.0
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/package.json
CHANGED
|
@@ -193,11 +193,16 @@ async function removeDeadARecords() {
|
|
|
193
193
|
// and it will be removed when we leave development
|
|
194
194
|
ips = ips.filter(ip => ip !== "127.0.0.1");
|
|
195
195
|
|
|
196
|
+
console.log(`Checking for dead records ${JSON.stringify(ips)}`);
|
|
197
|
+
|
|
196
198
|
let results = await Promise.all(ips.map(async ip => {
|
|
197
199
|
return await testTCPIsListening(ip, publicPort);
|
|
198
200
|
}));
|
|
199
201
|
|
|
200
202
|
let deadIPs = ips.filter((ip, i) => !results[i]);
|
|
203
|
+
if (deadIPs.length > 0) {
|
|
204
|
+
console.log(`Found dead IPs for ${edgeDomain}:${publicPort}, removing their A records: ${JSON.stringify(deadIPs)}`);
|
|
205
|
+
}
|
|
201
206
|
for (let deadIP of deadIPs) {
|
|
202
207
|
await deleteRecord("A", edgeDomain, deadIP);
|
|
203
208
|
}
|
|
@@ -209,7 +214,7 @@ async function getHTTPSKeyCertInner(callerIP: string) {
|
|
|
209
214
|
try {
|
|
210
215
|
let promises: Promise<void>[] = [];
|
|
211
216
|
let existingIPs = await getRecords("A", edgeDomain);
|
|
212
|
-
if (
|
|
217
|
+
if (!isPublic()) {
|
|
213
218
|
if (existingIPs.length === 0) {
|
|
214
219
|
promises.push(addRecord("A", edgeDomain, callerIP));
|
|
215
220
|
} else if (existingIPs.length === 1 && existingIPs[0] === "127.0.0.1") {
|