docs: update README with comprehensive usage guide and feature overview
parent
da75fdd86d
commit
04b1e44daf
|
@ -49,11 +49,15 @@ jobs:
|
|||
- name: Build project
|
||||
run: cargo build --release --target ${{ matrix.target }}
|
||||
|
||||
- name: Rename binary for release
|
||||
run: |
|
||||
mkdir -p release-assets
|
||||
cp target/${{ matrix.target }}/release/${{ matrix.artifact_name }} release-assets/${{ matrix.release_name }}
|
||||
|
||||
- name: Upload release assets
|
||||
uses: softprops/action-gh-release@v2
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
with:
|
||||
files: target/${{ matrix.target }}/release/${{ matrix.artifact_name }}
|
||||
name: ${{ matrix.release_name }}
|
||||
files: release-assets/${{ matrix.release_name }}
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
147
README.md
147
README.md
|
@ -1,61 +1,122 @@
|
|||
# Gemini-Keychecker
|
||||
|
||||
A tool to validate Google Gemini API keys.
|
||||
A high-performance tool to validate Google Gemini API keys with batch processing capabilities.
|
||||
|
||||
## Features
|
||||
|
||||
- **API key validation**: Validates Google Gemini API keys efficiently
|
||||
- **High-performance processing**: High concurrency with HTTP/2 multiplexing and low memory footprint
|
||||
- **Backup support**: Automatically creates backup files for all processed keys
|
||||
- **Proxy support**: HTTP/HTTPS proxy with authentication
|
||||
- **Smart retry**: Configurable retry mechanism for failed requests
|
||||
|
||||
## Installation
|
||||
|
||||
### Download Pre-built Binaries
|
||||
|
||||
Download the latest release from [GitHub Releases](https://github.com/your-username/Gemini-Keychecker/releases):
|
||||
|
||||
- **Linux**: `gemini-keychecker-linux-x86_64`
|
||||
- **Windows**: `gemini-keychecker-windows-x86_64.exe`
|
||||
|
||||
### Build from Source
|
||||
|
||||
```bash
|
||||
git clone https://github.com/your-username/Gemini-Keychecker.git
|
||||
cd Gemini-Keychecker
|
||||
cargo build --release
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
### Basic Usage
|
||||
### Quick Start
|
||||
|
||||
1. Create a `keys.txt` file with one API key per line
|
||||
2. Run the tool:
|
||||
|
||||
```bash
|
||||
# Validate keys from keys.txt and save valid ones to output_keys.txt
|
||||
./target/release/gemini-keychecker
|
||||
|
||||
# Specify custom input and output files
|
||||
./target/release/gemini-keychecker -i my_keys.txt -o valid_keys.txt
|
||||
./gemini-keychecker
|
||||
```
|
||||
|
||||
### Advanced Usage
|
||||
The tool will:
|
||||
- Validate all API keys and create output files for valid keys
|
||||
- Generate a backup file (`backup_keys.txt`) containing all processed keys
|
||||
|
||||
### Configuration
|
||||
|
||||
The tool supports three configuration methods (in order of precedence):
|
||||
|
||||
1. **Command line arguments**
|
||||
2. **Configuration file** (`Config.toml`)
|
||||
|
||||
### Configuration File
|
||||
|
||||
Create a `Config.toml` file in the same directory. See `Config.toml.example` for reference.
|
||||
|
||||
|
||||
### Command Line Options
|
||||
|
||||
```bash
|
||||
# Use proxy with authentication
|
||||
./target/release/gemini-keychecker -x http://username:password@proxy.example.com:8080
|
||||
|
||||
# Adjust concurrency and timeout
|
||||
./target/release/gemini-keychecker -c 50 -t 30
|
||||
|
||||
# Use custom API host
|
||||
./target/release/gemini-keychecker -u https://custom-api.googleapis.com/
|
||||
```
|
||||
|
||||
## Command Line Options
|
||||
|
||||
```
|
||||
Options:
|
||||
-i, --input-path <INPUT_PATH> Input file containing API keys [default: keys.txt]
|
||||
-o, --output-path <OUTPUT_PATH> Output file for valid keys [default: output_keys.txt]
|
||||
-u, --api-host <API_HOST> API host URL [default: https://generativelanguage.googleapis.com/]
|
||||
-t, --timeout-sec <TIMEOUT_SEC> Request timeout in seconds [default: 60]
|
||||
-c, --concurrency <CONCURRENCY> Max concurrent requests [default: 30]
|
||||
-x, --proxy <PROXY> Proxy URL (supports http://user:pass@host:port)
|
||||
-h, --help Print help
|
||||
-V, --version Print version
|
||||
-i, --input-path <INPUT_PATH> Input file containing API keys [default: keys.txt]
|
||||
-b, --backup-path <BACKUP_PATH> Backup file for all processed keys [default: backup_keys.txt]
|
||||
-u, --api-host <API_HOST> API host URL [default: https://generativelanguage.googleapis.com/]
|
||||
-t, --timeout-sec <TIMEOUT_SEC> Request timeout in seconds [default: 15]
|
||||
-c, --concurrency <CONCURRENCY> Max concurrent requests [default: 50]
|
||||
-r, --max-retries <MAX_RETRIES> Max retry attempts for failed requests [default: 2]
|
||||
-x, --proxy <PROXY> Proxy URL (http://user:pass@host:port)
|
||||
-h, --help Print help
|
||||
```
|
||||
|
||||
|
||||
### Examples
|
||||
|
||||
#### Basic Usage
|
||||
```bash
|
||||
# Use default settings
|
||||
./gemini-keychecker
|
||||
|
||||
# Custom input file
|
||||
./gemini-keychecker -i my_api_keys.txt
|
||||
|
||||
# Custom backup location
|
||||
./gemini-keychecker -b /path/to/backup/keys.txt
|
||||
```
|
||||
|
||||
#### Performance Tuning
|
||||
```bash
|
||||
# High concurrency for fast validation
|
||||
./gemini-keychecker -c 100 -t 10
|
||||
|
||||
# Conservative settings for rate-limited environments
|
||||
./gemini-keychecker -c 10 -t 30 -r 5
|
||||
```
|
||||
|
||||
#### Proxy Configuration
|
||||
```bash
|
||||
# HTTP proxy without authentication
|
||||
./gemini-keychecker -x http://proxy.company.com:8080
|
||||
|
||||
# HTTP proxy with authentication
|
||||
./gemini-keychecker -x http://username:password@proxy.company.com:8080
|
||||
|
||||
# HTTPS proxy
|
||||
./gemini-keychecker -x https://user:pass@secure-proxy.com:8443
|
||||
```
|
||||
|
||||
## Input Format
|
||||
|
||||
Create a text file with one API key per line
|
||||
Create a text file with one API key per line:
|
||||
|
||||
## Proxy Configuration
|
||||
|
||||
The tool supports HTTP/HTTPS proxies with optional authentication:
|
||||
|
||||
```bash
|
||||
# HTTP proxy without authentication
|
||||
./target/release/gemini-keychecker -x http://proxy.example.com:8080
|
||||
|
||||
# HTTP proxy with authentication
|
||||
./target/release/gemini-keychecker -x http://username:password@proxy.example.com:8080
|
||||
|
||||
# HTTPS proxy with authentication
|
||||
./target/release/gemini-keychecker -x https://user:pass@secure-proxy.com:8443
|
||||
```
|
||||
AIzaSyxxxxxxxxxxxxxxefghij
|
||||
AIzaSyxxxxxxxxxxxxxxefghij
|
||||
AIzaSyxxxxxxxxxxxxxxefghij
|
||||
```
|
||||
|
||||
## Performance
|
||||
|
||||
- **High-performance**: Optimized concurrent processing with configurable limits
|
||||
- **HTTP/2 Multiplexing**: Enhanced connection efficiency
|
||||
- **Smart Retry**: Automatic retry with exponential backoff
|
||||
- **Low Memory Usage**: Streaming processing minimizes resource consumption
|
||||
|
|
Loading…
Reference in New Issue