export PATH=$PATH:/usr/local/go/bin
export GOPATH=$HOME/go
# 全局代理执行
go get -u v2ray.com/core/...
cd $GOPATH/src/v2ray.com/core

新建fix.patch

diff --git a/infra/bazel/build.bzl b/infra/bazel/build.bzl
index ceb65fd8..96952f04 100644
--- a/infra/bazel/build.bzl
+++ b/infra/bazel/build.bzl
@@ -29,7 +29,7 @@ def _go_command(ctx):
     "GOOS="+ctx.attr.os,
     "GOARCH="+ctx.attr.arch,
     "GOROOT_FINAL=/go",
-    "[email protected]",
+    "GOCACHE=${GOCACHE}",
   ]
# 应用补丁
patch -p1 < fix.patch
# 编译
bazel build --action_env=GOPATH=$GOPATH --action_env=GOCACHE=$(go env GOCACHE) --action_env=PATH=$PATH //release:v2ray_linux_amd64_package#