--- inclusion: always --- # Technology Stack ## Language & Runtime - **Python 3**: Main scripting language with UTF-8 encoding support - **Bash**: Shell scripting for automation ## Dependencies - `requests`: HTTP client for API calls - `yaml`: YAML configuration file generation - `json`: JSON configuration handling - `base64`: Encoding for V2Ray subscriptions - `os`: Environment variable and file system operations ## Configuration Formats - **YAML**: Clash proxy client configurations - **JSON**: SingBox and V2Ray configurations - **Plain text**: Raw proxy lists in various formats - **Base64**: V2Ray subscription links ## Common Commands ### Setup ```bash # Install dependencies (if using pip) pip install requests pyyaml # Set up environment echo "TOKEN=your_webshare_api_key" > .env ``` ### Execution ```bash # Run the main proxy fetcher python3 fetch_proxies.py # Quick API test (manual) bash pr.sh ``` ### Output Files Generated - `proxies_raw.txt`: Raw format (host:port:username:password) - `proxies_http.txt`: HTTP format URLs - `proxies_socks5.txt`: SOCKS5 format URLs - `clash_config.yaml`: Clash client configuration - `singbox_config.json`: SingBox client configuration - `v2ray_config.json`: V2Ray client configuration - `v2ray_subscription.txt`: Base64 encoded subscription ## API Integration - **Webshare.io API v2**: Primary proxy source - Token-based authentication with download tokens - RESTful endpoints for proxy list retrieval