portless 0.9.5 → 0.9.6

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.
@@ -477,8 +477,16 @@ function createProxyServer(options) {
477
477
  }
478
478
  proxySocket.pipe(socket);
479
479
  socket.pipe(proxySocket);
480
- proxySocket.on("error", () => socket.destroy());
481
- socket.on("error", () => proxySocket.destroy());
480
+ const cleanup = () => {
481
+ proxySocket.destroy();
482
+ socket.destroy();
483
+ };
484
+ proxySocket.on("error", cleanup);
485
+ socket.on("error", cleanup);
486
+ proxySocket.on("close", cleanup);
487
+ socket.on("close", cleanup);
488
+ proxySocket.on("end", cleanup);
489
+ socket.on("end", cleanup);
482
490
  });
483
491
  proxyReq.on("error", (err) => {
484
492
  onError(`WebSocket proxy error for ${getRequestHost(req)}: ${err.message}`);
package/dist/cli.js CHANGED
@@ -35,7 +35,7 @@ import {
35
35
  waitForProxy,
36
36
  writeTldFile,
37
37
  writeTlsMarker
38
- } from "./chunk-D3LR3J7L.js";
38
+ } from "./chunk-OPTRASOS.js";
39
39
 
40
40
  // src/colors.ts
41
41
  function supportsColor() {
@@ -1438,7 +1438,7 @@ ${colors_default.bold("Reserved names:")}
1438
1438
  process.exit(0);
1439
1439
  }
1440
1440
  function printVersion() {
1441
- console.log("0.9.5");
1441
+ console.log("0.9.6");
1442
1442
  process.exit(0);
1443
1443
  }
1444
1444
  async function handleTrust() {
package/dist/index.js CHANGED
@@ -20,7 +20,7 @@ import {
20
20
  parseHostname,
21
21
  removeBlock,
22
22
  syncHostsFile
23
- } from "./chunk-D3LR3J7L.js";
23
+ } from "./chunk-OPTRASOS.js";
24
24
  export {
25
25
  DIR_MODE,
26
26
  FILE_MODE,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "portless",
3
- "version": "0.9.5",
3
+ "version": "0.9.6",
4
4
  "description": "Replace port numbers with stable, named .localhost URLs. For humans and agents.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",