用穿透的方式解决国内阿里云访问github不顺畅的问题
![/images/posts/用穿透的方式解决国内阿里云访问github不顺畅的问题/featuredImage.png /images/posts/用穿透的方式解决国内阿里云访问github不顺畅的问题/featuredImage.png](/images/posts/%e7%94%a8%e7%a9%bf%e9%80%8f%e7%9a%84%e6%96%b9%e5%bc%8f%e8%a7%a3%e5%86%b3%e5%9b%bd%e5%86%85%e9%98%bf%e9%87%8c%e4%ba%91%e8%ae%bf%e9%97%aegithub%e4%b8%8d%e9%a1%ba%e7%95%85%e7%9a%84%e9%97%ae%e9%a2%98/featuredImage.png)
目录
国内阿里云访问github.com , 经常不顺畅
- 解决方式 , 在海外买一台服务器
- 国内的服务直接穿透过去
在国内阿里云服务器配置
~/.ssh/config
Host github.com
ProxyCommand ssh 用户名@海外机器IP nc %h %p
链路
%%{init: {'theme': 'forest', 'fill': 'white' } }%%
sequenceDiagram
participant 深圳服务器
participant 海外服务器
participant github
深圳服务器->>海外服务器: 访问github从海外穿透过去
海外服务器->>github: 海外去获取github
github->>海外服务器: github返回
海外服务器->>深圳服务器: 海外返回深圳服务器