querysub 0.72.0 → 0.73.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
|
@@ -178,13 +178,13 @@ export async function publishMachineARecords() {
|
|
|
178
178
|
await setRecord("A", "*." + machineAddress, ip);
|
|
179
179
|
}
|
|
180
180
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
//
|
|
184
|
-
//
|
|
185
|
-
runInfinitePoll(1000 * 60,
|
|
181
|
+
const runEdgeDomainAliveLoop = lazy(() => {
|
|
182
|
+
// NOTE: Our DNS TTL is 1 minute, which means no matter how fast we poll,
|
|
183
|
+
// we can't get below that. Of course the worst case is that + our poll rate,
|
|
184
|
+
// but still, this means there is less and less benefit the lower this value is.
|
|
185
|
+
runInfinitePoll(1000 * 60, checkEdgeDomainsAlive);
|
|
186
186
|
});
|
|
187
|
-
async function
|
|
187
|
+
async function checkEdgeDomainsAlive() {
|
|
188
188
|
if (isNoNetwork()) return;
|
|
189
189
|
if (publicPort === -1) return;
|
|
190
190
|
const edgeDomain = getDomain();
|
|
@@ -209,6 +209,7 @@ async function removeDeadARecords() {
|
|
|
209
209
|
}
|
|
210
210
|
|
|
211
211
|
async function getHTTPSKeyCertInner(callerIP: string) {
|
|
212
|
+
runEdgeDomainAliveLoop();
|
|
212
213
|
const edgeDomain = getDomain();
|
|
213
214
|
if (callerIP) {
|
|
214
215
|
try {
|
package/src/server.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { deepCloneJSON, isBufferType, isNode, isNodeTrue } from "socket-function
|
|
|
5
5
|
import { SocketFunction } from "socket-function/SocketFunction";
|
|
6
6
|
import { getOwnMachineId, getThreadKeyCert } from "./-a-auth/certs";
|
|
7
7
|
import { logErrors } from "./errors";
|
|
8
|
-
import { publishMachineARecords
|
|
8
|
+
import { publishMachineARecords } from "./-e-certs/EdgeCertController";
|
|
9
9
|
import { getPathStr, getPathStr1, prependToPathStr, rootPathStr } from "./path";
|
|
10
10
|
import { authorityStorage, debugCoreMode, debugRejections, enableDebugRejections, pathValueArchives } from "./0-path-value-core/pathValueCore";
|
|
11
11
|
import { listenOnDebugger } from "./diagnostics/listenOnDebugger";
|
|
@@ -67,7 +67,5 @@ async function main() {
|
|
|
67
67
|
autoForwardPort: true,
|
|
68
68
|
});
|
|
69
69
|
|
|
70
|
-
verifyServicesAlive();
|
|
71
|
-
|
|
72
70
|
await publishMachineARecords();
|
|
73
71
|
}
|