querysub 0.80.0 → 0.82.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
|
@@ -13,7 +13,6 @@ export async function hackDevtoolsWebsocketForward(config: {
|
|
|
13
13
|
externalPort: number;
|
|
14
14
|
cancel: () => void;
|
|
15
15
|
}> {
|
|
16
|
-
let hasConnected = false;
|
|
17
16
|
const server = net.createServer();
|
|
18
17
|
|
|
19
18
|
// Start listening on a random available port, binding to all interfaces (0.0.0.0)
|
|
@@ -30,8 +29,6 @@ export async function hackDevtoolsWebsocketForward(config: {
|
|
|
30
29
|
|
|
31
30
|
console.log(`Forwarding connection from ${config.externalIP}:${(address as any).port} to 127.0.0.1:${config.internalPort}`);
|
|
32
31
|
|
|
33
|
-
hasConnected = true;
|
|
34
|
-
|
|
35
32
|
// Forward the connection to the internal port
|
|
36
33
|
const internalConnection = net.createConnection({
|
|
37
34
|
host: "127.0.0.1",
|
|
@@ -55,7 +52,9 @@ export async function hackDevtoolsWebsocketForward(config: {
|
|
|
55
52
|
// // Handle socket closure
|
|
56
53
|
socket.on("close", () => {
|
|
57
54
|
internalConnection.destroy();
|
|
58
|
-
|
|
55
|
+
// TESTING:
|
|
56
|
+
// - For now, we don't close the server, so... we can reconnect. I think this might be required...
|
|
57
|
+
//server.close();
|
|
59
58
|
});
|
|
60
59
|
socket.on("error", (err) => {
|
|
61
60
|
internalConnection.destroy();
|
|
@@ -265,8 +265,10 @@ export class NodeViewer extends qreact.Component {
|
|
|
265
265
|
<button onClick={async () => {
|
|
266
266
|
const controller = NodeViewerController.nodes[getBrowserUrlNode()];
|
|
267
267
|
let url = await controller.getExternalInspectURL(str);
|
|
268
|
+
console.log(url.replace("https://notdevtools.com/devtools", "devtools://devtools/bundled"));
|
|
269
|
+
// devtools://devtools/bundled/inspector.html?experiments=true&v8only=true&wss=99-250-124-91.querysub.com:2058/cc5b76b2-549f-4a66-8026-021811e9edd3
|
|
268
270
|
|
|
269
|
-
window.open(url, "_blank");
|
|
271
|
+
//window.open(url, "_blank");
|
|
270
272
|
}}>
|
|
271
273
|
Inspect
|
|
272
274
|
</button>
|
|
@@ -385,6 +387,11 @@ class NodeViewerControllerBase {
|
|
|
385
387
|
internalConnection.pipe(socket);
|
|
386
388
|
|
|
387
389
|
socket.on("close", () => {
|
|
390
|
+
console.log(`Inspect closing forward (socket closed) ${ourDomain}:${finalPort} => ${baseNodeIPResolved}:${externalPort} => 127.0.0.1:${internalPort}, for ${callerIP}`);
|
|
391
|
+
tlsServer.close();
|
|
392
|
+
});
|
|
393
|
+
internalConnection.on("close", () => {
|
|
394
|
+
console.log(`Inspect closing forward (internal connection closed) ${ourDomain}:${finalPort} => ${baseNodeIPResolved}:${externalPort} => 127.0.0.1:${internalPort}, for ${callerIP}`);
|
|
388
395
|
tlsServer.close();
|
|
389
396
|
});
|
|
390
397
|
});
|