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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "querysub",
3
- "version": "0.18.0",
3
+ "version": "0.20.0",
4
4
  "main": "index.js",
5
5
  "license": "MIT",
6
6
  "note1": "note on node-forge fork, see https://github.com/digitalbazaar/forge/issues/744 for details",
@@ -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, proxied));
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, proxied));
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"));