Security News
cURL Project and Go Security Teams Reject CVSS as Broken
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
https-agent
Advanced tools
HTTPS agent for Node with transparent proxy support
Creates a HTTPS agent that automatically handles proxy tunnelling using the https_proxy
environment variable. You can then plug the agent into your HTTP client of choice and make requests using SSL client authentication.
npm install https-agent
var httpsAgent = require('https-agent');
var fs = require('fs');
var agent = httpsAgent({
pfx: fs.readFileSync('/path/to/client.p12'),
passphrase: 'client'
});
All of the standard TLS options are supported when creating an agent. Use the pfx
and passphrase
options for a certificate in PKCS12 format or the cert
and key
options for separate certificate and key files.
https.get
var httpsAgent = require('https-agent');
var fs = require('fs');
var https = require('https');
var agent = httpsAgent({
pfx: fs.readFileSync('/path/to/client.p12'),
passphrase: 'client'
});
var options = {
protocol: 'https:',
hostname: 'www.example.com',
port: 443,
agent: agent
}
https.get(options, function (res) {
res.on('data', function (data) {
console.log(data.toString());
});
});
var httpsAgent = require('https-agent');
var fs = require('fs');
var request = require('request');
var agent = httpsAgent({
pfx: fs.readFileSync('/path/to/client.p12'),
passphrase: 'client'
});
request('https://www.example.com', {agent: agent, proxy: false}, function (err, res, body) {
console.log(body);
});
var httpsAgent = require('https-agent');
var fs = require('fs');
var Client = require('node-rest-client').Client;
var agent = httpsAgent({
pfx: fs.readFileSync('/path/to/client.p12'),
passphrase: 'client'
});
var client = new Client({
connection: {
agent: agent
}
});
client.get('https://www.example.com', function (body, res) {
console.log(body);
});
FAQs
Proxy aware HTTPS agent
We found that https-agent 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.
Did you know?
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.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.