From 5bb64bce6d0c3aeaf2d33aa939f935cbddedfe8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=B5=E3=83=86=E3=81=95=E3=82=84=E3=82=93?= Date: Sat, 13 Mar 2021 22:15:23 +0800 Subject: [PATCH] Update readme.md --- 下载加速Clone、AWS、Git镜像/readme.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/下载加速Clone、AWS、Git镜像/readme.md b/下载加速Clone、AWS、Git镜像/readme.md index 2ea8977..aa0a0cb 100644 --- a/下载加速Clone、AWS、Git镜像/readme.md +++ b/下载加速Clone、AWS、Git镜像/readme.md @@ -167,6 +167,8 @@ git ssh方面: https://github.zhlh6.cn/ 加快速度。 ### 代理方案 +***git*** + ``` # 代理设置 git config --global http.proxy 'socks5://127.0.0.1:1080' @@ -175,6 +177,13 @@ git config --global https.proxy 'socks5://127.0.0.1:1080' git config --global --unset https.proxy 'socks5://127.0.0.1:1080' git config --global --unset http.proxy 'socks5://127.0.0.1:1080' +``` + + +***mac*** + +``` + # mac 终端 export http_proxy="socks5://127.0.0.1:1080" @@ -183,9 +192,24 @@ export https_proxy="socks5://127.0.0.1:1080" ## 在 .bashrc 或 .zshrc 中设置 alias setproxy="export ALL_PROXY=socks5://127.0.0.1:1080" alias unsetproxy="unset ALL_PROXY" +``` + + +***openssh*** ``` +# github ssh 配置 +## https://help.github.com/articles/using-ssh-over-the-https-port/ + +# HTTP 代理 +ProxyCommand socat - PROXY:127.0.0.1:%h:%p,proxyport=8848 + +# socks5 代理 + ProxyCommand nc -v -x 127.0.0.1:1080 %h %p +``` + + 反向代理加速 —— Static CDN,用来加载图片、内容等: * raw.githubusercontent.com 替换raw.staticdn.net