mirror of https://github.com/goproxyio/goproxy
improve help doc
parent
4ca478b120
commit
38a5470cbf
|
@ -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 .
|
||||
|
|
6
main.go
6
main.go
|
@ -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()
|
||||
|
||||
|
|
Loading…
Reference in New Issue