From 8075cb4e99da4468d9474d1ad2e7668d96cd5224 Mon Sep 17 00:00:00 2001 From: Shadowghost Date: Wed, 20 Jul 2022 16:14:56 +0200 Subject: [PATCH] Cleanup and sort NetworkConfiguration --- .../Configuration/NetworkConfiguration.cs | 151 +++++++++--------- 1 file changed, 73 insertions(+), 78 deletions(-) diff --git a/Jellyfin.Networking/Configuration/NetworkConfiguration.cs b/Jellyfin.Networking/Configuration/NetworkConfiguration.cs index be8dc738d9..e9f6d597b4 100644 --- a/Jellyfin.Networking/Configuration/NetworkConfiguration.cs +++ b/Jellyfin.Networking/Configuration/NetworkConfiguration.cs @@ -21,21 +21,6 @@ namespace Jellyfin.Networking.Configuration private string _baseUrl = string.Empty; - /// - /// Gets or sets a value indicating whether the server should force connections over HTTPS. - /// - public bool RequireHttps { get; set; } - - /// - /// Gets or sets the filesystem path of an X.509 certificate to use for SSL. - /// - public string CertificatePath { get; set; } = string.Empty; - - /// - /// Gets or sets the password required to access the X.509 certificate data in the file specified by . - /// - public string CertificatePassword { get; set; } = string.Empty; - /// /// Gets or sets a value used to specify the URL prefix that your Jellyfin instance can be accessed at. /// @@ -70,16 +55,28 @@ namespace Jellyfin.Networking.Configuration } /// - /// Gets or sets the public HTTPS port. + /// Gets or sets a value indicating whether to use HTTPS. /// - /// The public HTTPS port. - public int PublicHttpsPort { get; set; } = DefaultHttpsPort; + /// + /// In order for HTTPS to be used, in addition to setting this to true, valid values must also be + /// provided for and . + /// + public bool EnableHttps { get; set; } /// - /// Gets or sets the HTTP server port number. + /// Gets or sets a value indicating whether the server should force connections over HTTPS. /// - /// The HTTP server port number. - public int HttpServerPortNumber { get; set; } = DefaultHttpPort; + public bool RequireHttps { get; set; } + + /// + /// Gets or sets the filesystem path of an X.509 certificate to use for SSL. + /// + public string CertificatePath { get; set; } = string.Empty; + + /// + /// Gets or sets the password required to access the X.509 certificate data in the file specified by . + /// + public string CertificatePassword { get; set; } = string.Empty; /// /// Gets or sets the HTTPS server port number. @@ -88,13 +85,16 @@ namespace Jellyfin.Networking.Configuration public int HttpsPortNumber { get; set; } = DefaultHttpsPort; /// - /// Gets or sets a value indicating whether to use HTTPS. + /// Gets or sets the public HTTPS port. /// - /// - /// In order for HTTPS to be used, in addition to setting this to true, valid values must also be - /// provided for and . - /// - public bool EnableHttps { get; set; } + /// The public HTTPS port. + public int PublicHttpsPort { get; set; } = DefaultHttpsPort; + + /// + /// Gets or sets the HTTP server port number. + /// + /// The HTTP server port number. + public int HttpServerPortNumber { get; set; } = DefaultHttpPort; /// /// Gets or sets the public mapped port. @@ -108,14 +108,19 @@ namespace Jellyfin.Networking.Configuration public bool UPnPCreateHttpPortMap { get; set; } /// - /// Gets or sets the UDPPortRange. + /// Gets or sets a value indicating whether Autodiscovery is enabled. /// - public string UDPPortRange { get; set; } = string.Empty; + public bool AutoDiscovery { get; set; } = true; /// - /// Gets or sets a value indicating whether IPv6 is enabled or not. + /// Gets or sets a value indicating whether Autodiscovery tracing is enabled. /// - public bool EnableIPV6 { get; set; } + public bool AutoDiscoveryTracing { get; set; } + + /// + /// Gets or sets a value indicating whether to enable automatic port forwarding. + /// + public bool EnableUPnP { get; set; } /// /// Gets or sets a value indicating whether IPv6 is enabled or not. @@ -123,17 +128,34 @@ namespace Jellyfin.Networking.Configuration public bool EnableIPV4 { get; set; } = true; /// - /// Gets or sets a value indicating whether detailed SSDP logs are sent to the console/log. - /// "Emby.Dlna": "Debug" must be set in logging.default.json for this property to have any effect. + /// Gets or sets a value indicating whether IPv6 is enabled or not. /// - public bool EnableSSDPTracing { get; set; } + public bool EnableIPV6 { get; set; } /// - /// Gets or sets the SSDPTracingFilter - /// Gets or sets a value indicating whether an IP address is to be used to filter the detailed ssdp logs that are being sent to the console/log. - /// If the setting "Emby.Dlna": "Debug" msut be set in logging.default.json for this property to work. + /// Gets or sets a value indicating whether access outside of the LAN is permitted. /// - public string SSDPTracingFilter { get; set; } = string.Empty; + public bool EnableRemoteAccess { get; set; } = true; + + /// + /// Gets or sets the subnets that are deemed to make up the LAN. + /// + public string[] LocalNetworkSubnets { get; set; } = Array.Empty(); + + /// + /// Gets or sets the interface addresses which Jellyfin will bind to. If empty, all interfaces will be used. + /// + public string[] LocalNetworkAddresses { get; set; } = Array.Empty(); + + /// + /// Gets or sets the known proxies. If the proxy is a network, it's added to the KnownNetworks. + /// + public string[] KnownProxies { get; set; } = Array.Empty(); + + /// + /// Gets or sets the UDPPortRange. + /// + public string UDPPortRange { get; set; } = string.Empty; /// /// Gets or sets the number of times SSDP UDP messages are sent. @@ -156,19 +178,9 @@ namespace Jellyfin.Networking.Configuration public string VirtualInterfaceNames { get; set; } = "veth"; /// - /// Gets or sets the time (in seconds) between the pings of SSDP gateway monitor. - /// - public int GatewayMonitorPeriod { get; set; } = 60; - - /// - /// Gets a value indicating whether multi-socket binding is available. - /// - public bool EnableMultiSocketBinding { get; } = true; - - /// - /// Gets or sets the ports that HDHomerun uses. + /// Gets or sets a value indicating whether the published server uri is based on information in HTTP requests. /// - public string HDHomerunPortRange { get; set; } = string.Empty; + public bool EnablePublishedServerUriByRequest { get; set; } = false; /// /// Gets or sets the PublishedServerUriBySubnet @@ -177,14 +189,14 @@ namespace Jellyfin.Networking.Configuration public string[] PublishedServerUriBySubnet { get; set; } = Array.Empty(); /// - /// Gets or sets a value indicating whether Autodiscovery tracing is enabled. + /// Gets a value indicating whether multi-socket binding is available. /// - public bool AutoDiscoveryTracing { get; set; } + public bool EnableMultiSocketBinding { get; } = true; /// - /// Gets or sets a value indicating whether Autodiscovery is enabled. + /// Gets or sets the ports that HDHomerun uses. /// - public bool AutoDiscovery { get; set; } = true; + public string HDHomerunPortRange { get; set; } = string.Empty; /// /// Gets or sets the filter for remote IP connectivity. Used in conjuntion with . @@ -197,33 +209,16 @@ namespace Jellyfin.Networking.Configuration public bool IsRemoteIPFilterBlacklist { get; set; } /// - /// Gets or sets a value indicating whether to enable automatic port forwarding. - /// - public bool EnableUPnP { get; set; } - - /// - /// Gets or sets a value indicating whether access outside of the LAN is permitted. - /// - public bool EnableRemoteAccess { get; set; } = true; - - /// - /// Gets or sets the subnets that are deemed to make up the LAN. - /// - public string[] LocalNetworkSubnets { get; set; } = Array.Empty(); - - /// - /// Gets or sets the interface addresses which Jellyfin will bind to. If empty, all interfaces will be used. - /// - public string[] LocalNetworkAddresses { get; set; } = Array.Empty(); - - /// - /// Gets or sets the known proxies. If the proxy is a network, it's added to the KnownNetworks. + /// Gets or sets a value indicating whether detailed SSDP logs are sent to the console/log. + /// "Emby.Dlna": "Debug" must be set in logging.default.json for this property to have any effect. /// - public string[] KnownProxies { get; set; } = Array.Empty(); + public bool EnableSSDPTracing { get; set; } /// - /// Gets or sets a value indicating whether the published server uri is based on information in HTTP requests. + /// Gets or sets the SSDPTracingFilter + /// Gets or sets a value indicating whether an IP address is to be used to filter the detailed ssdp logs that are being sent to the console/log. + /// If the setting "Emby.Dlna": "Debug" msut be set in logging.default.json for this property to work. /// - public bool EnablePublishedServerUriByRequest { get; set; } = false; + public string SSDPTracingFilter { get; set; } = string.Empty; } }