
Product
Microsoft Teams Notifications Are Now Available in Socket
Socket can now send alerts and supply chain attack notifications to Microsoft Teams, with filters that route the right updates to each channel.
mock-proxy-server
Advanced tools
一个HTTP代理服务器,能够根据配置修改通过此代理服务器的请求,为指定请求返回mock数据,修改请求头、响应头,也可实现请求转发、延迟响应的功能。
npm install -g mock-proxy-server
mock-proxy-server - c <配置文件路径>
如果未指定配置文件,程序会在当前目录中自动生成,路径为/mock_server/rule.js
本程序基于anyproxy实现,更加详细的使用手册可以参考anyproxy
module.exports = {
plugins: [
{
name: 'mock',
mock: {
'/test': {
code: 200,
message: '1234'
}
}
}
],
"anyproxy": {
"port": 8001,
"webInterface": {
"webPort": 8002,
"wsPort": 8003
},
"forceProxyHttps": true,
"silent": true
}
}
plugins声明代理服务器中使用的插件及其配置
anyproxy声明代理服务器配置,参加anyproxy
{
name: 'mock',
include: ['localhost'],
exclude: [],
delay: 1000,
mock: {
'/test': {
code: 200,
message: '1234'
}
}
}
{
name: 'proxy',
include: ['localhost'],
exclude: [],
delay: 1000,
proxy: {
'https://a.com/a.js': 'http://localhost/b.js',
'https://a.com/(.*)': 'http://localhost/[$1]'
}
}
{
name: 'resHeader',
include: ['localhost'],
exclude: [],
header: {
'Cache-Control': 'max-age=2592000',
'Expires': 'Thu, 26 Oct 2017 03:20:53 GMT',
'Pragma': '',
'Last-Modified': ''
}
}
FAQs
一个HTTP代理服务器,能够根据配置修改通过此代理服务器的请求,为指定请求返回mock数据,修改请求头、响应头,也可实现请求转发、延迟响应的功能。
The npm package mock-proxy-server receives a total of 7 weekly downloads. As such, mock-proxy-server popularity was classified as not popular.
We found that mock-proxy-server demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.

Product
Socket can now send alerts and supply chain attack notifications to Microsoft Teams, with filters that route the right updates to each channel.

Security News
pnpm 12 rewrites the package manager in Rust, cutting install times by up to 90% while preserving pnpm 11 workflows and lockfiles.

Security News
Socket CTO Ahmad Nassri joins AppSec leaders at Black Hat to discuss active malware, package manager risks, and software supply chain defense.