diff options
| author | JP Dillingham <jp@dillingham.me> | 2026-02-14 17:55:58 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-02-14 17:55:58 -0600 |
| commit | 7f0312a1ea28e611a126ddb07117aa1072f1c36a (patch) | |
| tree | c78c5372d6bb23464480a509e3aee1789b5b78a1 /src/slskd/Core/State.cs | |
| parent | 8d30845f59d693aa6909c9fe8291493422dc10aa (diff) | |
| parent | 9f3b7217dd4554482c904becc101a4cf3074544e (diff) | |
| download | slskd-7f0312a1ea28e611a126ddb07117aa1072f1c36a.tar.gz | |
Merge pull request #1632 from slskd/gluetun
Add VPN integration and gluetun client
Diffstat (limited to 'src/slskd/Core/State.cs')
| -rw-r--r-- | src/slskd/Core/State.cs | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/slskd/Core/State.cs b/src/slskd/Core/State.cs index 4f7876de..cd742348 100644 --- a/src/slskd/Core/State.cs +++ b/src/slskd/Core/State.cs @@ -36,6 +36,7 @@ namespace slskd public bool PendingRestart { get; init; } public ServerState Server { get; init; } = new ServerState(); public ServerConnectionWatchdogState ConnectionWatchdog { get; init; } = new ServerConnectionWatchdogState(); + public VpnState Vpn { get; init; } = new VpnState(); public RelayState Relay { get; init; } = new RelayState(); public HealthState Health { get; init; } = new HealthState(); public UserState User { get; init; } = new UserState(); @@ -90,7 +91,17 @@ namespace slskd { public bool IsEnabled { get; init; } = false; public bool IsAttemptingConnection { get; init; } = false; - public DateTime? NextAttemptAt { get; init; } + public bool IsAwaitingVpn { get; init; } = false; + public DateTime? NextAttemptAt { get; init; } = null; + } + + public record VpnState + { + public bool IsReady { get; init; } = false; + public bool IsConnected { get; init; } = false; + public IPAddress PublicIPAddress { get; init; } = null; + public string Location { get; init; } = null; + public int? ForwardedPort { get; init; } = null; } public record RelayState |
