diff --git a/README.md b/README.md index 580003c76..4c904e69d 100644 --- a/README.md +++ b/README.md @@ -52,13 +52,13 @@ You can install from source: The [releases](https://github.com/fortio/fortio/releases) page has binaries for many OS/architecture combinations (see assets): ```shell -curl -L https://github.com/fortio/fortio/releases/download/v1.38.3/fortio-linux_amd64-1.38.3.tgz \ +curl -L https://github.com/fortio/fortio/releases/download/v1.38.4/fortio-linux_amd64-1.38.4.tgz \ | sudo tar -C / -xvzpf - # or the debian package -wget https://github.com/fortio/fortio/releases/download/v1.38.3/fortio_1.38.3_amd64.deb -dpkg -i fortio_1.38.3_amd64.deb +wget https://github.com/fortio/fortio/releases/download/v1.38.4/fortio_1.38.4_amd64.deb +dpkg -i fortio_1.38.4_amd64.deb # or the rpm -rpm -i https://github.com/fortio/fortio/releases/download/v1.38.3/fortio-1.38.3-1.x86_64.rpm +rpm -i https://github.com/fortio/fortio/releases/download/v1.38.4/fortio-1.38.4-1.x86_64.rpm # and more, see assets in release page ``` @@ -68,7 +68,7 @@ On a MacOS you can also install Fortio using [Homebrew](https://brew.sh/): brew install fortio ``` -On Windows, download https://github.com/fortio/fortio/releases/download/v1.38.3/fortio_win_1.38.3.zip and extract `fortio.exe` to any location, then using the Windows Command Prompt: +On Windows, download https://github.com/fortio/fortio/releases/download/v1.38.4/fortio_win_1.38.4.zip and extract `fortio.exe` to any location, then using the Windows Command Prompt: ``` fortio.exe server ``` @@ -116,15 +116,17 @@ Full list of command line flags (`fortio help`):
-Φορτίο 1.38.3 usage:
+Φορτίο 1.38.4 usage:
     fortio command [flags] target
 where command is one of: load (load testing), server (starts ui, rest api,
- http-echo, redirect, proxies, tcp-echo and grpc ping servers), tcp-echo (only
- the tcp-echo server), report (report only UI server), redirect (only the
- redirect server), proxies (only the -M and -P configured proxies), grpcping
- (grpc client), or curl (single URL debug), or nc (single tcp or udp://
- connection), or version (prints the full version and build details).
-where target is a url (http load tests) or host:port (grpc health test).
+ http-echo, redirect, proxies, tcp-echo, udp-echo and grpc ping servers),
+ tcp-echo (only the tcp-echo server), udp-echo (only udp-echo server),
+ report (report only UI server), redirect (only the redirect server),
+ proxies (only the -M and -P configured proxies), grpcping (grpc client),
+ or curl (single URL debug), or nc (single tcp or udp:// connection),
+ or version (prints the full version and build details).
+where target is a url (http load tests) or host:port (grpc health test),
+ or tcp://host:port (tcp load test), or udp://host:port (udp load test).
 flags are:
   -H header
         Additional header(s)
diff --git a/fortio_main.go b/fortio_main.go
index 32f7e5740..564aea613 100644
--- a/fortio_main.go
+++ b/fortio_main.go
@@ -71,16 +71,18 @@ func (f *httpMultiFlagList) Set(value string) error {
 
 // Usage to a writer.
 func usage(w io.Writer, msgs ...interface{}) {
-	_, _ = fmt.Fprintf(w, "Φορτίο %s usage:\n\t%s command [flags] target\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n",
+	_, _ = fmt.Fprintf(w, "Φορτίο %s usage:\n\t%s command [flags] target\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n",
 		version.Short(),
 		os.Args[0],
 		"where command is one of: load (load testing), server (starts ui, rest api,",
-		" http-echo, redirect, proxies, tcp-echo and grpc ping servers), tcp-echo (only",
-		" the tcp-echo server), report (report only UI server), redirect (only the",
-		" redirect server), proxies (only the -M and -P configured proxies), grpcping",
-		" (grpc client), or curl (single URL debug), or nc (single tcp or udp://",
-		" connection), or version (prints the full version and build details).",
-		"where target is a url (http load tests) or host:port (grpc health test).")
+		" http-echo, redirect, proxies, tcp-echo, udp-echo and grpc ping servers), ",
+		" tcp-echo (only the tcp-echo server), udp-echo (only udp-echo server),",
+		" report (report only UI server), redirect (only the redirect server),",
+		" proxies (only the -M and -P configured proxies), grpcping (grpc client),",
+		" or curl (single URL debug), or nc (single tcp or udp:// connection),",
+		" or version (prints the full version and build details).",
+		"where target is a url (http load tests) or host:port (grpc health test),",
+		" or tcp://host:port (tcp load test), or udp://host:port (udp load test).")
 	bincommon.FlagsUsage(w, msgs...)
 }
 
@@ -248,9 +250,6 @@ func main() {
 		fnet.UDPEchoServer("udp-echo", *udpPortFlag, *udpAsyncFlag)
 		startProxies()
 	case "proxies":
-		if len(flag.Args()) != 0 {
-			usageErr("Error: fortio proxies command only takes -P / -M flags")
-		}
 		isServer = true
 		if startProxies() == 0 {
 			usageErr("Error: fortio proxies command needs at least one -P / -M flag")
@@ -281,6 +280,9 @@ func main() {
 		usageErr("Error: unknown command ", command)
 	}
 	if isServer {
+		if len(flag.Args()) != 0 {
+			usageErr("Error: too many arguments (typo in a flag?)")
+		}
 		if confDir == "" {
 			log.Infof("Note: not using dynamic flag watching (use -config to set watch directory)")
 		}