New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@js-core/whistle

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@js-core/whistle

HTTP, HTTP2, HTTPS, Websocket debugging proxy

latest
Source
npmnpm
Version
0.0.2
Version published
Maintainers
1
Created
Source

项目 fork 自 whistle, 扩展了一个功能, 将请求响应数据暴露给外部, 方便扩展更多功能(比如自动下载文件).

具体步骤如下:

mkdir whistle-test # 创建一个目录
cd whistle-test # 进入到目录
npm init -y # 初始化一个项目
npm install @js-core/whistle # 执行安装
touch subscriber.js # 项目根目录创建名为 subscriber.js 的文件, 如果文件存在于其他地方, 可以
npx w2 start --baseDir ./storage --port 3210 --certDir ./cert # 启动代理

subscriber.js文件内容如下

module.exports = function({config, req, res, data}) {
	// your code
}

Keywords

proxy

FAQs

Package last updated on 15 Nov 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts