draw2agent 2.0.3 → 2.0.4
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/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -13978,8 +13978,8 @@ function startHttpServer(targetUrl, port) {
|
|
|
13978
13978
|
server.on("upgrade", (req, socket, head) => {
|
|
13979
13979
|
proxy.ws(req, socket, head);
|
|
13980
13980
|
});
|
|
13981
|
-
server.listen(port, () => {
|
|
13982
|
-
const proxyUrl = `http://
|
|
13981
|
+
server.listen(port, "127.0.0.1", () => {
|
|
13982
|
+
const proxyUrl = `http://127.0.0.1:${port}`;
|
|
13983
13983
|
console.error(`[draw2agent] \u{1F680} Proxy running at ${proxyUrl} \u2192 ${targetUrl}`);
|
|
13984
13984
|
resolve(proxyUrl);
|
|
13985
13985
|
});
|
|
@@ -14136,8 +14136,8 @@ function startScratchServer(port) {
|
|
|
14136
14136
|
res.writeHead(404, { "Content-Type": "text/plain" });
|
|
14137
14137
|
res.end("Not found");
|
|
14138
14138
|
});
|
|
14139
|
-
scratchServer.listen(port, () => {
|
|
14140
|
-
const url2 = `http://
|
|
14139
|
+
scratchServer.listen(port, "127.0.0.1", () => {
|
|
14140
|
+
const url2 = `http://127.0.0.1:${port}`;
|
|
14141
14141
|
console.error(`[draw2agent] \u{1F3A8} Scratch whiteboard at ${url2}`);
|
|
14142
14142
|
resolve(url2);
|
|
14143
14143
|
});
|
|
@@ -14158,7 +14158,7 @@ import localtunnel from "localtunnel";
|
|
|
14158
14158
|
var activeTunnel = null;
|
|
14159
14159
|
async function startTunnel(localPort) {
|
|
14160
14160
|
await stopTunnel();
|
|
14161
|
-
const tunnel = await localtunnel({ port: localPort });
|
|
14161
|
+
const tunnel = await localtunnel({ port: localPort, local_host: "127.0.0.1" });
|
|
14162
14162
|
tunnel.on("close", () => {
|
|
14163
14163
|
console.error("[draw2agent] \u{1F50C} Tunnel closed");
|
|
14164
14164
|
activeTunnel = null;
|