在学习和工作中,会使用各种各样的开发工具,有时候在需要用到一些国外的源,那么这个时候,有时候在国内获取不到,或者速度非常慢,就需要给开发工具配置代理了。
在没有配置代理之前,我的Go源是永远通过IDEA拉不下来的。
Fetching https://golang.org/x/tour/wc?go-get=1
https fetch failed: Get https://golang.org/x/tour/wc?go-get=1: dial tcp 216.239.37.1:443: i/o timeout
package golang.org/x/tour/wc/...: unrecognized import path "golang.org/x/tour/wc/..." (https fetch: Get https://golang.org/x/tour/wc?go-get=1: dial tcp 216.239.37.1:443: i/o timeout)
上述原因是因为没有配置代理。
如果你使用了ShadowSocks工具,打开它的设置。
将它的端口设置为1080。可能需要重启一下ShadowSocks
打开Appearance & Behavior > System Settings > Http Proxy
配置手动代理,自动代理似乎不行了。
配置过后,测试一下是否配置成功
出现Successful就说明是配置成功了的
好啦,类似的开发工作,都可以这样配置代理。
祝大家学习和工作顺利!