Skip to content

Commit 6863d48

Browse files
committed
improve help doc
1 parent 4ca478b commit 6863d48

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,16 @@ A global proxy for go modules. see: [https://goproxy.io](https://goproxy.io)
1919

2020

2121
### Proxy mode
22-
22+
2323
./bin/goproxy -listen=0.0.0.0:80 -cacheDir=/tmp/test
2424

2525
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.
2626
See the file test/get_test.sh.
2727

2828
### Router mode
2929

30+
./bin/goproxy -listen=0.0.0.0:80 -proxy https://goproxy.io
31+
3032
Use the -proxy flag switch to "Router mode", which
3133
implements route filter to routing private module
3234
or public module .

main.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ var proxyHost string
4848
var excludeHost string
4949

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

0 commit comments

Comments
 (0)