Socket
Socket
Sign inDemoInstall

proxying-agent

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

proxying-agent

Node HTTP/HTTPS Agent for connecting through forward proxies


Version published
Weekly downloads
27K
increased by17.98%
Maintainers
1
Weekly downloads
 
Created
Source

Forward HTTP/HTTPS Proxy Agent

This an HTTP/HTTPS proxy agent capable of forward proxying HTTP/HTTPS requests.

It supports the following:

  • Connect to a proxy with a regular socket or SSL/TLS socket
  • Proxying to a remote server using SSL tunneling (via the http CONNECT method)
  • Authenticate with a proxy with Basic authentication
  • Authenticate with a proxy with NTLM authentication (experimental). Depends on node-ntlm

The agent inherits directly from the http.Agent Node object so it benefits from all the socket handling goodies that come with it.

Installation

npm install proxying-agent

Usage

  var proxying = require('proxying-agent');
  var proxyingOptions = {
    proxy: 'http://username:password@proxy.example.com:8080',
    server: 'https://server.example.com:443'
  };
  var proxyingAgent = new proxying.ProxyingAgent(proxyingOptions);
  var req = https.request({
    host: 'example.com',
    port: 443,
    agent: proxyingAgent
  });

The following options are supported:

  • proxy - Specifies the proxy url. The supported format is http[s]://[auth@]host:port where auth is the authentication information in the form of username:password. The authentication information can also be in the form of a Base64 encoded user:password, e.g. http://dXNlcm5hbWU6cGFzc3dvcmQ=@proxy.example.com:8080
  • server - the target server the proxy will connect to. This is primarily used to determine if the proxy should be a tunneling proxy, which will only be true if the target server protocol is https
  • ntlm - (experimental) connect to the proxy using NTLM authentication. ntlm is expected to contain the following fields:
    • hostname - the local machine hostname
    • domain - the NTLM domain
    • username - the NTLM username
    • password - the NTLM password

Keywords

FAQs

Package last updated on 16 Nov 2013

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

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