16

#Ubuntu 使用proxychains解决访问github SSL_ERROR_SYSCALL问题

 2 years ago
source link: https://xmanyou.com/ubuntu-proxychains-resolve-github-ssl_eror_syscall/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
18 March 2021 / Ubuntu

#Ubuntu 使用proxychains解决访问github SSL_ERROR_SYSCALL问题

最近要在ubuntu上测试OpenFaaS的faasd,但是怎么都装不上,各种网络错误。

要么连接github失败,要么网络异常中断。

即使是在添加了http_proxy环境变量,依然是各种错误:

Finding latest version from GitHub
0.13.9
Downloading package https://github.com/openfaas/faas-cli/releases/download/0.13.9/faas-cli as /tmp/faas-cli
curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443
sha256sum: 'standard input': no properly formatted SHA256 checksum lines found
Binary checksum didn't match. Exiting
curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443

ubuntu-ssl-error-syscall-github-by-proxychains

我猜测是下载过程中,有些操作并没有走http_proxy这个设置,于是尝试搜索全局设置proxy。

最后在v2ex上发现有人提到了proxychains这个工具,终于解决了这个问题。

https://www.v2ex.com/t/261723

  • 1). 安装proxychains
sudo apt-get install proxychains
  • 2). 添加socks5 代理
sudo vi /etc/proxychains.conf

移除ProxyList中默认的socks4代理,然后添加
socks5 <proxy ip> <proxy 端口>

参考:
[ProxyList]
# add proxy here ...
# meanwile
# defaults set to "tor"
socks5 127.0.0.1 7890
#socks4         127.0.0.1 9050
  • 3). 用proxychains调用安装脚本
sudo proxychains <install.sh>

如果配置正确,能在日志里看到proxychains的连接信息:

ubuntu-ssl-error-syscall-github-by-proxychains-02

阿斌

Read more posts by this author.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK