A TypeScript library that wraps axios to route HTTP requests through the Tor network. Current stable version is 2.1.1. It provides a TorAxios class that automatically uses a SOCKS proxy (via Tor) for all requests, with optional control port integration to programmatically refresh the Tor session (get a new IP). Key differentiators: simple API, full TypeScript support, ability to extract httpAgent/httpsAgent for custom axios instances. Requires a running Tor daemon and axios >=1.0.0. Maintained actively.
npm install tor-axiosNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Basic usage: create TorAxios instance with default Tor SOCKS proxy and make a GET request.
Use named import: import { TorAxios } from 'tor-axios' instead of import TorAxios from 'tor-axios'.Run npm install axios alongside tor-axios.
Ensure Tor is installed and running (e.g., brew services start tor or sudo systemctl start tor).
Set controlPort and controlPassword in TorSetupOptions, and enable ControlPort in torrc.
Use with caution in shared environments; consider running dedicated Tor instance.
Start Tor (tor &) or check port configuration.
Generate hash with tor --hash-password <your_password> and update torrc.
Use const { TorAxios } = require('tor-axios');Run npm install tor-axios axios and ensure import path is correct.