VpnHood.Net.Toolkit
The shared toolkit of VpnHood's networking libraries: IP networks and ranges,
streams, logging with redaction, jobs, assets, timeout collections, JSON converters and assorted helpers. Every other
VpnHood.Net.* package builds on it, and it works on its own in any .NET app.
dotnet add package VpnHood.Net.Toolkit
What it holds
- Net:
IpAddressValue, an IP address as a value with no object on the heap, for code that runs per packet;IpNetwork,IpRangeandIpRangeOrderedListfor address sets and their lookups, byIPAddressor by value;IpEndPointValueandIPEndPointPairValueendpoint values;PortRange, and address and socket helpers. - Streams:
AsyncStreamand stream decorators, and stream helpers. - Logging:
VhLogger, the process's one log, whoseFormatmethods redact addresses and IDs in anonymous mode; console, trace, file and text loggers;LogService, which applies the user's log settings. - Jobs:
JobandJobRunner, functions run at an interval on a shared runner. - Assets:
IAssetProviderandIAsset, data files read by path from a folder, a zip, embedded resources or HTTP. - Collections:
TimeoutDictionary, whose values expire after a time of no use and are disposed. - Converters: JSON converters for addresses, endpoints, versions, time spans, arrays, and enums that fall back on a name they do not know.
- Sockets:
ISocketFactory, the seam a platform uses to make its sockets. - ApiClients, Trackers, Storages and Utils: an HTTP API client base with error mapping, Google Analytics 4 trackers, a storage of small text files, and helpers.
Packages
VpnHood.Net.Toolkit— this toolkit; it references no other VpnHood package
Requires .NET 10.