virunx 0.1.0 → 0.1.1

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.
Files changed (2) hide show
  1. package/dist/index.js +6 -4
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -365,14 +365,16 @@ var require_dist2 = __commonJS({
365
365
  const headers = { ...msg.headers };
366
366
  for (const h of HOP_HEADERS)
367
367
  delete headers[h];
368
- const req = node_http_1.default.request({
369
- host: "127.0.0.1",
368
+ const opts = {
369
+ host: "localhost",
370
370
  port: this.port,
371
+ autoSelectFamily: true,
371
372
  method: msg.method,
372
373
  path: msg.url,
373
374
  headers,
374
375
  agent: this.agent
375
- }, (res) => {
376
+ };
377
+ const req = node_http_1.default.request(opts, (res) => {
376
378
  ctx.res = res;
377
379
  ctx.status = res.statusCode ?? 502;
378
380
  const rh = {};
@@ -450,7 +452,7 @@ var require_dist2 = __commonJS({
450
452
  });
451
453
  }
452
454
  startUpgrade(ctx, msg) {
453
- const sock = node_net_1.default.connect({ host: "127.0.0.1", port: this.port });
455
+ const sock = node_net_1.default.connect({ host: "localhost", port: this.port, autoSelectFamily: true });
454
456
  ctx.sock = sock;
455
457
  ctx.hsBuf = Buffer.alloc(0);
456
458
  let failed = false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "virunx",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "expose a local port behind a public link (virun tunnel CLI)",
5
5
  "license": "MIT",
6
6
  "repository": "github:Vishota/virun",