From 6863d48b5e0a1cabeb59faeb20e7aab7fc431582 Mon Sep 17 00:00:00 2001 From: kun Date: Fri, 26 Feb 2021 14:45:18 +0800 Subject: [PATCH] improve help doc --- README.md | 4 +++- main.go | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c422070..9fe71ad 100644 --- a/README.md +++ b/README.md @@ -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 . diff --git a/main.go b/main.go index 6b1afab..89bb9ab 100644 --- a/main.go +++ b/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()