Sample Integrations
.NET (in C#)
Sample Integrations
.NET (in C#)
.NET integrations should connect to the Massive Network’s HTTP port 4080
because .NET doesn’t broadly support HTTPS proxies yet:
using System.Net;
class Demo {
static async Task Main(string[] args) {
string username = Uri.EscapeDataString("{PROXY_USERNAME}");
string password = "{API_Key}";
string url = "https://cloudflare.com/cdn-cgi/trace"; // Insert your target URL here
string proxy = "http://isp.joinmassive.com:4080";
HttpClientHandler handler = new() {
Proxy = new WebProxy(proxy),
DefaultProxyCredentials = new NetworkCredential(
username, password
)
};
HttpClient client = new(handler);
HttpResponseMessage response = await client.GetAsync(url);
Console.WriteLine(await response.Content.ReadAsStringAsync());
}
}