From f7156c08b159875cc3f8b4e59cb3babd8e475cca Mon Sep 17 00:00:00 2001 From: encode42 Date: Sun, 21 Sep 2025 04:28:34 -0400 Subject: Support the ability for the web interface to listen on a unix socket --- docs/config.md | 2 ++ 1 file changed, 2 insertions(+) (limited to 'docs') diff --git a/docs/config.md b/docs/config.md index 053deea3..6bbd01cf 100644 --- a/docs/config.md +++ b/docs/config.md @@ -802,6 +802,7 @@ Logging of HTTP requests is disabled by default. | Command-Line | Environment Variable | Description | | ----------------- | -------------------------- | ------------------------------------------------- | | `-l\|--http-port` | `SLSKD_HTTP_PORT` | The HTTP listen port | +| `--http-socket` | `SLSKD_HTTP_SOCKET` | The unix listen socket | | `--url-base` | `SLSKD_URL_BASE` | The base url for web requests | | `--content-path` | `SLSKD_CONTENT_PATH` | The path to static web content | | `--http-logging` | `SLSKD_HTTP_LOGGING` | Determines whether HTTP requests are to be logged | @@ -810,6 +811,7 @@ Logging of HTTP requests is disabled by default. ```yaml web: port: 5030 + socket: ~ url_base: / content_path: wwwroot logging: false -- cgit v1.2.3 From 16fdab0d63bae249f32f12112e0745dcd4bdf2eb Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Sun, 28 Sep 2025 14:43:42 -0500 Subject: tweak docs, assign validators for socket --- config/slskd.example.yml | 2 +- docs/config.md | 4 +++- src/slskd/Core/Options.cs | 20 +++++++++++--------- 3 files changed, 15 insertions(+), 11 deletions(-) (limited to 'docs') diff --git a/config/slskd.example.yml b/config/slskd.example.yml index 122ce4cf..ad3c6113 100644 --- a/config/slskd.example.yml +++ b/config/slskd.example.yml @@ -136,6 +136,7 @@ # - ^.{1,2}$ # web: # port: 5030 +# socket: ~ # https: # disabled: false # port: 5031 @@ -143,7 +144,6 @@ # certificate: # pfx: ~ # password: ~ -# socket: ~ # url_base: / # content_path: wwwroot # logging: false diff --git a/docs/config.md b/docs/config.md index 6bbd01cf..10f296f5 100644 --- a/docs/config.md +++ b/docs/config.md @@ -793,6 +793,8 @@ soulseek: The default HTTP listen port is 5030, but can be anything between 1 and 65535. +A [unix domain socket](https://en.wikipedia.org/wiki/Unix_domain_socket) can be used on both unix-like operating systems and Windows. The specified socket file path must be absolute, and must point to a file that does not exist (slskd will manage it automatically). + The URL base option allows the application to operate behind a reverse proxy. Setting a base of "slskd" would make the web UI accessible at `http://:/slskd`. The content path can be used to force the application to serve static web content from a location other than the default (`wwwroot`). The application is designed to decouple the Web UI from the rest of the application to be replaceable. @@ -802,7 +804,7 @@ Logging of HTTP requests is disabled by default. | Command-Line | Environment Variable | Description | | ----------------- | -------------------------- | ------------------------------------------------- | | `-l\|--http-port` | `SLSKD_HTTP_PORT` | The HTTP listen port | -| `--http-socket` | `SLSKD_HTTP_SOCKET` | The unix listen socket | +| `--http-socket` | `SLSKD_HTTP_SOCKET` | The HTTP listen unix domain socket (UDS) path | | `--url-base` | `SLSKD_URL_BASE` | The base url for web requests | | `--content-path` | `SLSKD_CONTENT_PATH` | The path to static web content | | `--http-logging` | `SLSKD_HTTP_LOGGING` | Determines whether HTTP requests are to be logged | diff --git a/src/slskd/Core/Options.cs b/src/slskd/Core/Options.cs index af8f3c2f..352d23e9 100644 --- a/src/slskd/Core/Options.cs +++ b/src/slskd/Core/Options.cs @@ -1807,21 +1807,23 @@ namespace slskd public int Port { get; init; } = 5030; /// - /// Gets HTTPS options. - /// - [Validate] - [RequiresRestart] - public HttpsOptions Https { get; init; } = new HttpsOptions(); - - /// - /// Gets the unix listen socket. + /// Gets the HTTP listen unix domain socket (UDS) path. /// [Argument(default, "http-socket")] [EnvironmentVariable("HTTP_SOCKET")] - [Description("unix listen socket for web UI")] + [Description("HTTP listen unix domain socket (UDS) path for web UI")] + [FileDoesNotExist] + [AbsoluteFilePath] [RequiresRestart] public string Socket { get; init; } + /// + /// Gets HTTPS options. + /// + [Validate] + [RequiresRestart] + public HttpsOptions Https { get; init; } = new HttpsOptions(); + /// /// Gets the base url for web requests. /// -- cgit v1.2.3 From e1a39de7d5e8127a2a3b52ecc5d09bb4961c40e0 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Sat, 11 Oct 2025 00:28:41 -0500 Subject: add transfer timeout setting --- config/slskd.example.yml | 1 + docs/config.md | 7 ++++++- src/slskd/Core/Options.cs | 9 +++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) (limited to 'docs') diff --git a/config/slskd.example.yml b/config/slskd.example.yml index ad3c6113..419c0c9f 100644 --- a/config/slskd.example.yml +++ b/config/slskd.example.yml @@ -207,6 +207,7 @@ # timeout: # connect: 10000 # inactivity: 15000 +# transfer: 30000 # buffer: # read: 16384 # write: 16384 diff --git a/docs/config.md b/docs/config.md index 10f296f5..5a4d3155 100644 --- a/docs/config.md +++ b/docs/config.md @@ -705,10 +705,14 @@ Higher connect timeout values will help ensure that operations (browse, download Inactivity timeouts help the application determine when a distributed parent connection has stopped sending data and when connections that have delivered search results (and are unlikely to be used further) from remaining open longer than needed. Reducing this timeout can help low spec systems if port exhaustion is a concern but may result in the application "hunting" for a distributed parent connection needlessly. +Transfer connections use their own timeout value; other Soulseek clients regulate transfer speed by controlling how often data is sent (e.g. send full speed for 5 seconds, send nothing for 25 seconds), +and as such transfers can easily time out due to inactivity if using a lower value. This setting must be at least 30 seconds. + | Command-Line | Environment Variable | Description | | --------------------------- | ------------------------------- | ------------------------------------------------ | | `--slsk-connection-timeout` | `SLSKD_SLSK_CONNECTION_TIMEOUT` | The connection timeout value, in milliseconds | | `--slsk-inactivity-timeout` | `SLSKD_SLSK_INACTIVITY_TIMEOUT` | The connection inactivity value, in milliseconds | +| `--slsk-transfer-timeout` | `SLSKD_SLSK_TRANSFER_TIMEOUT` | The transfer connection timeout value, in milliseconds | #### **YAML** ```yaml @@ -716,7 +720,8 @@ soulseek: connection: timeout: connect: 10000 - inactivity: 15000 + inactivity: 15000 + transfer: 30000 ``` ### Buffers diff --git a/src/slskd/Core/Options.cs b/src/slskd/Core/Options.cs index 352d23e9..38416ca2 100644 --- a/src/slskd/Core/Options.cs +++ b/src/slskd/Core/Options.cs @@ -1675,6 +1675,15 @@ namespace slskd [Description("connection inactivity timeout, in milliseconds")] [Range(1000, int.MaxValue)] public int Inactivity { get; init; } = 15000; + + /// + /// Gets the transfer connection timeout, in milliseconds. + /// + [Argument(default, "slsk-transfer-timeout")] + [EnvironmentVariable("SLSK_TRANSFER_TIMEOUT")] + [Description("transfer connection timeout, in milliseconds")] + [Range(30_000, int.MaxValue)] + public int Transfer { get; init; } = 60000; } /// -- cgit v1.2.3 From 8b6a9a3108a20b280f2891e47d30ecb931d9a435 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Sat, 22 Nov 2025 17:35:38 -0600 Subject: docs for unobserved exception flag --- docs/config.md | 1 + 1 file changed, 1 insertion(+) (limited to 'docs') diff --git a/docs/config.md b/docs/config.md index 5a4d3155..2646dd94 100644 --- a/docs/config.md +++ b/docs/config.md @@ -1266,6 +1266,7 @@ Several additional feature flags are provided to change the application's runtim | `--force-migrations` | `SLSKD_FORCE_MIGRATIONS` | Force database migrations to be applied 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 | +| `--log-unobserved-exceptions` | `SLSKD_LOG_UNOBSERVED_EXCEPTIONS` | Log unobserved Exceptions (caution: verbose) | | `--volatile` | `SLSKD_VOLATILE` | Use volatile data storage (all data will be lost at shutdown) | | `--case-sensitive-regex` | `SLSKD_CASE_SENSITIVE_REGEX` | User-defined regular expressions are case sensitive | | `--legacy-windows-tcp-keepalive` | `SLSKD_LEGACY_WINDOWS_TCP_KEEPALIVE` | Use a legacy TCP keepalive strategy for older Windows versions | -- cgit v1.2.3