mirror of
https://github.com/Readarr/Readarr.git
synced 2026-03-05 13:20:32 -05:00
HTTPS certificate validation options
New: Enable HTTPS certificate validation by default New: Option to disable certificate validation for all or only local addresses
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
using System.Net;
|
||||
using FluentAssertions;
|
||||
using NUnit.Framework;
|
||||
using NzbDrone.Common.Extensions;
|
||||
|
||||
namespace NzbDrone.Common.Test.ExtensionTests
|
||||
{
|
||||
[TestFixture]
|
||||
public class IPAddressExtensionsFixture
|
||||
{
|
||||
[TestCase("::1")]
|
||||
[TestCase("10.64.5.1")]
|
||||
[TestCase("127.0.0.1")]
|
||||
[TestCase("172.16.0.1")]
|
||||
[TestCase("192.168.5.1")]
|
||||
public void should_return_true_for_local_ip_address(string ipAddress)
|
||||
{
|
||||
IPAddress.Parse(ipAddress).IsLocalAddress().Should().BeTrue();
|
||||
}
|
||||
|
||||
[TestCase("1.2.3.4")]
|
||||
[TestCase("172.55.0.1")]
|
||||
[TestCase("192.55.0.1")]
|
||||
public void should_return_false_for_public_ip_address(string ipAddress)
|
||||
{
|
||||
IPAddress.Parse(ipAddress).IsLocalAddress().Should().BeFalse();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user