How to disable Go Proxy

To disable Go module proxy, you can use the following steps:

  1. Set the GOPROXY environment variable to "direct":
$ export GOPROXY=direct

This will instruct Go to use the modules directly from their source repositories, without going through any proxy.

2. Optionally, you can unset any other related environment variables that might interfere with the direct mode:

$ unset GOSUMDB
$ unset GONOSUMDB

3. If you want to make this change permanent, you can add the export statement to your shell profile file (e.g. ~/.bashrc for bash users, ~/.zshrc for zsh users).

After these steps, Go will not use any module proxy, and will fetch modules directly from their source repositories.