1. Power Shell设置代理

    # 查看代理
    netsh winhttp show proxy
    # 设置代理
    # 需要管理员权限
    # 否则 Error writing proxy settings. (5) Access is denied.
    netsh winhttp set proxy 127.0.0.1:41091
    # or
    netsh winhttp import proxy source=ie
    
    $env:HTTP_PROXY="http://127.0.0.1:41091"
    $env:HTTPS_PROXY="https://127.0.0.1:41091"
    
    # 取消代理
    netsh winhttp reset proxy
    
  2. Git设置代理

    git config --global http.proxy http://127.0.0.1:1080
    git config --global https.proxy http://127.0.0.1:1080
    
    git config --global --unset http.proxy
    git config --global --unset https.proxy
    
Copyright © rootwhois.cn 2021-2022 all right reserved,powered by GitbookFile Modify: 2022-11-26 20:03:31

results matching ""

    No results matching ""