RequestAnalyzer 1.0.13
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package RequestAnalyzer --version 1.0.13
NuGet\Install-Package RequestAnalyzer -Version 1.0.13
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="RequestAnalyzer" Version="1.0.13" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="RequestAnalyzer" Version="1.0.13" />
<PackageReference Include="RequestAnalyzer" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add RequestAnalyzer --version 1.0.13
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: RequestAnalyzer, 1.0.13"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package RequestAnalyzer@1.0.13
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=RequestAnalyzer&version=1.0.13
#tool nuget:?package=RequestAnalyzer&version=1.0.13
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
RequestAnalyzer
A powerful .NET library for comprehensive HTTP request analysis with built-in security detection, device identification, and proxy chain analysis.
Features
- Comprehensive Request Analysis: Extract IP address, device type, browser information, and more
- Security Detection: VPN detection, suspicious request analysis with confidence scoring
- Bot Detection: Detect bots and automated traffic with confidence scores
- Proxy Chain Analysis: Detect and analyze proxy chains
- Device Detection: Automatic device type identification (Desktop, Mobile, Tablet)
- Correlation ID: Automatic correlation ID generation and discovery
- Easy Integration: Simple dependency injection integration
- Geo-Location: Country detection and Tor network identification
Installation
dotnet add package RequestAnalyzer
Quick Start
Basic Setup
using RequestAnalyzer;
var builder = WebApplication.CreateBuilder(args);
// Add RequestAnalyzer services
builder.Services.AddRequestAnalyzer();
var app = builder.Build();
app.Run();
Advanced Configuration
// Configure RequestAnalyzer with custom options
builder.Services.AddRequestAnalyzer(options =>
{
options.EnableVPNDetection = true;
options.EnableSuspiciousRequestDetection = true;
options.VPNConfidenceThreshold = 80;
options.SuspiciousRequestScoreThreshold = 70;
});
Usage
Inject and Use RequestAnalyzer
using RequestAnalyzer;
using Microsoft.AspNetCore.Mvc;
public class MyController : ControllerBase
{
private readonly RequestAnalyzer.RequestAnalyzer _requestAnalyzer;
public MyController(RequestAnalyzer.RequestAnalyzer requestAnalyzer)
{
_requestAnalyzer = requestAnalyzer;
}
[HttpGet]
public IActionResult Get()
{
// Access request analysis data
var clientIP = _requestAnalyzer.IP;
var deviceType = _requestAnalyzer.Device;
var isSuspicious = _requestAnalyzer.IsSuspiciousRequest;
var isUsingVPN = _requestAnalyzer.IsUsingVPN;
var correlationId = _requestAnalyzer.CorrelationId;
var browser = _requestAnalyzer.Browser;
return Ok(new {
IP = clientIP,
Device = deviceType,
IsSuspicious = isSuspicious,
IsUsingVPN = isUsingVPN,
CorrelationId = correlationId,
Browser = browser.BrowserName,
OperatingSystem = browser.OperatingSystem
});
}
}
Available Properties
Basic Information
Language(string): Detected language from request headersIP(string): Client IP address (automatically detects from best source)IsPrivateIP(bool?): Whether the IP is private/internalCorrelationId(string): Request correlation ID for tracingDevice(DeviceType): Device type (Unknown, Desktop, Mobile, Tablet)
Browser Information
Browser(BrowserInfo): Detailed browser and OS informationBrowser.BrowserName: Browser name (e.g., "Chrome", "Firefox")Browser.OperatingSystem: OS name (e.g., "Windows", "macOS")Browser.OperatingSystemVersion: OS version
Proxy Chain Analysis
ProxyChain(IPAddress[]): Array of proxies in the chainProxyCount(int): Number of proxies in the chainFirstProxy(IPAddress): First proxy in the chainLastProxy(IPAddress): Last proxy in the chainIsFromTrustedProxy(bool): Whether request is from trusted proxy
VPN Detection
IsUsingVPN(bool): Whether client is using VPNVPNConfidenceScore(int): Confidence score 0-100
Bot & Threat Detection
CloudflareCountryCode(string?): Client country code (T1=Tor, XX=Unknown)CloudflareRayId(string?): Unique request ID for support/debuggingCloudflareBotScore(int?): Bot detection score 0-99 (lower = more likely bot)CloudflareThreatScore(int?): Threat level 0-100 (higher = more threatening)
Security Analysis
IsSuspiciousRequest(bool): Whether request is suspiciousSuspiciousScore(int): Suspicious score 0-100SuspiciousReasons(string): Semicolon-separated list of reasons
Usage Examples
VPN Detection
public IActionResult MyAction(RequestAnalyzer analyzer)
{
// Block VPN users
if (analyzer.IsUsingVPN)
{
return Forbid("VPN usage detected");
}
// Check confidence level
if (analyzer.VPNConfidenceScore > 80)
{
_logger.LogWarning("High confidence VPN from {IP}", analyzer.IP);
}
return Ok();
}
Bot Detection
public IActionResult MyAction(RequestAnalyzer analyzer)
{
// Check bot score (when available)
if (analyzer.CloudflareBotScore.HasValue && analyzer.CloudflareBotScore < 30)
{
return Forbid("Bot detected");
}
// Check threat level
if (analyzer.CloudflareThreatScore > 50)
{
return Forbid("High threat level");
}
return Ok();
}
Tor Network Detection
public IActionResult MyAction(RequestAnalyzer analyzer)
{
// Block Tor traffic
if (analyzer.CloudflareCountryCode == "T1")
{
return Forbid("Tor network not allowed");
}
return Ok();
}
Suspicious Request Detection
public IActionResult MyAction(RequestAnalyzer analyzer)
{
if (analyzer.IsSuspiciousRequest)
{
_logger.LogWarning("Suspicious request from {IP}: {Reasons}",
analyzer.IP, analyzer.SuspiciousReasons);
return BadRequest("Suspicious activity detected");
}
return Ok();
}
Get Client IP
public IActionResult MyAction(RequestAnalyzer analyzer)
{
// Get client IP - automatically handles proxies and load balancers
string clientIp = analyzer.IP;
Console.WriteLine($"Client IP: {clientIp}");
return Ok();
}
Configuration Options
public class RequestAnalyzerOptions
{
public bool EnableVPNDetection { get; set; } = true;
public bool EnableSuspiciousRequestDetection { get; set; } = true;
public int VPNConfidenceThreshold { get; set; } = 70;
public int SuspiciousRequestScoreThreshold { get; set; } = 60;
}
Device Types
public enum DeviceType
{
Unknown = 0,
Desktop = 1,
Mobile = 2,
Tablet = 3
}
Support
For support, bug reports, feature requests, or any inquiries:
📧 Email: info@waelelazizy.com
We're here to help! Don't hesitate to reach out.
License
MIT
Requirements
- .NET 9.0 or higher
- ASP.NET Core
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net9.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.17 | 324 | 11/17/2025 |
| 1.0.16 | 227 | 11/4/2025 |
| 1.0.15 | 228 | 11/2/2025 |
| 1.0.14 | 163 | 11/1/2025 |
| 1.0.13 | 222 | 10/30/2025 |
| 1.0.12 | 210 | 10/30/2025 |
| 1.0.11 | 213 | 10/30/2025 |
| 1.0.10 | 218 | 10/30/2025 |
| 1.0.9 | 217 | 10/29/2025 |
| 1.0.8 | 212 | 10/29/2025 |
| 1.0.7 | 221 | 10/29/2025 |
| 1.0.6 | 231 | 11/2/2025 |
| 1.0.5 | 232 | 11/2/2025 |
| 1.0.4 | 217 | 11/2/2025 |
| 1.0.3 | 219 | 11/2/2025 |
| 1.0.0 | 215 | 10/29/2025 |
Initial release with comprehensive request analysis features