Using IPs on Cloud

ExpressNodes’ Cloud Application IPs provide scalable, high-speed proxies for cloud-based tasks like automation, web scraping, or API integration. Below is a step-by-step guide to configure and use these proxies.

 


 

1. Accessing Your Proxy URLs

After provisioning your Cloud Application IPs, you’ll receive proxy URLs via email. Each IP includes two connection formats:

  • HTTP Proxy: http://username:password@ip:port

  • SOCKS5 Proxy: socks5://username:password@ip:port

Use these URLs in your scripts or tools to route traffic through your proxies.

 


 

2. Code Examples

 

Using Proxies with cURL

# Set the proxy URL as an environment variable
export HTTP_PROXY="http://username:password@ip:port"

# Make a request via the proxy
curl -x "$HTTP_PROXY" https://ipinfo.io

 

Using Proxies with PHP

<?php
function proxyRequest() {
    $proxy = getenv("HTTP_PROXY"); // Fetch proxy URL from environment variable
    $ch = curl_init("https://ipinfo.io/ip");
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_PROXY, $proxy); // Apply proxy
    $response = curl_exec($ch);
    curl_close($ch);
    return $response;
}

$response = proxyRequest();
print($response);
?>

 

Using Proxies with Ruby

require 'net/http'
require 'uri'

proxy_uri = URI.parse(ENV['HTTP_PROXY']) # Load proxy from environment variable
http = Net::HTTP::Proxy(proxy_uri.host, proxy_uri.port, proxy_uri.user, proxy_uri.password)
uri = URI.parse('https://ipinfo.io/ip') # Use HTTPS for security

response = http.get(uri)
puts "Your IP is: #{response.body.strip}"

 

Using Proxies with Python

import os
import requests

# Load proxy URL from environment variable (e.g., HTTP_PROXY)
proxies = {
    "http": os.getenv('HTTP_PROXY'),
    "https": os.getenv('HTTP_PROXY')  # Include HTTPS if needed
}

response = requests.get("https://ipinfo.io/ip", proxies=proxies)
print("Your IP is:", response.text.strip)

 


 

3. Best Practices

  • Error Handling: Add retry logic for connection timeouts (common in large-scale scraping).

  • Secure Credentials: Store proxy credentials in environment variables, not hardcoded in scripts.

 


 

4. Support

For assistance, contact ExpressNodes’ 24/7 premium support:
>> Email: hello [@] expressnodes.com
Or generate a ticket from clientarea.

 

Was this answer helpful?
Still need help?

Our support team is available 24/7 and replies fast.

Open a ticket

Get clean, reliable IPs for your next project

Pick a plan and start today, or tell us what you're building and we'll recommend the right setup.