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

socks-proxy-agent

Package Overview
Dependencies
Maintainers
2
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

socks-proxy-agent

A SOCKS proxy `http.Agent` implementation for HTTP and HTTPS

  • 8.0.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
24M
increased by2.89%
Maintainers
2
Weekly downloads
 
Created

What is socks-proxy-agent?

The socks-proxy-agent package is a SOCKS proxy http.Agent implementation for HTTP and HTTPS. This package allows you to route HTTP and HTTPS requests through a SOCKS proxy server. It is useful for bypassing network restrictions or connecting to servers anonymously.

What are socks-proxy-agent's main functionalities?

HTTP/HTTPS request via SOCKS proxy

This code sample demonstrates how to send an HTTP or HTTPS request through a SOCKS proxy using the socks-proxy-agent package. The agent is created with the proxy server information and passed to the HTTP request options.

const SocksProxyAgent = require('socks-proxy-agent');
const agent = new SocksProxyAgent('socks://localhost:1080');
const https = require('https');

https.get('https://example.com', { agent }, (res) => {
  console.log(`Got response: ${res.statusCode}`);
  // consume response body
  res.resume();
}).on('error', (e) => {
  console.error(`Got error: ${e.message}`);
});

Other packages similar to socks-proxy-agent

Keywords

FAQs

Package last updated on 04 Sep 2023

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