.NET Standard library to help communicate with the IP Leak API.
IP Leak is a API service provided by AirVPN that allows the retrieval of information about a particular IP address, domain name etc.
ByteDev.AirVpn.IpLeak is hosted as a package on nuget.org. To install from the Package Manager Console in Visual Studio run:
Install-Package ByteDev.AirVpn.IpLeak
Further details can be found on the nuget page.
Releases follow semantic versioning.
Full details of the release notes can be viewed on GitHub.
The main class in the assembly is IpLeakClient
and has three public methods which each act against the IP Leak API:
GetIpDataAsync
GetDomainDataAsync
GetDnsDataAsync
// Retrieve data about a given IP address
const string ipAddress = "8.8.8.8";
IIpLeakClient client = new IpLeakClient(new HttpClient());
IpAddressResponse response = await client.GetIpDataAsync(ipAddress);
// response.CountryCode == "US"
// response.CountryName == "United States"
// response.ContinentCode == "NA"
// response.ContinentName == "North America"
// response.Latitude == 37.751
// response.Longitude = -97.822
// response.TimeZone == "America/Chicago"
// ...