mac 下终端代理方案

brew install proxychains-ngecho "\nsocks5 127.0.0.1 1088" >> /usr/local/etc/proxychains.confsock5 server 的安装 自己搜索 shadowsocks server 安装mac 下安装 shadowsocks-libev 当客户端 监听本地端口127.0.0.1:1088现
brew install proxychains-ngecho "\nsocks5  127.0.0.1 1088" >> /usr/local/etc/proxychains.conf

sock5 server 的安装 自己搜索 shadowsocks server 安装

mac 下安装 shadowsocks-libev 当客户端 监听本地端口127.0.0.1:1088

现在在每个命令执行前加上proxychains4 就是会走上面配置的代理了

比如:现在使用 pip

proxychains4 ./bin/pip install django-jython==1.8.0b3[proxychains] config file found: /usr/local/Cellar/proxychains-ng/4.11/etc/proxychains.conf[proxychains] preloading /usr/local/Cellar/proxychains-ng/4.11/lib/libproxychains4.dylib[proxychains] DLL init: proxychains-ng 4.11[proxychains] DLL init: proxychains-ng 4.11[proxychains] DLL init: proxychains-ng 4.11[proxychains] DLL init: proxychains-ng 4.11[proxychains] DLL init: proxychains-ng 4.11[proxychains] DLL init: proxychains-ng 4.11[proxychains] DLL init: proxychains-ng 4.11[proxychains] DLL init: proxychains-ng 4.11[proxychains] DLL init: proxychains-ng 4.11[proxychains] DLL init: proxychains-ng 4.11[proxychains] DLL init: proxychains-ng 4.11[proxychains] DLL init: proxychains-ng 4.11Collecting django-jython==1.8.0b3[proxychains] DLL init: proxychains-ng 4.11[proxychains] Strict chain  ...  127.0.0.1:1088  ...  pypi.python.org:443  ...  OK/Users/timgerk/alibaba/jxcode/Lib/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:310: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.org/en/latest/security.html# snimissingwarning.  warnings.warn(/Users/timgerk/alibaba/jxcode/Lib/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:115: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.org/en/latest/security.html# insecureplatformwarning.  warnings.warn(  Using cached django-jython-1.8.0b3.tar.gz[proxychains] DLL init: proxychains-ng 4.11Collecting django-jython==1.8.0b3[proxychains] DLL init: proxychains-ng 4.11[proxychains] Strict chain  ...  127.0.0.1:1088  ...  pypi.python.org:443  ...  OK/Users/timgerk/alibaba/jxcode/Lib/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:310: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.org/en/latest/security.html# snimissingwarning.  warnings.warn(/Users/timgerk/alibaba/jxcode/Lib/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:115: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.org/en/latest/security.html# insecureplatformwarning.  warnings.warn(  Using cached django-jython-1.8.0b3.tar.gz[proxychains] DLL init: proxychains-ng 4.11Collecting Django=1.8.0 (from django-jython==1.8.0b3)  Downloading Django-1.8.13-py2.py3-none-any.whl (6.2MB)    100% |████████████████████████████████| 6.2MB 92kB/sBuilding wheels for collected packages: django-jython[proxychains] DLL init: proxychains-ng 4.11  Running setup.py bdist_wheel for django-jython ... done  Stored in directory: /Users/timgerk/.cache/pip/wheels/5e/c7/be/02763898b0bedf9a388ac5fdd14c94c9e63e6ba0cd34189287Successfully built django-jythonInstalling collected packages: Django, django-jythonSuccessfully installed Django-1.8.13 django-jython-1.8.0b3[proxychains] DLL init: proxychains-ng 4.11

关键字:Python