New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

feproxy

Package Overview
Dependencies
Maintainers
2
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

feproxy - npm Package Compare versions

Comparing version 2.0.6 to 2.0.7

6

app/controller/site.js
const fs = require('fs');
const fs = require('fs-extra');
const path = require('path');

@@ -8,5 +8,5 @@ const chalk = require('chalk');

const crtFile = path.join(ctx.app.config.RC_DIR, 'feproxy.crt');
if (fs.existsSync(crtFile)) {
if (await fs.exists(crtFile)) {
ctx.set('content-type', 'application/octet-stream');
ctx.body = fs.readFileSync(crtFile);
ctx.body = await fs.readFile(crtFile);
}

@@ -13,0 +13,0 @@ };

@@ -11,4 +11,6 @@

keepAlive: true,
maxSockets: 6,
keepAliveMsecs: 1000,
keepAliveMsecs: 5000,
maxSockets: 50,
maxFreeSockets: 10,
timeout: 60000,
};

@@ -15,0 +17,0 @@

@@ -6,2 +6,7 @@

const agent = new https.Agent({
keepAlive: false,
timeout: 10000,
});
module.exports = app => {

@@ -21,2 +26,3 @@ const getCertificate = ca(app.config);

method: 'GET',
agent,
}, res => {

@@ -49,14 +55,22 @@ res.on('error', () => {});

if (!serverMap[key]) {
const isTrust = !isProxy || await isTrustHost(hostname, port);
const pem = getCertificate(hostname, isTrust).pem;
const server = serverMap[key] = https.createServer(pem, app.callback());
if (isProxy) {
server.proxy = {
hostname,
port,
};
}
app.ws.listen({ server });
serverMap[key] = (async () => {
const isTrust = !isProxy || await isTrustHost(hostname, port);
const pem = getCertificate(hostname, isTrust).pem;
const server = https.createServer(pem, app.callback());
if (isProxy) {
server.proxy = {
hostname,
port,
};
}
app.ws.listen({ server });
serverMap[key] = server;
})();
}
if (serverMap[key] instanceof Promise) {
await serverMap[key];
}
return serverMap[key];

@@ -63,0 +77,0 @@ },

{
"name": "feproxy",
"version": "2.0.6",
"version": "2.0.7",
"description": "An node proxy server for web development",

@@ -5,0 +5,0 @@ "scripts": {

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