Skip to content

Commit

Permalink
improve help doc
Browse files Browse the repository at this point in the history
  • Loading branch information
oiooj committed Feb 26, 2021
1 parent 4ca478b commit 6863d48
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,16 @@ 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.
See the file test/get_test.sh.

### 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 .
Expand Down
6 changes: 3 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit 6863d48

Please sign in to comment.