aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2022-10-09 14:51:14 -0500
committerJP Dillingham <jp@dillingham.me>2022-10-09 14:51:14 -0500
commit991b6e1e29fb1bbd3906ddfde3910998f840b060 (patch)
tree1a1098f7a8a9650e8291d10bfcae67fb1809e6aa
parentbd57bf490ddfe05004de02f30657d1359adc2dcc (diff)
downloadslskd-991b6e1e29fb1bbd3906ddfde3910998f840b060.tar.gz
add DualNetworkMode flag
-rw-r--r--config/slskd.example.yml1
-rw-r--r--docs/config.md3
-rw-r--r--src/slskd/Core/Options.cs9
3 files changed, 12 insertions, 1 deletions
diff --git a/config/slskd.example.yml b/config/slskd.example.yml
index 7afeb5c8..9c5a7a0a 100644
--- a/config/slskd.example.yml
+++ b/config/slskd.example.yml
@@ -10,6 +10,7 @@
# force_share_scan: false
# no_version_check: false
# log_sql: false
+# dual_network_mode: false
# network:
# mode: controller
# # controller config is required when running in 'agent' mode
diff --git a/docs/config.md b/docs/config.md
index aa09ddec..ce6b9bc5 100644
--- a/docs/config.md
+++ b/docs/config.md
@@ -769,7 +769,7 @@ Several additional feature flags are provided to change the application's runtim
| Flag | Environment Variable | Description |
| -------------------- | -------------------------- | ---------------------------------------------------------------- |
| `-d\|--debug` | `SLSKD_DEBUG` | Run the application in debug mode. Produces verbose log output. |
-| `--experimental` | `SLSKD_EXPERIMENTAL` | Run the application in experimental mode. YMMV. |
+| `--experimental` | `SLSKD_EXPERIMENTAL` | Run the application in experimental mode. YMMV. |
| `-n\|--no-logo` | `SLSKD_NO_LOGO` | Don't show the application logo on startup |
| `-x\|--no-start` | `SLSKD_NO_START` | Bootstrap the application, but don't start |
| `--no-connect` | `SLSKD_NO_CONNECT` | Start the application, but don't connect to the server |
@@ -777,6 +777,7 @@ Several additional feature flags are provided to change the application's runtim
| `--force-share-scan` | `SLSKD_FORCE_SHARE_SCAN` | Force a scan of shared directories on startup |
| `--no-version-check` | `SLSKD_NO_VERSION_CHECK` | Don't perform a version check on startup |
| `--log-sql` | `SLSKD_LOG_SQL` | Log SQL queries generated by Entity Framework |
+| `--dual-network-mode`| `SLSKD_DUAL_NETWORK_MODE` | Run in both Agent and Controller network modes |
#### **YAML**
```yaml
diff --git a/src/slskd/Core/Options.cs b/src/slskd/Core/Options.cs
index cc155f5f..859e1379 100644
--- a/src/slskd/Core/Options.cs
+++ b/src/slskd/Core/Options.cs
@@ -362,6 +362,15 @@ namespace slskd
[Description("log SQL queries generated by Entity Framework")]
[RequiresRestart]
public bool LogSQL { get; init; } = false;
+
+ /// <summary>
+ /// Gets a value indicating whether to run in both controller and agent network modes.
+ /// </summary>
+ [Argument(default, "dual-network-mode")]
+ [EnvironmentVariable("DUAL_NETWORK_MODE")]
+ [Description("run in both controller and agent network modes")]
+ [RequiresRestart]
+ public bool DualNetworkMode { get; init; } = false;
}
/// <summary>