外网连接问题导致github不能download仓库。我们找个可以连接外网的机器,起开个ss-server服务。然后我们在本地机器起个ss-local服务,把github的请求旁路到可以访问外网的机器,从而可以下载整个仓库。现在来细说怎么做到这一点。
shadowsocks-libev提供了socks5代理的客户端和服务端
我们去github找到shadowsocks-libev仓库。然后通过源码编译安装
然后你的/usr/bin/或者/usr/local/bin/目录应该会多出这两个文件ss-local, ss-server。这两个文件就是ss的客户端代理软件和服务端代理软件。
当然你如果系统有提供,可以直接通过商店快捷安装。比如ubuntu使用
apt install shadowsocks-libev
这里假设你在另一台服务器已经有ss-server服务了
那么在ss-local配置这个服务器连接配置json。
{
"server":"xxx.xxx.xxx.xxx",
"server_port":xxxx,
"local_port":1080,
"password":"******",
"timeout":600,
"method":"your-ss-server-config-connect-method"
}
然后使用这个命令启动ss-local
ss-local -c /path/to/your/ss-local.json -b 0.0.0.0
或者
ss-local -c /path/to/your/ss-local.json
我们去github下载这个仓库
git clone https://github.com/haad/proxychains.git
之后进入这个目录编译安装。
cd proxychains
# needs a working C compiler, preferably gcc
./configure
make
sudo make install
苹果macOS系统可以brew使用快捷安装
$ brew install proxychains
找到proxychains.conf,vim打开,在[ProxyList]增加 socks5 127.0.0.1 1080
# ProxyList format
# type host port [user pass]
# (values separated by 'tab' or 'blank')
#
#
# Examples:
#
# socks5 192.168.67.78 1080 lamer secret
# http 192.168.89.3 8080 justu hidden
# socks4 192.168.1.49 1080
# http 192.168.39.93 8080
#
#
# proxy types: http, socks4, socks5, raw
# * raw: The traffic is simply forwarded to the proxy without modification.
# ( auth types supported: "basic"-http "user/pass"-socks )
#
[ProxyList]
# add proxy here ...
# meanwhile
# defaults set to "tor"
#socks4 127.0.0.1 9050
socks5 127.0.0.1 1080
之后可以通过在需要执行命令的前面加上proxychains即可访问
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。