diff --git a/README.md b/README.md index 7fe14a8..1654722 100644 --- a/README.md +++ b/README.md @@ -116,6 +116,8 @@ GLOBAL OPTIONS: --ipv6, -6 Force IPv6 only (default: false) --no-download Do not perform download test (default: false) --no-upload Do not perform upload test (default: false) + --no-icmp Do not use ICMP ping. ICMP doesn't work well under Linux + at this moment, so you might want to disable it (default: false) --concurrent value Concurrent HTTP requests being made (default: 3) --bytes Display values in bytes instead of bits. Does not affect the image generated by --share, nor output from @@ -126,27 +128,32 @@ GLOBAL OPTIONS: --share Generate and provide a URL to the LibreSpeed.org share results image, not displayed with --csv (default: false) --simple Suppress verbose output, only show basic information - (default: false) + (default: false) --csv Suppress verbose output, only show basic information in CSV format. Speeds listed in bit/s and not affected by --bytes - (default: false) + (default: false) --csv-delimiter CSV_DELIMITER Single character delimiter (CSV_DELIMITER) to use in CSV output. (default: ",") --csv-header Print CSV headers (default: false) --json Suppress verbose output, only show basic information in JSON format. Speeds listed in bit/s and not - affected by --bytes (default: false) + affected by --bytes (default: false) --list Display a list of LibreSpeed.org servers (default: false) --server SERVER Specify a SERVER ID to test against. Can be supplied multiple times. Cannot be used with --exclude --exclude EXCLUDE EXCLUDE a server from selection. Can be supplied multiple times. Cannot be used with --server --server-json value Use an alternative server list from remote JSON file - --local-json value Use an alternative server list from local JSON file + --local-json value Use an alternative server list from local JSON file, + or read from stdin with "--local-json -". --source SOURCE SOURCE IP address to bind to --timeout TIMEOUT HTTP TIMEOUT in seconds. (default: 15) + --duration value Upload and download test duration in seconds (default: 15) + --chunks value Chunks to download from server, chunk size depends on server configuration (default: 100) + --upload-size value Size of payload being uploaded in KiB (default: 1024) --secure Use HTTPS instead of HTTP when communicating with LibreSpeed.org operated servers (default: false) + --skip-cert-verify Skip verifying SSL certificate for HTTPS connections (self-signed certs) (default: false) --no-pre-allocate Do not pre allocate upload data. Pre allocation is enabled by default to improve upload performance. To support systems with insufficient memory, use this @@ -190,6 +197,10 @@ locally via `--local-json`). The format is as below: ] ``` +The `--local-json` option can also read from `stdin`: + +`echo '[{"id": 1,"name": "a","server": "https://speedtest.example.com/","dlURL": "garbage.php","ulURL": "empty.php","pingURL": "empty.php","getIpURL": "getIP.php"}]' | librespeed-cli --local-json - ` + As you can see in the example, all servers have their schemes defined. In case of undefined scheme (e.g. `//example.com`), `librespeed-cli` will use `http` by default, or `https` when the `--secure` option is enabled. diff --git a/main.go b/main.go index 97609cb..a60b437 100644 --- a/main.go +++ b/main.go @@ -59,7 +59,7 @@ func main() { &cli.BoolFlag{ Name: defs.OptionNoICMP, Usage: "Do not use ICMP ping. ICMP doesn't work well under Linux\n" + - "at this moment, so you might want to disable it", + "\tat this moment, so you might want to disable it", }, &cli.IntFlag{ Name: defs.OptionConcurrent, @@ -110,7 +110,7 @@ func main() { Name: defs.OptionJSON, Usage: "Suppress verbose output, only show basic information\n" + "\tin JSON format. Speeds listed in bit/s and not\n" + - "\t affected by --bytes", + "\taffected by --bytes", }, &cli.BoolFlag{ Name: defs.OptionList, @@ -141,7 +141,7 @@ func main() { }, &cli.IntFlag{ Name: defs.OptionTimeout, - Usage: "HTTP `TIMEOUT` in seconds", + Usage: "HTTP `TIMEOUT` in seconds.", Value: 15, }, &cli.IntFlag{