fix: add pysocks dependency to support SOCKS5 proxy for pip install#7221
fix: add pysocks dependency to support SOCKS5 proxy for pip install#7221Neko-Yukari wants to merge 3 commits intoAstrBotDevs:masterfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds pysocks to AstrBot’s core Python dependencies to enable pip/urllib3 SOCKS5 proxy support during plugin dependency installation when a SOCKS5 proxy is configured.
Changes:
- Add
pysocks>=1.7.1topyproject.tomldependencies.
There was a problem hiding this comment.
Code Review
This pull request adds the pysocks dependency to pyproject.toml to enable SOCKS5 support. The review feedback points out that the requirements.txt file is currently out of sync and should be updated to include both the new pysocks dependency and the existing python-socks dependency to ensure consistency across different installation methods.
回复代码审查感谢代码审查! 关于 requirements.txt 同步问题已通过后续提交修复:
现在 |
Summary
Add
pysocksas a dependency to enable pip install functionality when using SOCKS5 proxy configuration.Problem
When AstrBot is configured to use a SOCKS5 proxy (via
http_proxy: "socks5://..."in config), pip package installation fails because Python's urllib does not natively support SOCKS5 protocol. Thepysockslibrary patches urllib to enable SOCKS5 support.Solution
Add
pysocks>=1.7.1to the dependencies inpyproject.toml.Testing
Closes #(issue number if applicable)