improve help doc

pull/170/head
kun 2021-02-26 14:45:18 +08:00
parent 4ca478b120
commit 38a5470cbf
2 changed files with 6 additions and 4 deletions

View File

@ -19,7 +19,7 @@ A global proxy for go modules. see: [https://goproxy.io](https://goproxy.io)
### Proxy mode
./bin/goproxy -listen=0.0.0.0:80 -cacheDir=/tmp/test
If you run `go get -v pkg` in the proxy machine, should set a new GOPATH which is different from the old GOPATH, or mayebe deadlock.
@ -27,6 +27,8 @@ A global proxy for go modules. see: [https://goproxy.io](https://goproxy.io)
### Router mode
./bin/goproxy -listen=0.0.0.0:80 -proxy https://goproxy.io
Use the -proxy flag switch to "Router mode", which
implements route filter to routing private module
or public module .

View File

@ -48,9 +48,9 @@ var proxyHost string
var excludeHost string
func init() {
flag.StringVar(&excludeHost, "exclude", "", "exclude host pattern")
flag.StringVar(&proxyHost, "proxy", "", "next hop proxy for go modules")
flag.StringVar(&cacheDir, "cacheDir", "", "go modules cache dir")
flag.StringVar(&excludeHost, "exclude", "", "exclude host pattern, you can exclude internal Git services")
flag.StringVar(&proxyHost, "proxy", "", "next hop proxy for Go Modules, recommend use https://gopropxy.io")
flag.StringVar(&cacheDir, "cacheDir", "", "Go Modules cache dir, default is $GOPATH/pkg/mod/cache/download")
flag.StringVar(&listen, "listen", "0.0.0.0:8081", "service listen address")
flag.Parse()