CodeLogic.NetUtils
4.4.2-preview.53
See the version list below for details.
dotnet add package CodeLogic.NetUtils --version 4.4.2-preview.53
NuGet\Install-Package CodeLogic.NetUtils -Version 4.4.2-preview.53
<PackageReference Include="CodeLogic.NetUtils" Version="4.4.2-preview.53" />
<PackageVersion Include="CodeLogic.NetUtils" Version="4.4.2-preview.53" />
<PackageReference Include="CodeLogic.NetUtils" />
paket add CodeLogic.NetUtils --version 4.4.2-preview.53
#r "nuget: CodeLogic.NetUtils, 4.4.2-preview.53"
#:package CodeLogic.NetUtils@4.4.2-preview.53
#addin nuget:?package=CodeLogic.NetUtils&version=4.4.2-preview.53&prerelease
#tool nuget:?package=CodeLogic.NetUtils&version=4.4.2-preview.53&prerelease
CodeLogic.NetUtils
DNSBL blacklist checking and IP geolocation services for CodeLogic applications, using MaxMind GeoIP2.
Install
dotnet add package CodeLogic.NetUtils
Quick Start
var netUtils = new NetUtilsLibrary();
// After library initialization via CodeLogic framework:
// Check if an IP is blacklisted
var result = await netUtils.Dnsbl.CheckAsync("203.0.113.1");
Console.WriteLine($"Listed: {result.IsListed}");
// Look up IP geolocation
if (netUtils.HasGeoIp)
{
var geo = netUtils.GeoIp.Lookup("203.0.113.1");
Console.WriteLine($"Country: {geo.Country}, City: {geo.City}");
}
Features
- DNSBL checking — query multiple blacklist services (IPv4 and IPv6) with parallel lookups
- IP geolocation — city-level lookups via MaxMind GeoLite2/GeoIP2 databases
- Auto-update — optionally download and refresh the GeoIP database on startup
- Configurable services — primary and fallback DNSBL providers per address family
Configuration
Config file: config.netutils.json
{
"Enabled": true,
"Dnsbl": {
"Enabled": true,
"Ipv4Services": ["zen.spamhaus.org", "dnsbl.sorbs.net"],
"Ipv4FallbackServices": ["b.barracudacentral.org"],
"Ipv6Services": ["zen.spamhaus.org", "dnsbl6.sorbs.net"],
"Ipv6FallbackServices": ["v6.b.barracudacentral.org"],
"TimeoutSeconds": 5,
"ParallelQueries": true,
"DetailedLogging": false
},
"GeoIp": {
"Enabled": true,
"DatabasePath": "",
"AutoUpdate": false,
"AccountId": 0,
"LicenseKey": "",
"DatabaseType": "GeoLite2-City",
"TimeoutSeconds": 30
}
}
Documentation
Full API docs: https://github.com/Media2A/CodeLogic.Libs
Requirements
- .NET 10.0+
- CodeLogic 3.x or 4.x
- MaxMind.GeoIP2 5.x
- A MaxMind GeoLite2 or GeoIP2 database file (
.mmdb)
License
MIT — see LICENSE
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. 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. |
-
net10.0
- CodeLogic (>= 3.2.0 && < 5.0.0)
- MaxMind.GeoIP2 (>= 5.4.1)
- SharpCompress (>= 0.48.1)
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 |
|---|---|---|
| 4.5.2 | 88 | 5/24/2026 |
| 4.5.1 | 107 | 5/24/2026 |
| 4.5.1-preview.56 | 80 | 5/24/2026 |
| 4.4.2-preview.53 | 44 | 5/24/2026 |
| 4.4.1 | 95 | 5/24/2026 |
| 4.0.5 | 97 | 5/15/2026 |
| 4.0.4 | 99 | 5/9/2026 |
| 4.0.3 | 98 | 5/9/2026 |
| 4.0.1 | 556 | 4/19/2026 |
| 3.3.2 | 513 | 4/18/2026 |
| 3.3.1 | 97 | 4/18/2026 |
| 3.3.0 | 91 | 4/18/2026 |
| 3.2.11 | 107 | 4/18/2026 |
| 3.2.10 | 102 | 4/18/2026 |
| 3.2.9 | 93 | 4/18/2026 |
| 3.2.8 | 90 | 4/18/2026 |
| 3.2.7 | 92 | 4/18/2026 |
| 3.2.6 | 96 | 4/18/2026 |
| 3.2.5 | 98 | 4/18/2026 |
| 3.2.4 | 92 | 4/17/2026 |
# CL.NetUtils — Changelog
All notable changes to **CodeLogic.NetUtils** are documented here. Versions follow
[Semantic Versioning](https://semver.org/).
## [4.0.4] — 2026-04-16
### Changed
- README + manifest refresh for the v4 baseline. No functional changes vs 4.0.3.
- `LibraryManifest.Version` now reads from assembly metadata.
## [4.0.2] — 2026-04-09
### Added
- `DnsblCheckRequest` overload that accepts a caller-supplied DNSBL service
list — useful when the calling app stores its own service registry instead
of relying on the bundled defaults.
### Changed
- Annotated NetUtils configuration with `[ConfigField]` for the admin UI surface.
- Aligned with the v4 baseline across all libraries.
## [4.0.0] — 2026-04-09
Major rewrite. Republished as v4.0.0 to reset the version line under the
unified v4 baseline. GeoIP, DNSBL, and IP/CIDR utilities.
### Notes
- Earlier history is retained in the
[git log](https://github.com/Media2A/CodeLogic.Libs/commits/main/CL.NetUtils).