querysub 0.18.0 → 0.19.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.19.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,7 +206,7 @@ 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;
209
+ let proxied = (!isNoNetwork() && isPublic()) ? "proxied" as const : undefined;
210
210
  try {
211
211
  let promises: Promise<void>[] = [];
212
212
  let existingIPs = await getRecords("A", edgeDomain);