[PR #14207] Add Configuration/UpdateTrustedNetwork api to change trusted network at runtime #13696

Open
opened 2025-12-22 10:00:53 +01:00 by backuprepo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/jellyfin/jellyfin/pull/14207
Author: @gnattu
Created: 6/2/2025
Status: 🔄 Open

Base: masterHead: update-trusted-network


📝 Commits (2)

  • 857b8cd Add Configuration/UpdateTrustedNetwork api to change trusted network at runtime
  • e465076 remove public on interface

📊 Changes

3 files changed (+59 additions, -6 deletions)

View changed files

📝 Jellyfin.Api/Controllers/ConfigurationController.cs (+29 -6)
Jellyfin.Api/Models/ConfigurationDtos/TrustedNetworkDto.cs (+24 -0)
📝 MediaBrowser.Common/Net/INetworkManager.cs (+6 -0)

📄 Description

Previously, updating trusted IPs (LocalNetworkSubnets, RemoteIPFilter, IsRemoteIPFilterBlacklist) required a server restart. This change introduces a new API endpoint that allows these network configuration fields to be updated at runtime, as their values are only read when needed. This improves flexibility for some special network environments.

Example:

curl 'http://localhost:8096/System/Configuration/UpdateTrustedNetwork' \
-X 'POST' \
-H 'Content-Type: application/json' \
-H 'Accept: */*' \
-H 'Authorization: MediaBrowser Client="Jellyfin Test", Device="Test", DeviceId="abcdefg", Version="10.11.0", Token="mytoken"' \
--data-raw '{"LocalNetworkSubnets":[],"RemoteIPFilter":[],"IsRemoteIPFilterBlacklist":false}'

Any of the LocalNetworkSubnets, RemoteIPFilter, IsRemoteIPFilterBlacklist can be null in the request, which means "no change".

Changes

Issues

Fixes #14189

An alternative approach to #14190


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/jellyfin/jellyfin/pull/14207 **Author:** [@gnattu](https://github.com/gnattu) **Created:** 6/2/2025 **Status:** 🔄 Open **Base:** `master` ← **Head:** `update-trusted-network` --- ### 📝 Commits (2) - [`857b8cd`](https://github.com/jellyfin/jellyfin/commit/857b8cd762c19f057bd2263bbbf4a8d1c5a0fdc8) Add Configuration/UpdateTrustedNetwork api to change trusted network at runtime - [`e465076`](https://github.com/jellyfin/jellyfin/commit/e465076f44575da224b526377acd8ebf88d8b8d6) remove public on interface ### 📊 Changes **3 files changed** (+59 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `Jellyfin.Api/Controllers/ConfigurationController.cs` (+29 -6) ➕ `Jellyfin.Api/Models/ConfigurationDtos/TrustedNetworkDto.cs` (+24 -0) 📝 `MediaBrowser.Common/Net/INetworkManager.cs` (+6 -0) </details> ### 📄 Description Previously, updating trusted IPs (LocalNetworkSubnets, RemoteIPFilter, IsRemoteIPFilterBlacklist) required a server restart. This change introduces a new API endpoint that allows these network configuration fields to be updated at runtime, as their values are only read when needed. This improves flexibility for some special network environments. Example: ``` curl 'http://localhost:8096/System/Configuration/UpdateTrustedNetwork' \ -X 'POST' \ -H 'Content-Type: application/json' \ -H 'Accept: */*' \ -H 'Authorization: MediaBrowser Client="Jellyfin Test", Device="Test", DeviceId="abcdefg", Version="10.11.0", Token="mytoken"' \ --data-raw '{"LocalNetworkSubnets":[],"RemoteIPFilter":[],"IsRemoteIPFilterBlacklist":false}' ``` Any of the LocalNetworkSubnets, RemoteIPFilter, IsRemoteIPFilterBlacklist can be null in the request, which means "no change". <!-- Ensure your title is short, descriptive, and in the imperative mood (Fix X, Change Y, instead of Fixed X, Changed Y). For a good inspiration of what to write in commit messages and PRs please review https://chris.beams.io/posts/git-commit/ and our documentation. --> **Changes** <!-- Describe your changes here in 1-5 sentences. --> **Issues** <!-- Tag any issues that this PR solves here. ex. Fixes # --> Fixes #14189 An alternative approach to #14190 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
backuprepo added the
pull-request
label 2025-12-22 10:00:53 +01:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: starred/jellyfin#13696
No description provided.