feat: Add proxy pool support for IP rotation#311
Open
keung67 wants to merge 1 commit intochenyme:mainfrom
Open
feat: Add proxy pool support for IP rotation#311keung67 wants to merge 1 commit intochenyme:mainfrom
keung67 wants to merge 1 commit intochenyme:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
需求/動機與目的: 輪詢代理IP,例如:webshare建立代理池達到流量負載平衡,利用多帳號使用免費計畫中的1GB/月流量
Round-Robin Proxy 實作完成
改動總覽
僅 1 個新檔案 + 1 處修改,所有現有呼叫者零改動。
[NEW]
proxy_pool.py
Thread-safe round-robin proxy pool:
解析逗號分隔的 proxy URL 為列表
每次呼叫回傳下一個 proxy(round-robin)
配置值變更時自動重建 pool
單一 proxy 或空值時行為與原本完全一致
使用方式
在 config.toml 或管理面板中設定:
每次 API 請求會依序使用 proxy1 → proxy2 → proxy3 → proxy1 → ...
Changes
Related Issues
Verification
验证说明:
Breaking Changes