Make a request to https://ip.oxylabs.io/location using the first ISP proxy in your list. Replace USERNAME and PASSWORD with your proxy user credentials.
Use ip.oxylabs.io/location to check the parameters of your IPs—this domain delivers information from four geolocation databases: MaxMind, IP2Location, DB-IP, and IPinfo.io. The parameters include IP address, provider, country, city, ZIP code, ASN, organization name, time zone, and meta (when disclosed by database).
Please note that you must follow the above example of building the username string to make requests successfully. Use the exact grammar and be aware that username and password values are case-sensitive.
using System.Net;
// .NET currently does not support HTTPS proxies
var proxy = new WebProxy {
Address = new Uri("http://isp.oxylabs.io:8001"),
Credentials = new NetworkCredential(
userName: "user-USERNAME",
password: "PASSWORD"
)
};
var httpClientHandler = new HttpClientHandler {Proxy = proxy};
using var client = new HttpClient(handler: httpClientHandler, disposeHandler: true);
var result = await client.GetStringAsync("https://ip.oxylabs.io/location");
Console.WriteLine(result);
The first IP in your proxy list will always use the8001 port. To make a request using a different proxy, you will need to find your proxy listand take port values from there.