Skip to content

lofi-code-x/nagator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

img.png

🧅 nagator

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.

✨ Features

  • 🔥 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

📦 Installation

[dependencies]
nagator = { git = "https://github.com/g-codx/nagator.git" }

🚀 Usage

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(())
}

⚠️ Notes

  • 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.

📜 License

MIT — do whatever you want, but attribution is appreciated.

About

A Tor instance pool manager for Rust.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages