Sync README files from source repository [skip ci]

This commit is contained in:
Gitea Actions
2026-01-26 06:18:20 +00:00
parent f558a9c713
commit 4e7b46e058
4 changed files with 335 additions and 155 deletions
+81 -2
View File
@@ -109,31 +109,110 @@ The API will be available at:
**POST** `/api/smart-pool/v1/SmartProxy/get-proxy`
Get a proxy server based on strategy and filters.
**Request Body:**
```json
{
"access_token": "your-token",
"strategy": "least_delay",
"target_domain": "facebook.com",
"ipVersion": "v6",
"ip_version": "v6",
"protocol": "http",
"country": "US"
}
```
**Response:**
```json
{
"success": true,
"error_code": 0,
"message": null,
"proxy": {
"id": 123,
"host": "192.168.1.100",
"port": 8080,
"protocol": "http",
"ip_version": "v6",
"country": "US",
"auth_username": "user",
"auth_password": "pass"
}
}
```
**Available Strategies:**
- `round_robin` (default): Balanced distribution
- `random`: Random selection
- `least_delay`: Fastest proxy (requires `target_domain`)
- `adaptive_ranking`: Highest success rate (requires `target_domain`)
- `alternative`: Similar proxy replacement (requires `referer_proxy.id`)
### Log Usage
**POST** `/api/smart-pool/v1/SmartProxy/log-usage`
Log proxy usage for analytics and strategy optimization.
**Request Body:**
```json
{
"access_token": "your-token",
"proxy_id": 123,
"target_domain": "facebook.com",
"status_code": 200,
"response_time_ms": 450
"response_time_ms": 450,
"error_message": null,
"request_id": "req-12345-abc"
}
```
### Get Available Strategies
**GET** `/api/smart-pool/v1/SmartProxy/strategies`
Get list of available proxy selection strategies.
**Response:**
```json
{
"strategies": [
"round_robin",
"random",
"least_delay",
"adaptive_ranking",
"alternative"
]
}
```
### Health Check
**GET** `/api/smart-pool/v1/SmartProxy/health`
Check API health status.
**Response:**
```json
{
"status": "healthy",
"timestamp": "2024-01-15T10:30:00Z"
}
```
### Upsert Proxy
**POST** `/api/smart-pool/v1/SmartProxy/proxy/upsert`
Add or update proxy metadata.
### Add Access Mapping
**POST** `/api/smart-pool/v1/SmartProxy/access-mapping/add`
Add access token to cluster mapping.
## gRPC Usage
```csharp