A Tor instance pool manager for Rust.
It spawns multiple Tor processes, configures SOCKS proxies, and gives you ready-to-use reqwest clients with automatic load balancing.
- 🔥 Spawn and manage multiple Tor processes
- 🧅 SOCKS5 proxies automatically exposed per instance
- 🔄 Circuit rotation (
NEWNYM) support - 📦 Pooled [
reqwest::Client] with round-robin load balancing - 🛠 Configurable strategies:
- One → single instance
- Many → multiple instances with distributed SOCKS ports
[dependencies]
nagator = { git = "https://github.com/g-codx/nagator.git" }Check examples
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let manager = PoolBuilder::default().build()?;
let mut f = FuturesUnordered::new();
for _ in 0..5 {
let client = manager.client().await?;
f.spawn(get_ip_request(client))?;
}
while f.next().await.is_some() {}
manager.kill().await?;
Ok(())
}- Tor must be installed (tor binary available on your system).
- NEWNYM requests require a 10s cooldown — enforced automatically.
- This crate is async and built on Tokio.
MIT — do whatever you want, but attribution is appreciated.
