querysub 0.18.0 → 0.20.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
|
@@ -21,7 +21,7 @@ import { addRecord, deleteRecord, getRecords, hasDNSWritePermissions, setRecord
|
|
|
21
21
|
import { SocketServerConfig } from "socket-function/src/webSocketServer";
|
|
22
22
|
import debugbreak from "debugbreak";
|
|
23
23
|
import { delay, runInfinitePoll, runInfinitePollCallAtStart } from "socket-function/src/batching";
|
|
24
|
-
import { getDomain, isNoNetwork } from "../config";
|
|
24
|
+
import { getDomain, isNoNetwork, isPublic } from "../config";
|
|
25
25
|
import { requiresNetworkTrustHook } from "../-d-trust/NetworkTrust2";
|
|
26
26
|
import { getExternalIP, testTCPIsListening } from "../misc/networking";
|
|
27
27
|
import { magenta, yellow } from "socket-function/src/formatting/logColors";
|
|
@@ -206,13 +206,12 @@ async function removeDeadARecords() {
|
|
|
206
206
|
async function getHTTPSKeyCertInner(callerIP: string) {
|
|
207
207
|
const edgeDomain = getDomain();
|
|
208
208
|
if (callerIP) {
|
|
209
|
-
let proxied = isNoNetwork() ? undefined : "proxied" as const;
|
|
210
209
|
try {
|
|
211
210
|
let promises: Promise<void>[] = [];
|
|
212
211
|
let existingIPs = await getRecords("A", edgeDomain);
|
|
213
212
|
if (callerIP === "127.0.0.1") {
|
|
214
213
|
if (existingIPs.length === 0) {
|
|
215
|
-
promises.push(addRecord("A", edgeDomain, callerIP
|
|
214
|
+
promises.push(addRecord("A", edgeDomain, callerIP));
|
|
216
215
|
} else if (existingIPs.length === 1 && existingIPs[0] === "127.0.0.1") {
|
|
217
216
|
// Good, do nothing
|
|
218
217
|
} else {
|
|
@@ -235,7 +234,7 @@ async function getHTTPSKeyCertInner(callerIP: string) {
|
|
|
235
234
|
console.log(magenta(`Switching from local development to production development (removing A record for 127.0.0.1, and using a real ip)`));
|
|
236
235
|
promises.push(deleteRecord("A", edgeDomain, "127.0.0.1"));
|
|
237
236
|
}
|
|
238
|
-
promises.push(addRecord("A", edgeDomain, callerIP
|
|
237
|
+
promises.push(addRecord("A", edgeDomain, callerIP));
|
|
239
238
|
}
|
|
240
239
|
promises.push(addRecord("A", "noproxy." + edgeDomain, "127.0.0.1"));
|
|
241
240
|
promises.push(addRecord("A", "127-0-0-1." + edgeDomain, "127.0.0.1"));
|