diff options
| author | JP Dillingham <jp@dillingham.me> | 2025-12-11 09:24:09 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-12-11 09:24:09 -0600 |
| commit | 5f00d9c8545aa7c025c65ace89086ba0c621911a (patch) | |
| tree | 4666052b0844b654133a040a57f47c55d323426e /src/slskd/Core/Options.cs | |
| parent | a55adb37e3c5bc2d249a6a8cb23873c0391f4580 (diff) | |
| parent | dccf744efc462775957879bb8b5e1df8732a21ac (diff) | |
| download | slskd-5f00d9c8545aa7c025c65ace89086ba0c621911a.tar.gz | |
Merge pull request #1585 from slskd/ip
Add the ability to bind HTTP and HTTPS to specific IP addresses
Diffstat (limited to 'src/slskd/Core/Options.cs')
| -rw-r--r-- | src/slskd/Core/Options.cs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/slskd/Core/Options.cs b/src/slskd/Core/Options.cs index 76dcd45c..1739f5fb 100644 --- a/src/slskd/Core/Options.cs +++ b/src/slskd/Core/Options.cs @@ -1839,6 +1839,16 @@ namespace slskd public int Port { get; init; } = 5030; /// <summary> + /// Gets the comma separated list of IPv4 or IPv6 IP addresses on which to listen for HTTP requests. + /// </summary> + [Argument(default, "http-ip-address")] + [EnvironmentVariable("HTTP_IP_ADDRESS")] + [Description("IP addresses on which to listen for HTTP requests")] + [IPAddress(allowCommaSeparatedValues: true)] + [RequiresRestart] + public string IpAddress { get; init; } + + /// <summary> /// Gets the HTTP listen unix domain socket (UDS) path. /// </summary> [Argument(default, "http-socket")] @@ -2040,6 +2050,16 @@ namespace slskd public int Port { get; init; } = 5031; /// <summary> + /// Gets the comma separated list of IPv4 or IPv6 IP addresses on which to listen for HTTPS requests. + /// </summary> + [Argument(default, "https-ip-address")] + [EnvironmentVariable("HTTPS_IP_ADDRESS")] + [Description("IP addresses on which to listen for HTTPS requests")] + [IPAddress(allowCommaSeparatedValues: true)] + [RequiresRestart] + public string IpAddress { get; init; } + + /// <summary> /// Gets a value indicating whether HTTP requests should be redirected to HTTPS. /// </summary> [Argument('f', "force-https")] |
