Skip to content

Commit 51753c5

Browse files
author
Matthew Bate
committed
Proxy Services WORKING!!!
1 parent 4882254 commit 51753c5

File tree

10 files changed

+1335
-355
lines changed

10 files changed

+1335
-355
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
using System.Net;
2+
using System.Threading.Tasks;
3+
4+
namespace BHD_ServerManager.Classes.SupportClasses
5+
{
6+
/// <summary>
7+
/// Result from a proxy check service.
8+
/// </summary>
9+
public class ProxyCheckResult
10+
{
11+
public bool Success { get; set; }
12+
public string? ErrorMessage { get; set; }
13+
public bool IsProxy { get; set; }
14+
public bool IsVpn { get; set; }
15+
public bool IsTor { get; set; }
16+
public int RiskScore { get; set; }
17+
public string? Provider { get; set; }
18+
public string? CountryCode { get; set; }
19+
public string? CountryName { get; set; }
20+
public string? City { get; set; }
21+
public string? Region { get; set; }
22+
23+
/// <summary>
24+
/// Helper property to check if any detection is positive.
25+
/// </summary>
26+
public bool IsDetected => IsProxy || IsVpn || IsTor;
27+
}
28+
29+
/// <summary>
30+
/// Interface for proxy check services.
31+
/// </summary>
32+
public interface IProxyCheckService
33+
{
34+
/// <summary>
35+
/// Check if an IP address is a proxy, VPN, or Tor.
36+
/// </summary>
37+
Task<ProxyCheckResult> CheckIPAsync(IPAddress ipAddress);
38+
39+
/// <summary>
40+
/// Get the service name.
41+
/// </summary>
42+
string ServiceName { get; }
43+
}
44+
}

0 commit comments

Comments
 (0)