GopherInk / Doc

http://gopher.ink
1 stars 0 forks source link

goproxy #11

Open Sakurasan opened 4 years ago

Sakurasan commented 4 years ago

Enable the go modules feature

export GO111MODULE=on

Set the GOPROXY environment variable

  1. export GOPROXY=https://mirrors.aliyun.com/goproxy/

  2. export GOPROXY=https://goproxy.io

  3. export GOPROXY=https://goproxy.cn

https://github.com/bilibili/kratos/blob/master/doc/wiki-cn/FAQ.md

本地代理设置

export https_proxy=http://127.0.0.1:8123
export http_proxy=http://127.0.0.1:8123
git config --global http.proxy 'http://127.0.0.1:8123'
git config --global https.proxy 'http://127.0.0.1:8123'
Sakurasan commented 4 years ago
go env -w GOPROXY=https://goproxy.cn,direct

跳过私有库

go env -w GOPRIVATE=*.gitlab.com,*.gitee.com

GOSUMDB=sum.golang.org,这个网站是被墙了的,用于验证包的有效性,可以通过如下命令关闭:

go env -w GOSUMDB=off
Sakurasan commented 4 years ago

Outline使用教程

魔改BBR

wget -N --no-check-certificate "https://raw.githubusercontent.com/chiakge/Linux-NetSpeed/master/tcp.sh"
chmod +x tcp.sh
./tcp.sh
Sakurasan commented 4 years ago

https://go-repo.io/