DennisMao / goproxy

A global proxy for Go modules.

Home Page:https://goproxy.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GOPROXY CircleCI

A global proxy for go modules. see: https://goproxy.io

Build

go generate
go build

Started

./goproxy -listen=0.0.0.0:80 -cache_dir=/data

You can also set proxy for goproxy by setting HTTP_PROXY and HTTPS_PROXY

HTTP_PROXY=$(proxy_server) HTTPS_PROXY=$(proxy_server) ./goproxy -listen=0.0.0.0:80 -cache_dir=/data

Use docker image

docker run -d -p80:8081 goproxy/goproxy

Use the -v flag to persisting the proxy module data (change cacheDir to your own dir):

docker run -d -p80:8081 -v cache_dir:/go goproxy/goproxy

Docker Compose

docker-compose up

Appendix

  1. set export GOPROXY=http://localhost to enable your goproxy.
  2. set export GOPROXY= to disable it.

About

A global proxy for Go modules.

https://goproxy.io

License:MIT License


Languages

Language:Go 86.4%Language:Shell 5.8%Language:HTML 4.3%Language:Dockerfile 1.7%Language:Makefile 1.7%