Skip to main content

Crate gooty_proxy

Crate gooty_proxy 

Source
Expand description

§Gooty Proxy

A robust library for discovering, testing, and managing HTTP and SOCKS proxies.

§Overview

Gooty Proxy provides tools for working with proxy servers, including:

  • Discovery of proxy servers from various sources
  • Validation and testing of proxies for connectivity and anonymity
  • Collection of metadata about proxies (location, organization, ASN)
  • Management of proxy pools for rotation and failover
  • Persistence of proxy data for reuse across sessions

The library is designed to be both easy to use for simple cases and highly configurable for advanced use cases.

§Examples

use gooty_proxy::ProxyManager;

async fn example() -> Result<(), Box<dyn std::error::Error>> {
    // Create a new proxy manager
    let mut manager = ProxyManager::new()?;

    // Initialize components
    manager.init_judge().await?;
    manager.init_sleuth()?;

    // Add a proxy to test
    let proxy_url = "http://example.com:8080";
    manager.add_proxy_from_url(proxy_url)?;

    // Test the proxy
    manager.check_proxy(proxy_url).await?;

    // Get detailed information about the proxy
    manager.enrich_proxy(proxy_url).await?;

    // Get a reference to the tested proxy
    if let Some(proxy) = manager.get_proxy(proxy_url) {
        println!("Proxy type: {}", proxy.proxy_type);
        println!("Anonymity: {}", proxy.anonymity);
        if let Some(country) = &proxy.country {
            println!("Country: {}", country);
        }
    }

    Ok(())
}

Re-exports§

pub use config::AppConfig;
pub use config::ConfigLoader;
pub use definitions::defaults;
pub use definitions::enums::AnonymityLevel;
pub use definitions::enums::ProxyType;
pub use definitions::errors::ConfigError;
pub use definitions::errors::ConfigResult;
pub use definitions::errors::ProxyError;
pub use definitions::errors::SourceError;
pub use definitions::errors::SourceResult;
pub use definitions::proxy::Proxy;
pub use definitions::source::Source;
pub use inspection::Cidr;
pub use inspection::IpMetadata;
pub use inspection::Judge;
pub use inspection::Location;
pub use inspection::NetworkInfo;
pub use inspection::Organization;
pub use inspection::OwnershipLookup;
pub use inspection::Sleuth;
pub use io::filesystem::Filestore;
pub use io::filesystem::FilestoreConfig;
pub use io::http::Requestor;
pub use orchestration::manager::ProxyManager;
pub use orchestration::manager::ProxyStats;
pub use orchestration::manager::SourceStats;

Modules§

config
Configuration Module
definitions
Definitions Module
inspection
Inspection Module
io
I/O Module
orchestration
Orchestration Module
utils
Utility Module