diff options
| author | JP Dillingham <jp@dillingham.me> | 2026-02-01 22:25:44 -0600 |
|---|---|---|
| committer | JP Dillingham <jp@dillingham.me> | 2026-02-01 22:25:44 -0600 |
| commit | 1f7799fd5b1d75ce4648de7e025793038539c1c7 (patch) | |
| tree | 3101dcda6e4f8f4aaef9c502a37112400b172f3f /src | |
| parent | b818f0389dbf78cf07254b1a0a7cf4f717dd9084 (diff) | |
| download | slskd-1f7799fd5b1d75ce4648de7e025793038539c1c7.tar.gz | |
add required and portforwarding vpn options
Diffstat (limited to 'src')
| -rw-r--r-- | src/slskd/Core/Options.cs | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/slskd/Core/Options.cs b/src/slskd/Core/Options.cs index 545dedac..10aaed3d 100644 --- a/src/slskd/Core/Options.cs +++ b/src/slskd/Core/Options.cs @@ -2316,6 +2316,16 @@ namespace slskd public bool Enabled { get; init; } = false; /// <summary> + /// Gets a value indicating whether a VPN connection is required before connecting to the Soulseek network. + /// </summary> + public bool Required { get; init; } = false; + + /// <summary> + /// Gets a value indicating whether the configured VPN supports port forwarding. + /// </summary> + public bool PortForwarding { get; init; } = false; + + /// <summary> /// Gets Gluetun options. /// </summary> public GluetunVpnOptions Gluetun { get; init; } = new GluetunVpnOptions(); @@ -2343,8 +2353,8 @@ namespace slskd /// <summary> /// Gets the Gluetun control server authentication method. /// </summary> - [Enum(typeof(GluetunClientAuthOptions), ignoreCase: true)] - public string Auth { get; init; } + [Enum(typeof(GluetunClientAuthenticationMethod), ignoreCase: true)] + public string Auth { get; init; } = GluetunClientAuthenticationMethod.None.ToString(); /// <summary> /// Gets the username used for basic auth. @@ -2365,7 +2375,7 @@ namespace slskd { var results = new List<ValidationResult>(); - if (string.Equals(Auth, GluetunClientAuthOptions.Basic.ToString(), StringComparison.OrdinalIgnoreCase)) + if (string.Equals(Auth, GluetunClientAuthenticationMethod.Basic.ToString(), StringComparison.OrdinalIgnoreCase)) { if (string.IsNullOrWhiteSpace(Username) || string.IsNullOrWhiteSpace(Password)) { @@ -2373,7 +2383,7 @@ namespace slskd } } - if (string.Equals(Auth, GluetunClientAuthOptions.ApiKey.ToString(), StringComparison.OrdinalIgnoreCase)) + if (string.Equals(Auth, GluetunClientAuthenticationMethod.ApiKey.ToString(), StringComparison.OrdinalIgnoreCase)) { if (string.IsNullOrWhiteSpace(ApiKey)) { |
