前言
PySocks 是一个 Python 库,使 Python 能够使用 socks5 代理。
一、基本概念
在使用 pip 安装 Python 模块时,如果需要通过 socks5 代理服务器进行连接,那么也需要安装 PySocks 库。
二、操作步骤
1.取消所有代理
unset all_proxy && unset ALL_PROXY
2.安装pysocks
pip install pysocks
3.重新开启代理
export ALL_PROXY=socks5://127.0.0.1:1080/
export all_proxy=socks5://127.0.0.1:1080/
总结
本文介绍在使用 pip 安装 Python 模块时,如果需要通过 socks5 代理服务器进行连接,那么也需要安装 PySocks 库的方法。