Commit graph

314 commits

Author SHA1 Message Date
Bond-009 a4a3f598af
Merge pull request #5982 from Bond-009/nullable 2021-05-06 23:33:41 +02:00
BaronGreenback 2e98de9062
Code Clean up: Convert to null-coalescing operator ?? (#5845)
Co-authored-by: Cody Robibero <cody@robibe.ro>
Co-authored-by: Patrick Barron <18354464+barronpm@users.noreply.github.com>
2021-05-05 13:51:14 +02:00
Bond_009 91c2a57b28 Enable nullable reference types for MediaBrowser.Common 2021-05-05 12:57:01 +02:00
Bond_009 500c2e5224 Switch from HttpClientHandler to SocketsHttpHandler
SocketsHttpHandler is the default for .Net Core 2.1 and newer

Set RequestHeaderEncoding to UTF-8 by default
2021-04-19 22:37:24 +02:00
BaronGreenback bc1cc2d04a Remove unused using directives 2021-04-17 11:37:55 +01:00
BaronGreenback 0b774eac12
Enables the ability to bind to loopback address. (#5773) 2021-04-14 11:26:05 +02:00
Bond-009 1361ccd9ea
Merge pull request #5763 from Bond-009/ipobjects
Minor improvements to IPObjects
2021-04-11 23:31:03 +02:00
Joshua M. Boniface 19e7ebb279
Merge pull request #5416 from BaronGreenback/SubnetOverlappFix 2021-04-11 13:29:00 -04:00
Bond_009 be9cb7af2c Minor improvements to IPObjects 2021-04-10 22:42:09 +02:00
BaronGreenback 5d16d1f66d
Merge branch 'master' into RemoteAccessFix 2021-03-22 17:05:44 +00:00
BaronGreenback 4c7680e186 Merge remote-tracking branch 'upstream/master' into SubnetOverlappFix 2021-03-14 18:40:44 +00:00
BaronGreenback 6087831aa6 Fixed selection of correct interface ip 2021-03-14 17:30:25 +00:00
BaronGreenback b1f0c5eb49
Update NetworkExtensions.cs
changed description
2021-03-13 22:16:12 +00:00
Bond_009 a8ed753f6c FxCop -> Net Analyzers (part 2) 2021-03-13 22:33:28 +01:00
BaronGreenback 3fdf0de6e3 Fix remote access 2021-03-11 21:36:58 +00:00
BaronGreenback a031f7e410 Fix for multiple ip's in the same subnet per interface. 2021-03-09 00:07:21 +00:00
Claus Vium f8c9c37c29
Merge pull request #5181 from BaronGreenback/Fix_IPHostIP6Parsing 2021-02-27 22:52:24 +01:00
BaronGreenback 5074d67379 performance 2021-02-27 21:17:58 +00:00
Bond_009 eba859e33e Minor improvements 2021-02-21 02:49:52 +01:00
BaronGreenback 053063fd47 Fixed IP6 host parsing 2021-02-07 17:42:23 +00:00
BaronGreenback c76faa9708
Update IPNetAddress.cs
Corrected loopback subnet
2020-12-31 13:18:13 +00:00
BaronGreenback 50e375020a
[Fix] NetworkManager binding to [::] (#4549)
* Autodiscovery enable/disable patch

* Fixed [::] issue on bind. Altered test.

* Update UdpServerEntryPoint.cs

* Update Jellyfin.Networking.Tests.csproj

* Update Jellyfin.Networking.Tests.csproj

* Update INetworkManager.cs
2020-11-24 06:11:02 +01:00
Greenback 9a9b2bfb2e Updated to the latest 2020-11-21 00:34:09 +00:00
Greenback a3e47f3e4e Updated to latest Unstable. 2020-11-19 18:27:18 +00:00
crobibero 5fa4cce4cc Use ALL the decompression methods. 2020-11-17 06:57:25 -07:00
Greenback 978aa38f3b Updated PR1 code. 2020-11-16 19:37:38 +00:00
Greenback 9481fd0747 Upgraded to .Net5 2020-11-16 17:17:49 +00:00
Greenback 3e62557959 amended testing unit. 2020-11-04 20:30:06 +00:00
Greenback f06e4826c7 Fixed testing units 2020-10-31 19:16:28 +00:00
Greenback 83af636c61 Updated with new NetManager 2020-10-31 18:21:46 +00:00
Greenback a3f0843ac9 Updated NetworkManager to PR1 2020-10-08 19:00:30 +01:00
Jim Cartlidge bbe2400b59 Updating to NetCollection 1.03 2020-09-30 17:51:17 +01:00
Jim Cartlidge b44455ad0d Update based on PR1 changes. 2020-09-14 15:46:38 +01:00
Jim Cartlidge 9ef79d190b Large number of files 2020-09-12 16:41:37 +01:00
crobibero 39041019e7 Remove CacheMode, CompressionMethods, HttpResponseInfo 2020-09-01 07:53:57 -06:00
crobibero e1d0b430d9 Remove HttpRequestOptions 2020-09-01 07:51:55 -06:00
crobibero f498e1ee59 remove IHttpClient 🎉 2020-08-31 12:10:49 -06:00
crobibero 64a811d783 use named http clients 2020-08-31 08:47:38 -06:00
crobibero abb79bf810 remove OS and email from default UserAgent 2020-08-19 13:41:00 -06:00
crobibero f6b8cd4b46 Fix build 2020-08-19 07:09:07 -06:00
crobibero ac5c0866f3 P E R F O R M A N C E 2020-08-19 06:52:18 -06:00
crobibero 076e17f355 Add default http client 2020-08-19 06:31:45 -06:00
Cody Robibero 43221fc26b
Merge branch 'master' into SSDP 2020-06-20 15:33:13 -06:00
BaronGreenback 306f7b3c30
Update INetworkManager.cs 2020-06-11 23:10:13 +01:00
BaronGreenback 2cecde658b
Update INetworkManager.cs
Editting comments - adding periods
2020-06-11 22:58:29 +01:00
Bond-009 f404e915ee Enable StyleCop for MediaBrowser.Common 2020-06-03 13:04:45 +02:00
BaronGreenback d5a924772b
Update MediaBrowser.Common/Net/INetworkManager.cs
Co-authored-by: Patrick Barron <18354464+barronpm@users.noreply.github.com>
2020-05-17 20:44:35 +01:00
BaronGreenback 5e1be0d4f0
Update MediaBrowser.Common/Net/INetworkManager.cs
Co-authored-by: Patrick Barron <18354464+barronpm@users.noreply.github.com>
2020-05-17 20:44:19 +01:00
BaronGreenback 61e65d032e
Update MediaBrowser.Common/Net/INetworkManager.cs
Co-authored-by: Patrick Barron <18354464+barronpm@users.noreply.github.com>
2020-05-17 20:43:54 +01:00
BaronGreenback 8a69300bf5 Changes styles as suggested by @barronpm
Added addtional comments & source type as per intellisense suggestion
change code as per sonacloud
2020-04-29 12:24:01 +01:00
BaronGreenback ebd589aa86 Whilst fixing issues with SSDP on devices with multiple interfaces, i came across a design issue in the current code - namely interfaces without a gateway were ignored.
Fixing this required the removal of the code that attempted to detect virtual interfaces. Not wanting to remove functionality, but not able to keep the code in place, I implemented a work around solution (see 4 below).

Whilst in the area, I also fixed a few minor bugs i encountered (1, 5, 6 below) and stopped SSDP messages from going out on non-LAN interfaces (3)

All these changes are related.

Changes

1 IsInPrivateAddressSpace - improved subnet code checking
2 interfaces with no gateway were being excluded from SSDP blasts
3 filtered SSDP blasts from not LAN addresses as defined on the network page.
4 removed #986 mod - as this was part of the issue of #2986. Interfaces can be excluded from the LAN by putting the LAN address in brackets. eg. [10.1.1.1] will exclude an interface with ip address 10.1.1.1 from SSDP
5 fixed a problem where an invalid LAN address causing the SSDP to crash
6 corrected local link filter (FilterIPAddress) to filter on 169.254. addresses
2020-04-28 21:57:39 +01:00
BaronGreenback a3140f83c6 Revert "Whilst fixing issues with SSDP on devices with multiple interfaces, i came across a design issue in the current code - namely interfaces without a gateway were ignored."
This reverts commit 2aaecb8e14.
2020-04-28 21:51:49 +01:00
BaronGreenback 2aaecb8e14 Whilst fixing issues with SSDP on devices with multiple interfaces, i came across a design issue in the current code - namely interfaces without a gateway were ignored.
Fixing this required the removal of the code that attempted to detect virtual interfaces. Not wanting to remove functionality, but not able to keep the code in place, I implemented a work around solution (see 4 below).

Whilst in the area, I also fixed a few minor bugs i encountered (1, 5, 6 below) and stopped SSDP messages from going out on non-LAN interfaces (3)

All these changes are related.

Changes

1 IsInPrivateAddressSpace - improved subnet code checking
2 interfaces with no gateway were being excluded from SSDP blasts
3 filtered SSDP blasts from not LAN addresses as defined on the network page.
4 removed #986 mod - as this was part of the issue of #2986. Interfaces can be excluded from the LAN by putting the LAN address in brackets. eg. [10.1.1.1] will exclude an interface with ip address 10.1.1.1 from SSDP
5 fixed a problem where an invalid LAN address causing the SSDP to crash
6 corrected local link filter (FilterIPAddress) to filter on 169.254. addresses
2020-04-28 21:45:46 +01:00
Bond_009 2be394089e Enable Microsoft.CodeAnalysis.FxCopAnalyzers for Jellyfin.Common 2020-04-02 20:12:18 +02:00
Bond_009 4419587c2a Minor improvements 2020-04-01 15:30:53 +02:00
Bond_009 07cc4be6a7 Fix some warnings
* Add analyzers to MediaBrowser.XbmcMetadata
* Enable TreatWarningsAsErrors for MediaBrowser.XbmcMetadata
* Add analyzers to MediaBrowser.WebDashboard
* Enable TreatWarningsAsErrors for MediaBrowser.WebDashboard
* Disable SA1600 in favor of CS1591
2020-02-23 12:11:43 +01:00
Bond_009 2ef4ffd698 More warnings (removed) 2019-12-11 00:13:57 +01:00
Bond-009 6f45d95951 Minor improvements to network code 2019-11-28 17:46:06 +01:00
Bond_009 9d4ce82ab9 Enable TreatWarningsAsErrors for MediaBrowser.Common and Emby.Photos
Adds `#pragma warning disable CS1591` to all files in
MediaBrowser.Common containing undocumented members.
2019-10-09 17:14:15 +02:00
Bond-009 ee637e8fec Fix warnings, improve performance (#1665)
* Fix warnings, improve performance

`QueryResult.Items` is now a `IReadOnlyList` so we don't need to
allocate a new `Array` when we have a `List` (and `Items` shouldn't need to
be mutable anyway)

* Update Providers .csproj to latest C#

* Remove extra newline from DtoService.cs

* Remove extra newline from UserLibraryService.cs
2019-09-02 02:19:29 -04:00
Bond_009 5eaf5465a5 Check checksum for plugin downloads
* Compare the MD5 checksum when downloading plugins
* Reduced log spam due to http requests
* Removed 'GetTempFileResponse' function from HttpClientManager
* Fixed caching for HttpClientManager
2019-08-11 15:54:58 +02:00
Bond_009 2a58c643d2 Fix more warnings 2019-08-09 23:16:24 +02:00
Bond_009 ddd1a282ea Remove IpAddressInfo and IpEndPointInfo classes 2019-07-25 00:15:06 +02:00
Bond-009 e8028de4d7
Merge pull request #1560 from jellyfin/release-10.3.z
Backmerge for 10.3.7
2019-07-24 19:10:04 +02:00
Joshua M. Boniface cf2f5b2026
Merge pull request #1538 from joshuaboniface/epg
Try to fix XmlTvListingsProvider
2019-07-14 17:09:00 -04:00
Bond_009 b294b802a8 Try to fix XmlTvListingsProvider 2019-07-13 17:18:27 -04:00
Bond_009 b1bd062709 Properly set content type 2019-07-13 17:12:06 -04:00
Bond-009 82f041d050
Merge branch 'master' into release-10.3.z 2019-07-06 23:08:52 +02:00
Bond_009 5fc4ad6c4e Address comments 2019-07-06 20:04:45 +02:00
Bond_009 3603c64fa6 Use HttpResponseHeaders instead of a dictionary 2019-07-06 20:04:45 +02:00
Bond_009 d405a400aa Fixes issues with HttpClientManager 2019-07-06 20:04:42 +02:00
Claus Vium 7eb94e9674 Update MediaBrowser.Common/Net/IHttpClient.cs
Co-Authored-By: Bond-009 <bond.009@outlook.com>
2019-06-18 22:21:07 -04:00
Bond-009 0a5550b13d Remove more unused stuff 2019-06-18 22:20:34 -04:00
Bond-009 067200be83 Remove usage of depricated 'WebRequest'
Ref: https://docs.microsoft.com/en-us/dotnet/api/system.net.webrequest?view=netframework-4.7.2
2019-06-17 19:35:05 -04:00
Anthony Lavado d4a42a1680
Merge pull request #1080 from Bond-009/httpclient
Remove usage of deprecated 'WebRequest'
2019-06-14 09:19:56 -04:00
VooDooS ba12d96d23 Removed wrapping of HeaderNames fields 2019-04-12 15:25:18 +02:00
VooDooS 5f6ab836de Extend Microsoft.Net.Http.Headers.HeaderNames 2019-04-11 15:35:06 +02:00
Claus Vium be86ea2982
Update MediaBrowser.Common/Net/IHttpClient.cs
Co-Authored-By: Bond-009 <bond.009@outlook.com>
2019-03-27 16:34:56 +01:00
Bond-009 7f42dcc60f Remove more unused stuff 2019-03-08 20:32:14 +01:00
Bond-009 369785c184 Remove usage of depricated 'WebRequest'
Ref: https://docs.microsoft.com/en-us/dotnet/api/system.net.webrequest?view=netframework-4.7.2
2019-03-08 20:17:17 +01:00
Claus Vium 0abe57e930 Merge remote-tracking branch 'remotes/upstream/master' into kestrel_poc 2019-03-07 20:16:51 +01:00
Claus Vium 78742b8e4c Switch to HeaderNames instead of hardcoded strings (and other header related fixes) 2019-03-05 19:20:28 +01:00
Xu Fasheng cbd0e71c07 Send DLNA devices message to only the matched interface
This will be the right way for multiple interfaces, or the client will
receive all devices message with different IP addresses and could not
detect which one could access.

And provide one option DlnaOptions.SendOnlyMatchedHost to fallback to old
behaviour if this commit missed something.
2019-02-22 20:18:34 +08:00
Xu Fasheng cf4e64f430 Add option to toggle if ignore virtual interfaces
Some VPN like ZerotierOne owns IP address but no gateway, and there is no
good idea in NetworkManager.GetIPsDefault() to filter such virtual interfaces,
so just provide one option to let user decide it.
2019-02-22 20:13:17 +08:00
Erwin de Haan e867446437 ReSharper format: conform inline 'out' parameters. 2019-01-13 21:46:33 +01:00
Erwin de Haan 65bd052f3e ReSharper conform to 'var' settings 2019-01-13 21:37:13 +01:00
Erwin de Haan a36658f6f0 ReSharper Reformat: Properties to expression bodied form. 2019-01-13 21:31:14 +01:00
Erwin de Haan ba610b5094 Find+Sed BOM removal *.cs: Jellyfin.Server-MediaBrowser.Controller 2019-01-13 21:01:16 +01:00
Erwin de Haan 51ed47f4c4 EditorConfig reformat: Emby.XmlTv, Jellyfin.Server. MediaBrowser.Api, MediaBrowser.Common 2019-01-13 20:30:41 +01:00
Erwin de Haan 106d1d18ed Visual Studio Reformat: MediaBrowser.Common 2019-01-13 20:25:11 +01:00
hawken bd169e4fd4 remove trailing whitespace 2019-01-07 23:27:46 +00:00
Bond_009 a1b96a3135 Clean up HttpClientManager, LiveTvManager and InstallationManager 2019-01-03 18:24:26 +01:00
Andrew Rabert a86b71899e Add GPL modules 2018-12-27 18:27:57 -05:00
stefan 48facb797e Update to 3.5.2 and .net core 2.1 2018-09-12 19:26:21 +02:00
Luke Pulverenti 5207067811 fix live tv over dlna 2017-11-29 15:50:18 -05:00
Luke Pulverenti 2f758676d0 support sharing m3u tuner streams 2017-11-14 02:41:21 -05:00
Luke Pulverenti ca2e7a4195 deprecate localized guids config switch 2017-10-26 23:49:56 -04:00
Luke Pulverenti b54046a6de adjust header values 2017-10-22 19:36:22 -04:00
Luke Pulverenti c2361db772 separate encoding from content type values 2017-10-22 19:27:09 -04:00
Luke Pulverenti 060215143f improve httpclient resource disposal 2017-10-20 12:16:56 -04:00