{"id":15396584,"url":"https://github.com/hupe1980/hypertor","last_synced_at":"2025-04-16T00:17:32.103Z","repository":{"id":256087698,"uuid":"854088994","full_name":"hupe1980/hypertor","owner":"hupe1980","description":"Hypertor is a Rust library for HTTP requests over Tor, supporting HTTP/HTTPS with configurable TLS via hyper and arti_client.","archived":false,"fork":false,"pushed_at":"2024-09-08T22:10:27.000Z","size":8,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-16T00:17:26.573Z","etag":null,"topics":["http-client","privacy","tor"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hupe1980.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-08T11:39:08.000Z","updated_at":"2025-01-10T22:39:23.000Z","dependencies_parsed_at":"2024-09-08T23:25:35.870Z","dependency_job_id":"037f3601-ab0b-4523-9ed0-ce616b2e5a72","html_url":"https://github.com/hupe1980/hypertor","commit_stats":null,"previous_names":["hupe1980/hypertor"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hupe1980%2Fhypertor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hupe1980%2Fhypertor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hupe1980%2Fhypertor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hupe1980%2Fhypertor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hupe1980","download_url":"https://codeload.github.com/hupe1980/hypertor/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249173096,"owners_count":21224485,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["http-client","privacy","tor"],"created_at":"2024-10-01T15:34:16.901Z","updated_at":"2025-04-16T00:17:32.086Z","avatar_url":"https://github.com/hupe1980.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hypertor\n\n`hypertor` is a Rust library that provides a client for making HTTP requests over the Tor network. It integrates with the Tor network and supports both HTTP and HTTPS protocols with configurable TLS support. Built on top of `hyper` and `arti_client`, it allows you to send GET, POST, and HEAD requests with custom configurations.\n\n## Features\n\n- **HTTP and HTTPS Support:** Send requests over both HTTP and HTTPS.\n- **Tor Integration:** Connect through the Tor network.\n- **Configurable TLS:** Customize TLS settings for secure connections.\n- **Builder Pattern:** Easily configure clients with `ClientConfigBuilder`.\n\n## Installation\n\nAdd `hypertor` to your `Cargo.toml`:\n\n```toml\n[dependencies]\nhypertor = \"0.1\"  # Replace with the latest version\n```\n\n## Usage\nHere's a basic example of how to use hypertor to create a client and make HTTP requests:\n\n### Basic Example\n```rust\nuse hypertor::Client;\nuse anyhow::Result;\n\n#[tokio::main]\nasync fn main() -\u003e Result\u003c()\u003e {\n    // Create a new client with default configuration\n    let client = Client::new().await?;\n\n    // Make a GET request\n    let response = client.get(\"http://httpbin.org/get\").await?;\n    println!(\"GET response: {:?}\", response);\n\n    // Make a POST request with JSON body\n    let body = hyper::body::Bytes::from(r#\"{\"key\":\"value\"}\"#);\n    let response = client.post(\"http://httpbin.org/post\", \"application/json\", body).await?;\n    println!(\"POST response: {:?}\", response);\n\n    // Make a HEAD request\n    let response = client.head(\"http://httpbin.org/get\").await?;\n    println!(\"HEAD response: {:?}\", response);\n\n    Ok(())\n}\n```\n\n## Custom Configuration\nYou can also create a client with a custom configuration:\n```rust\nuse hypertor::{Client, ClientConfig, ClientConfigBuilder};\nuse tokio_native_tls::native_tls::TlsConnector;\nuse arti_client::TorClientConfig;\n\n#[tokio::main]\nasync fn main() -\u003e Result\u003c()\u003e {\n    // Create a custom TLS connector\n    let tls_config = TlsConnector::builder().build()?;\n\n    // Create a custom Tor client configuration\n    let tor_config = TorClientConfig::builder()\n        .address_filter()\n        .allow_onion_addrs(true)\n        .build()?;\n\n    // Build client configuration\n    let config = ClientConfigBuilder::new()\n        .tls_config(tls_config)\n        .tor_config(tor_config)\n        .build()?;\n\n    // Create a client with the custom configuration\n    let client = Client::with_config(config).await?;\n\n    // Use the client as shown in the basic example\n\n    Ok(())\n}\n```\n## Error Handling\nhypertor uses anyhow::Result for error handling, which provides a flexible way to handle and propagate errors. For more details, refer to the anyhow documentation.\n\n## Contributing\nContributions are welcome! Please open an issue or submit a pull request on GitHub.\n\n## License\nThis project is licensed under the MIT License. See the LICENSE file for details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhupe1980%2Fhypertor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhupe1980%2Fhypertor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhupe1980%2Fhypertor/lists"}