Want to route your request via a specific country's IP? It's simple with HomeIP. Just add the country flag to your authorization header.
This flag accepts the country's two-letter 3166-1 alpha-2 code, and it's case insensitive. So, whether you type 'DE' or 'de', you'll route through a German proxy.\
Examples:
Germany: Use the code DE or de.
United Kingdom: Opt for GB or gb.
Thailand: Specify with TH or th.
Check out the provided examples to see how you can seamlessly incorporate this in your requests.
To make a request to ip.homeip.io using a random IP address from Germany, you would use the country flag with the country code for Germany (DE):
package example;
import org.apache.http.HttpHost;
import org.apache.http.client.fluent.*;
public class Example {
public static void main(String[] args) throws Exception {
HttpHost entry = new HttpHost("pr.homeip.io", 7777);
String query = Executor.newInstance()
.auth(entry, "username=USERNAME+country=DE", "PASS")
.execute(Request.Get("http://ip.homeip.io").viaProxy(entry))
.returnContent().asString();
System.out.println(query);
}
}
using System;
using System.Net;
class Example
{
static void Main()
{
var client = new WebClient();
client.Proxy = new WebProxy("pr.homeip.io:7777");
client.Proxy.Credentials = new NetworkCredential("username=USERNAME+country=DE", "PASSWORD");
Console.WriteLine(client.DownloadString("https://ip.homeip.io"));
}
}
require 'uri'
require 'net/http'
uri = URI.parse('http://ip.homeip.io/')
proxy = Net::HTTP::Proxy('pr.homeip.io', 7777, 'username=USERNAME+country=DE', 'PASSWORD')
req = Net::HTTP::Get.new(uri.path)
result = proxy.start(uri.host,uri.port) do |http|
http.request(req)
end
puts result.body