Skip to content

Commit

Permalink
Remove the ability to auto port forward (jellyfin#13222)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bond-009 authored Jan 25, 2025
1 parent cc284af commit b318f33
Show file tree
Hide file tree
Showing 9 changed files with 7 additions and 200 deletions.
3 changes: 1 addition & 2 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
<PackageVersion Include="Microsoft.Extensions.Options" Version="9.0.1" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageVersion Include="MimeTypes" Version="2.5.2" />
<PackageVersion Include="Mono.Nat" Version="3.0.4" />
<PackageVersion Include="Moq" Version="4.18.4" />
<PackageVersion Include="NEbml" Version="0.11.0" />
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
Expand Down Expand Up @@ -88,4 +87,4 @@
<PackageVersion Include="Xunit.SkippableFact" Version="1.5.23" />
<PackageVersion Include="xunit" Version="2.9.3" />
</ItemGroup>
</Project>
</Project>
1 change: 0 additions & 1 deletion Jellyfin.Api/Controllers/StartupController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ public ActionResult SetRemoteAccess([FromBody, Required] StartupRemoteAccessDto
{
NetworkConfiguration settings = _config.GetNetworkConfiguration();
settings.EnableRemoteAccess = startupRemoteAccessDto.EnableRemoteAccess;
settings.EnableUPnP = startupRemoteAccessDto.EnableAutomaticPortMapping;
_config.SaveConfiguration(NetworkConfigurationStore.StoreKey, settings);
return NoContent();
}
Expand Down
2 changes: 2 additions & 0 deletions Jellyfin.Api/Models/StartupDtos/StartupRemoteAccessDto.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System;
using System.ComponentModel.DataAnnotations;

namespace Jellyfin.Api.Models.StartupDtos;
Expand All @@ -17,5 +18,6 @@ public class StartupRemoteAccessDto
/// Gets or sets a value indicating whether enable automatic port mapping.
/// </summary>
[Required]
[Obsolete("No longer supported")]
public bool EnableAutomaticPortMapping { get; set; }
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#pragma warning disable CS0618 // obsolete

using System;
using System.IO;
using System.Xml;
Expand Down
1 change: 0 additions & 1 deletion Jellyfin.Server/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ public void ConfigureServices(IServiceCollection services)

services.AddHostedService<RecordingsHost>();
services.AddHostedService<AutoDiscoveryHost>();
services.AddHostedService<PortForwardingHost>();
services.AddHostedService<NfoUserDataSaver>();
services.AddHostedService<LibraryChangedNotifier>();
services.AddHostedService<UserDataChangeNotifier>();
Expand Down
1 change: 1 addition & 0 deletions MediaBrowser.Common/Net/NetworkConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ public string BaseUrl
/// <summary>
/// Gets or sets a value indicating whether to enable automatic port forwarding.
/// </summary>
[Obsolete("No longer supported")]
public bool EnableUPnP { get; set; }

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion jellyfin.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
"**/jellyfin-web": true,
"**/obj": true
},
"formatFiles.excludePattern": "**/node_modules,**/.vscode,**/dist/**,**/.chrome,ThirdParty,RSSDP,Mono.Nat,unRaid,debian"
"formatFiles.excludePattern": "**/node_modules,**/.vscode,**/dist/**,**/.chrome,ThirdParty,unRaid,debian"
}
}
3 changes: 0 additions & 3 deletions src/Jellyfin.Networking/Jellyfin.Networking.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,4 @@
<ProjectReference Include="..\..\MediaBrowser.Controller\MediaBrowser.Controller.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Mono.Nat" />
</ItemGroup>
</Project>
192 changes: 0 additions & 192 deletions src/Jellyfin.Networking/PortForwardingHost.cs

This file was deleted.

0 comments on commit b318f33

Please sign in to comment.