设置/取消代理http_proxy/https_proxy

  1. 服务器端设置/取消代理
    # Set
    export http_proxy="http://111.11.11.11:1111"
    export https_proxy="http://111.11.11.11:1111"
    
    # Unset
    unset http_proxy
    unset https_proxy
  2. Python端设置/取消代理
    # Set
    import os
    os.environ['http_proxy']="http://111.11.11.11:1111"
    os.environ['https_proxy']="http://111.11.11.11:1111"
    
    # Unset
    import os
    del os.environ['http_proxy']
    del os.environ['https_proxy']
0