diff options
| author | JP Dillingham <jp@dillingham.me> | 2025-12-12 09:41:11 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-12-12 09:41:11 -0600 |
| commit | 999b903244233747e1a190fb88af372ea2c5f2ab (patch) | |
| tree | abed9e6394f6d49d32946bda902bb74ad0e896bb | |
| parent | 5f00d9c8545aa7c025c65ace89086ba0c621911a (diff) | |
| parent | 3ec80e2cec7ebfda86493d76f3af0932197a5c98 (diff) | |
| download | slskd-999b903244233747e1a190fb88af372ea2c5f2ab.tar.gz | |
Merge pull request #1586 from slskd/api-key
Remove single character cli args for envars and cert/secret gen
| -rw-r--r-- | docs/config.md | 8 | ||||
| -rw-r--r-- | src/slskd/Core/Options.cs | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/docs/config.md b/docs/config.md index 36f57e89..40f186f6 100644 --- a/docs/config.md +++ b/docs/config.md @@ -870,7 +870,7 @@ The JWT TTL option determines how long issued JWTs are valid, defaulting to 7 da API keys can be configured to allow for secure communication without requiring the caller to obtain a JWT by signing in with a username and password. Each key must be given a name and a key with a length between 16 and 255 characters (inclusive). Callers may then supply one of the configured keys in the `X-API-Key` header when making web requests. Remember that API keys are secrets, so keep them safe. -You can generate a random, 32 bit API key by starting the application with `-k` or `--generate-secret` at the command line. +You can generate a random, 32 bit API key by starting the application with `--generate-secret` at the command line. An optional comma separated list of [CIDRs](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) can be defined for each key, which will restrict usage of the key to callers with a remote IP address that falls within one of the defined CIDRs. The default CIDR list for each key is `0.0.0.0/0,::0`, which applies to any IP address (IPv4 or IPv6). @@ -1306,6 +1306,6 @@ The application can be run in "command mode", causing it to execute a command an | -------------------------------- | --------------------------------------------------- | | `-v\|--version` | Display the current application version | | `-h\|--help` | Display available command-line arguments | -| `-e\|--envars` | Display available environment variables | -| `-g\|--generate-cert` | Generate an X509 certificate and password for HTTPS | -| `-k\|--generate-secret <length>` | Generate a random secret of the specified length | +| `--envars` | Display available environment variables | +| `--generate-cert` | Generate an X509 certificate and password for HTTPS | +| `--generate-secret <length>` | Generate a random secret of the specified length | diff --git a/src/slskd/Core/Options.cs b/src/slskd/Core/Options.cs index 1739f5fb..cca7e01d 100644 --- a/src/slskd/Core/Options.cs +++ b/src/slskd/Core/Options.cs @@ -115,7 +115,7 @@ namespace slskd /// <summary> /// Gets a value indicating whether to display a list of configuration environment variables. /// </summary> - [Argument('e', "envars")] + [Argument(default, "envars")] [Description("display environment variables")] [Obsolete("Used only for documentation; see Program for actual implementation")] [JsonIgnore] @@ -125,7 +125,7 @@ namespace slskd /// <summary> /// Gets a value indicating whether to generate an X509 certificate and password. /// </summary> - [Argument('g', "generate-cert")] + [Argument(default, "generate-cert")] [Description("generate X509 certificate and password for HTTPS")] [Obsolete("Used only for documentation; see Program for actual implementation")] [JsonIgnore] @@ -135,7 +135,7 @@ namespace slskd /// <summary> /// Gets a value indicating whether to generate a random secret. /// </summary> - [Argument('k', "generate-secret")] + [Argument(default, "generate-secret")] [Description("generate random secret of the specified length")] [Obsolete("Used only for documentation; see Program for actual implementation")] [JsonIgnore] |
