Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@wiajs/agent

Package Overview
Dependencies
Maintainers
0
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wiajs/agent - npm Package Compare versions

Comparing version 1.0.12 to 1.0.13

11

lib/httpAgent.js

@@ -8,3 +8,3 @@ import http from 'node:http';

const log = Log({
env: `wia:agent:${name(__filename)}`
env: `wia:agent:${name(import.meta.url)}`
});

@@ -66,3 +66,4 @@ /** @typedef {import('stream').Duplex} Duplex */ /** @typedef {import('./tunnel').AgentConnectOpts & {hostname?: string, path?: string, pathname?: string, keepAlive: boolean}} AgentConnectOpts */ /** @typedef {import('./tunnel').Proxy} Proxy */ /** @typedef {http.AgentOptions & https.AgentOptions & {proxy: string|Proxy, proxyOpts?: *, tunnel?: boolean}} AgentOpts */ /**

super(opt);
if (opt.timeout) this.timeout = opt.timeout; // super(opt) 无效
if (opt.timeout) this.timeout = opt.timeout // super(opt) 无效
;
this.opt = opt;

@@ -110,3 +111,4 @@ let lookup = false;

}
}, 'addRequest'); // 消除 [Object: null prototype]
}, 'addRequest') // 消除 [Object: null prototype]
;
// 非隧道,转发模式,修改req连接代理

@@ -137,3 +139,4 @@ if (!_.tunnel) {

const protocol = opts.protocol;
const host = req.getHeader('host') || 'localhost'; // 带端口
const host = req.getHeader('host') || 'localhost' // 带端口
;
const base = `${protocol}//${host}`;

@@ -140,0 +143,0 @@ const url = new URL(req.path, base);

@@ -6,3 +6,3 @@ import http from 'node:http';

const log = Log({
env: `wia:agent:${name(__filename)}`
env: `wia:agent:${name(import.meta.url)}`
});

@@ -30,3 +30,4 @@ /** @typedef {import('stream').Duplex} Duplex */ /** @typedef {import('./tunnel').AgentConnectOpts} AgentConnectOpts */ /** @typedef {import('./tunnel').Proxy} Proxy */ /** @typedef {http.AgentOptions & https.AgentOptions & {proxy: string|Proxy, proxyOpts?: *, tunnel?: boolean}} AgentOpts */ /**

super(opt);
if (opt.timeout) this.timeout = opt.timeout; // super(opt) 无效
if (opt.timeout) this.timeout = opt.timeout // super(opt) 无效
;
this.opt = opt;

@@ -33,0 +34,0 @@ let lookup = false;

@@ -9,3 +9,3 @@ import * as dns from 'node:dns';

const log = Log({
env: `wia:agent:${name(__filename)}`
env: `wia:agent:${name(import.meta.url)}`
});

@@ -12,0 +12,0 @@ /** @typedef {import('stream').Duplex} Duplex */ /** @typedef {{protocol?: string, keepAlive: boolean} & import('net').TcpNetConnectOpts} HttpConnectOpts */ /** @typedef {{servername?:string, protocol?: string, port: number, keepAlive: boolean} & import('tls').ConnectionOptions} HttpsConnectOpts */ /** @typedef {HttpConnectOpts | HttpsConnectOpts} AgentConnectOpts */ /** @typedef {{protocol: string, host: string, port: number, type?: number, username?: string, userId?: string, password?: string}} Proxy */ /**

{
"name": "@wiajs/agent",
"description": "http/https/socks/tunnel/transfer's proxy agent",
"version": "1.0.12",
"version": "1.0.13",
"type": "module",

@@ -47,3 +47,3 @@ "main": "index.js",

"dependencies": {
"@wiajs/log": "^4.3.10"
"@wiajs/log": "^4.3.11"
},

@@ -50,0 +50,0 @@ "devDependencies": {},

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc