Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

superagent-proxy

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

superagent-proxy

`Request#proxy(uri)` superagent extension

  • 3.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
287K
decreased by-11.76%
Maintainers
1
Weekly downloads
 
Created

What is superagent-proxy?

The superagent-proxy npm package is an extension for the SuperAgent HTTP client library that allows you to route HTTP requests through a proxy server. This can be useful for various purposes such as bypassing network restrictions, anonymizing requests, or testing applications in different network environments.

What are superagent-proxy's main functionalities?

HTTP Proxy

This feature allows you to route HTTP requests through an HTTP proxy server. The code sample demonstrates how to make a GET request to 'http://example.com' through an HTTP proxy server running at 'http://proxy-server:8080'.

const superagent = require('superagent');
require('superagent-proxy')(superagent);

superagent
  .get('http://example.com')
  .proxy('http://proxy-server:8080')
  .end((err, res) => {
    if (err) {
      console.error(err);
    } else {
      console.log(res.body);
    }
  });

HTTPS Proxy

This feature allows you to route HTTPS requests through an HTTPS proxy server. The code sample demonstrates how to make a GET request to 'https://example.com' through an HTTPS proxy server running at 'https://proxy-server:8080'.

const superagent = require('superagent');
require('superagent-proxy')(superagent);

superagent
  .get('https://example.com')
  .proxy('https://proxy-server:8080')
  .end((err, res) => {
    if (err) {
      console.error(err);
    } else {
      console.log(res.body);
    }
  });

SOCKS Proxy

This feature allows you to route HTTP requests through a SOCKS proxy server. The code sample demonstrates how to make a GET request to 'http://example.com' through a SOCKS proxy server running at 'socks5://proxy-server:1080'.

const superagent = require('superagent');
require('superagent-proxy')(superagent);

superagent
  .get('http://example.com')
  .proxy('socks5://proxy-server:1080')
  .end((err, res) => {
    if (err) {
      console.error(err);
    } else {
      console.log(res.body);
    }
  });

Other packages similar to superagent-proxy

Keywords

FAQs

Package last updated on 03 Sep 2021

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