๐ Proxy6 Rust API Wrapper
A modern, type-safe Rust client for the Proxy6 API. This library provides a complete wrapper for managing proxies, handling authentication, and performing all operations available through the Proxy6 API.
โจ Features
- ๐ Type Safety - Strongly typed API with compile-time guarantees
- ๐ Async/Await - Built on
reqwestfor high-performance async operations - ๐ Comprehensive - Complete coverage of all Proxy6 API methods
- ๐ก๏ธ Error Handling - Detailed error types with proper error categorization
- ๐งช Well-Tested - Extensive test suite with mock server support
- ๐ Documentation - Full API documentation with examples
๐ฆ Installation
Add to Cargo.toml or add to project:
cargo add proxy6
๐ Quick Start
use ;
use Error;
async
๐ API Methods
Proxy Management
get_proxy()- Retrieve your proxy listbuy()- Purchase new proxiesprolong()- Extend proxy validitydelete()- Delete proxiescheck()- Check proxy validity
Information & Pricing
get_price()- Get pricing informationget_count()- Get available proxy count by countryget_country()- Get available countries
Proxy Configuration
set_type()- Change proxy protocol (HTTP/SOCKS)set_description()- Update proxy descriptionsip_auth()- Manage IP authentication
๐ง Advanced Usage
Error Handling
The library provides detailed error types:
match client.get_proxy.await
Custom HTTP Client
You can provide your own reqwest::Client instance:
let custom_client = new
.timeout
.proxy
.build?;
let client = builder
.api_key
.requester
.build?;
Batch Operations
// Buy multiple proxies
let buy_response = client
.buy
.await?;
// Extend specific proxies
let prolong_response = client
.prolong
.await?;
๐งช Testing
The library includes comprehensive tests. Run them with:
For tests with mock server:
๐ Documentation
Full API documentation is available at:
- Docs.rs - Online documentation
- Local docs:
cargo doc --open
๐ค Contributing
Contributions are welcome! Please feel free to submit pull requests.
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a pull request
Development Setup
# Clone the repository
# Run tests
# Check code quality
# Format code
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Links
๐ Acknowledgments
- Proxy6 for providing the API
- The Rust community for excellent tooling and libraries
Need help? Open an issue on GitHub or check the comprehensive documentation! ๐ฏ
๐ค Author
Filipponik
- GitHub: @Filipponik
- Repository: proxy6-rs