List of client's IPs
To view list of IPs client has:
curl https://username:[email protected]/ip-listnpm install axios// ip_list.js
const axios = require('axios');
(async () => {
try {
const res = await axios.get('https://hosting.goproxies.com/ip-list', {
auth: { username: 'username', password: 'password' },
timeout: 10000
});
console.log('status:', res.status);
console.log('body:', res.data);
} catch (err) {
console.error('request error:', err.message);
if (err.response) console.error('status code:', err.response.status);
}
})();# ip_list.py
import requests
username = "username"
password = "password"
resp = requests.get("https://hosting.goproxies.com/ip-list", auth=(username, password), timeout=10)
print(resp.status_code)
print(resp.text)package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
req, _ := http.NewRequest("GET", "https://hosting.goproxies.com/ip-list", nil)
req.SetBasicAuth("username", "password")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
fmt.Println("request error:", err)
os.Exit(1)
}
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println("status:", resp.Status)
fmt.Println(string(body))
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.util.Base64;
public class IpList {
public static void main(String[] args) throws Exception {
String username = "username";
String password = "password";
String auth = Base64.getEncoder().encodeToString((username + ":" + password).getBytes());
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://hosting.goproxies.com/ip-list"))
.header("Authorization", "Basic " + auth)
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode());
System.out.println(response.body());
}
}# ip_list.rb
require 'net/http'
require 'uri'
uri = URI('https://hosting.goproxies.com/ip-list')
req = Net::HTTP::Get.new(uri)
req.basic_auth('username', 'password')
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
http.request(req)
end
puts res.code
puts res.body<?php
$ch = curl_init('https://hosting.goproxies.com/ip-list');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_USERPWD, 'username:password'); // basic auth
$response = curl_exec($ch);
if ($response === false) {
echo 'cURL error: ' . curl_error($ch) . PHP_EOL;
} else {
echo $response . PHP_EOL;
}
curl_close($ch);Last updated
Was this helpful?

