### Install golang.org/x/net/proxy Source: https://coldproxy.com/docs/go Install the necessary supplementary package for SOCKS5 proxy support in Go. ```shell go get golang.org/x/net/proxy ``` -------------------------------- ### Connect with Node.js (got + hpagent) Source: https://coldproxy.com/docs/how-to-connect This Node.js example uses 'got' and 'hpagent' to connect via the proxy. Install these packages using npm or yarn. ```javascript import got from 'got'; import { HttpProxyAgent } from 'hpagent'; const agent = new HttpProxyAgent({ proxy: 'http://USERNAME:PASSWORD@gw-2312.coldproxy.com:30000', }); const response = await got('https://api.vipv6proxy.com/api/checker/my-ip', { agent: { http: agent, https: agent } }); console.log(response.body); ``` -------------------------------- ### HTTP Proxy Setup with aiohttp Source: https://coldproxy.com/docs/python Set up aiohttp to use an HTTP proxy with basic authentication. This example uses a direct HTTP proxy URL and proxy_auth for cleaner credential handling. ```python import asyncio import aiohttp PROXY = "http://gw-2312.coldproxy.com:30000" AUTH = aiohttp.BasicAuth("USERNAME", "PASSWORD") async def main(): async with aiohttp.ClientSession() as session: async with session.get( "https://api.vipv6proxy.com/api/checker/my-ip", proxy=PROXY, proxy_auth=AUTH, ) as resp: print(await resp.json()) asyncio.run(main()) ``` -------------------------------- ### Python IP Authentication Example Source: https://coldproxy.com/docs/python This snippet shows how to set up the proxy URL and use it with the requests library to check your server's IP address. Ensure the 'requests' library is installed. ```python import requests proxy = "http://gw-2312.coldproxy.com:30000" proxies = {"http": proxy, "https": proxy} resp = requests.get("https://api.vipv6proxy.com/api/checker/my-ip", proxies=proxies, timeout=30) print(resp.json()) ``` -------------------------------- ### Install httpx with SOCKS support Source: https://coldproxy.com/docs/python Install the necessary extra for httpx to support SOCKS proxies. ```shell pip install "httpx[socks]" ``` -------------------------------- ### Install aiohttp-socks connector Source: https://coldproxy.com/docs/python Install the aiohttp-socks library to enable SOCKS proxy support for aiohttp. ```shell pip install aiohttp-socks ``` -------------------------------- ### Install selenium-wire with blinker Source: https://coldproxy.com/docs/selenium Install selenium-wire and pin blinker to version 1.7.0 to avoid compatibility issues. ```shell pip install selenium-wire blinker==1.7.0 ``` -------------------------------- ### Get Products Success Response Source: https://coldproxy.com/docs/reseller-api An example of a successful response when retrieving product information. It includes product details, pricing, and available options. ```json { "result": "success", "products": [ { "id": 101, "name": "Premium Residential Geo Target IPv4 (Unmetered)", "description": "Speed-tier residential plan with geo targeting.", "domain_required": false, "pricing": { "monthly": { "label": "Monthly", "base_price": 45.0, "min_config_price": 0.0, "total_price": 45.0, "setup": 0.0 } }, "options": [ { "name": "Speed", "key": "speed", "type": "dropdown", "values": [ { "value": "25 Mbps", "label": "25 Mbps", "pricing": { "monthly": 0.0 } }, { "value": "50 Mbps", "label": "50 Mbps", "pricing": { "monthly": 25.0 } } ] } ], "custom_fields": [] } ], "total": 1, "currency": { "code": "USD", "prefix": "$", "suffix": "" } } ``` -------------------------------- ### Call Customer Plan API Source: https://coldproxy.com/docs/reseller-api Example of how to call the Customer Plan API using the service ID and key obtained from GetServiceInfo. This is a GET request. ```http GET https://members.coldproxy.com/newsysapi.php?id=80417&key=EXAMPLE-SERVICE-KEY-DO-NOT-USE&a=info ``` -------------------------------- ### Get Products Request Source: https://coldproxy.com/docs/reseller-api Send a request to list available products, their pricing, and configuration options. This is essential for understanding what can be created. ```json { "action": "GetProducts", "username": "you@example.com", "api_key": "YOUR_API_KEY" } ``` -------------------------------- ### Install Node.js Proxy Agents Source: https://coldproxy.com/docs/nodejs Install necessary npm packages for different proxy protocols and client libraries. Choose the package based on your client and preferred protocol. ```shell # HTTP/HTTPS proxying for axios, got, and node-fetch npm install https-proxy-agent # got's preferred keep-alive proxy agent npm install hpagent # SOCKS5 (works with axios and node-fetch) npm install socks-proxy-agent # native fetch dispatcher (undici's ProxyAgent) npm install undici ``` -------------------------------- ### Sticky Proxy Username Example Source: https://coldproxy.com/docs/anti-detect-browsers Example of a username configuration for a sticky proxy, requiring both a session ID and a time duration tag. ```text user-country-us-session-481516-time-10m:PASSWORD ``` -------------------------------- ### Sticky Proxy Session Example (Shell) Source: https://coldproxy.com/docs/sticky-vs-rotating Shows how to configure a sticky proxy session using both '-session-' and '-time-' tags to maintain the same IP for a specified duration. ```Shell # Same US IP for the whole 30-minute window curl -x "http://user-country-us-session-481516-time-30m:PASSWORD@gw-2312.coldproxy.com:30000" \ https://api.vipv6proxy.com/api/checker/my-ip ``` -------------------------------- ### TestConnection using X-API-* headers Source: https://coldproxy.com/docs/reseller-api This example demonstrates how to authenticate with the ColdProxy Reseller API using custom X-API-* headers for username and key, and sending the action in the JSON body. ```APIDOC ## POST /modules/addons/coldproxy_product_reseller/api/ ### Description Tests the connection to the ColdProxy Reseller API using custom headers for authentication. ### Method POST ### Endpoint https://members.coldproxy.com/modules/addons/coldproxy_product_reseller/api/ ### Parameters #### Headers - **Content-Type** (string) - Required - `application/json` - **X-API-Username** (string) - Required - The username for API authentication. - **X-API-Key** (string) - Required - The API key for authentication. #### Request Body - **action** (string) - Required - The name of the action to perform. For this example, it is `TestConnection`. ### Request Example ```json { "action": "TestConnection" } ``` ### Response #### Success Response (200) - **result** (string) - Indicates success, e.g., `"success"`. #### Response Example ```json { "result": "success" } ``` ``` -------------------------------- ### Sticky Session for Multi-Step Flow (Python) Source: https://coldproxy.com/docs/sticky-vs-rotating Python example demonstrating how to hold a single IP address for a specified duration (1 hour) across multiple requests in a multi-step process. ```Python # Residential IPv4: hold one IP for 1 hour across a multi-step flow import requests session = requests.Session() proxy = "http://user-country-gb-session-729103-time-1h:PASSWORD@gw-2312.coldproxy.com:30000" session.proxies = {"http": proxy, "https": proxy} step1 = session.get("https://api.vipv6proxy.com/api/checker/my-ip", timeout=30).json()["ip"] step2 = session.get("https://api.vipv6proxy.com/api/checker/my-ip", timeout=30).json()["ip"] assert step1 == step2 # same IP for the duration ``` -------------------------------- ### Service Info Response Example Source: https://coldproxy.com/docs/customer-plan-api An example JSON response for the 'info' API call, showing status, server details, port configurations, geo-targeting capabilities, and limits. ```json { "status": "ok", "server_hostname": "gw-2312.coldproxy.com", "user_ports": "30000-34999", "ip_auth_ports": "30000-34999", "geo_targeting": ["country", "state", "city"], "max_quantity": 100000, "max_ip_auth": 50 } ``` -------------------------------- ### Rotating Proxy Username Example Source: https://coldproxy.com/docs/anti-detect-browsers Example of a username configuration for a rotating proxy, using only a country tag. ```text user-country-us:PASSWORD ``` -------------------------------- ### Chrome Setup: User:Pass Authentication Prompt Source: https://coldproxy.com/docs/anti-detect-browsers Configure Chrome to use a proxy with username and password authentication. Chrome will prompt for credentials when the proxy challenges. ```shell google-chrome \ --proxy-server="http://gw-2312.coldproxy.com:30000" \ --user-data-dir="/tmp/coldproxy-profile" # When prompted, enter: # Username: user-country-us-session-481516-time-10m # Password: PASSWORD ``` -------------------------------- ### TestConnection using HTTP Basic Auth Source: https://coldproxy.com/docs/reseller-api This example shows how to authenticate with the ColdProxy Reseller API using HTTP Basic Authentication, where the username and API key are combined and Base64 encoded. ```APIDOC ## POST /modules/addons/coldproxy_product_reseller/api/ with Basic Auth ### Description Tests the connection to the ColdProxy Reseller API using HTTP Basic Authentication. ### Method POST ### Endpoint https://members.coldproxy.com/modules/addons/coldproxy_product_reseller/api/ ### Parameters #### Headers - **Content-Type** (string) - Required - `application/json` - **Authorization** (string) - Required - HTTP Basic Authentication credentials in the format `username:api_key`, Base64 encoded. #### Request Body - **action** (string) - Required - The name of the action to perform. For this example, it is `TestConnection`. ### Request Example ```json { "action": "TestConnection" } ``` ### Response #### Success Response (200) - **result** (string) - Indicates success, e.g., `"success"`. #### Response Example ```json { "result": "success" } ``` ``` -------------------------------- ### Install PySocks for requests SOCKS5 Source: https://coldproxy.com/docs/python Install the necessary extra for the 'requests' library to support SOCKS5 proxies. This is required for using SOCKS5 proxy URLs. ```Shell pip install "requests[socks]" ``` -------------------------------- ### Rotating Proxy Example (Python) Source: https://coldproxy.com/docs/sticky-vs-rotating Demonstrates the default rotating proxy behavior where each request uses a new IP. Ideal for high-volume data collection to avoid blocks. ```Python import requests proxy = "http://user-country-us:PASSWORD@gw-2312.coldproxy.com:30000" proxies = {"http": proxy, "https": proxy} for _ in range(3): print(requests.get("https://api.vipv6proxy.com/api/checker/my-ip", proxies=proxies, timeout=30).json()["ip"]) # Three different exit IPs ``` -------------------------------- ### Configure HttpClient with IP Authentication Source: https://coldproxy.com/docs/csharp This example shows how to set up HttpClient with proxy settings using IP authentication, omitting the NetworkCredential. This is an alternative to username/password authentication. ```csharp // IP-authenticated — no NetworkCredential var handler = new HttpClientHandler { Proxy = new WebProxy("http://gw-2312.coldproxy.com:30000"), UseProxy = true }; using var client = new HttpClient(handler); ``` -------------------------------- ### IP Whitelisting Configuration Example Source: https://coldproxy.com/docs/anti-detect-browsers When using IP whitelisting, configure the anti-detect browser with the gateway host and port, leaving authentication fields blank. Your source IP must be whitelisted. ```text Host: gw-2312.coldproxy.com Port: 30000 # inside a US SuperPort range Auth: (none — your machine's IP is whitelisted) ``` -------------------------------- ### cURL SOCKS5 TCP and Remote DNS Examples Source: https://coldproxy.com/docs/protocols Demonstrates making requests using cURL with SOCKS5. The first example uses local DNS resolution, while the second ('socks5h') resolves DNS through the proxy, which is recommended for preventing DNS leaks. ```shell # TCP: --socks5 resolves DNS locally before connecting curl --socks5 "gw-2312.coldproxy.com:30000" \ -U "USERNAME:PASSWORD" \ "https://api.vipv6proxy.com/api/checker/my-ip" # Remote DNS: --socks5-hostname (socks5h) resolves DNS through the proxy curl --socks5-hostname "gw-2312.coldproxy.com:30000" \ -U "USERNAME:PASSWORD" \ "https://api.vipv6proxy.com/api/checker/my-ip" ``` -------------------------------- ### Create Service Request Source: https://coldproxy.com/docs/reseller-api Example JSON payload for creating a new service. Ensure all required fields like product_id and billing_cycle are included, along with any necessary options or custom fields. ```json { "action": "Create", "username": "you@example.com", "api_key": "YOUR_API_KEY", "product_id": 101, "billing_cycle": "monthly", "options": { "Speed": "25 Mbps" }, "custom_fields": {}, "idempotency_key": "order-2026-06-02-abc123" } ``` -------------------------------- ### Connect using SOCKS5h proxy with curl Source: https://coldproxy.com/docs/developer-faq This example demonstrates how to use curl with a SOCKS5h proxy, which allows the proxy to resolve DNS for you. Replace placeholders with your actual credentials and service ID. ```shell curl -x "socks5h://USERNAME:PASSWORD@gw-2312.coldproxy.com:30000" https://api.vipv6proxy.com/api/checker/my-ip ``` -------------------------------- ### Connect with Go Source: https://coldproxy.com/docs/how-to-connect This Go program demonstrates how to set up an HTTP client to use a proxy for making requests. It reads and prints the response body. ```go package main import ( "fmt" "io" "net/http" "net/url" ) func main() { proxyURL, _ := url.Parse("http://USERNAME:PASSWORD@gw-2312.coldproxy.com:30000") client := &http.Client{Transport: &http.Transport{Proxy: http.ProxyURL(proxyURL)}} resp, _ := client.Get("https://api.vipv6proxy.com/api/checker/my-ip") defer resp.Body.Close() body, _ := io.ReadAll(resp.Body) fmt.Println(string(body)) } ``` -------------------------------- ### Connect with Python (requests) Source: https://coldproxy.com/docs/how-to-connect This Python script uses the 'requests' library to make a GET request through the proxy. Ensure you have the 'requests' library installed. ```python import requests proxy = "http://USERNAME:PASSWORD@gw-2312.coldproxy.com:30000" proxies = {"http": proxy, "https": proxy} resp = requests.get("https://api.vipv6proxy.com/api/checker/my-ip", proxies=proxies, timeout=30) print(resp.status_code, resp.json()) ``` -------------------------------- ### Get Custom Fields Success Response Source: https://coldproxy.com/docs/reseller-api An example of a successful response when retrieving custom fields for a product. It details field names, types, requirements, and validation patterns. ```json { "result": "success", "product_id": 101, "product_name": "Premium Residential Geo Target IPv4 (Unmetered)", "custom_fields": [ { "name": "Label", "type": "text", "required": false, "description": "A label for your own reference.", "options": [], "regexpr": "" } ], "total": 1 } ``` -------------------------------- ### City-Targeted Rotating IPs in Chicago Source: https://coldproxy.com/docs/username-tag-scheme Omit -session- and -time- tags to get a fresh Chicago IP for each request while staying within the city. This example demonstrates rotating IPs for 3 requests. ```python import requests proxy = "http://user-country-us-city-chicago:PASSWORD@gw-2312.coldproxy.com:30000" proxies = {"http": proxy, "https": proxy} for _ in range(3): r = requests.get("https://api.vipv6proxy.com/api/checker/my-ip", proxies=proxies, timeout=30) print(r.json()["ip"], r.json().get("city")) # Each iteration prints a different Chicago-area exit IP ``` -------------------------------- ### PHP Guzzle Sticky Session Source: https://coldproxy.com/docs/php This example shows how to configure Guzzle in PHP to use a sticky US IP for 10 minutes by embedding proxy credentials and tags within the proxy URL. Ensure you have Guzzle installed via Composer. ```php get('https://api.vipv6proxy.com/api/checker/my-ip', [ 'proxy' => $proxyUrl, 'timeout' => 30, ]); echo $response->getBody() . PHP_EOL; ?> ``` -------------------------------- ### Configure OkHttp with Proxy and Authentication Source: https://coldproxy.com/docs/java Use this snippet to set up an OkHttp client with a specific proxy address and a proxy authenticator for username/password credentials. This handles 407 challenges by attaching a Proxy-Authorization header. ```Java import java.net.InetSocketAddress; import java.net.Proxy; import okhttp3.Credentials; import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.Response; public class ColdProxyOkHttp { public static void main(String[] args) throws Exception { String user = "USERNAME"; String pass = "PASSWORD"; Proxy proxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress("gw-2312.coldproxy.com", 30000)); OkHttpClient client = new OkHttpClient.Builder() .proxy(proxy) .proxyAuthenticator((route, response) -> { if (response.request().header("Proxy-Authorization") != null) { return null; // already failed with these credentials: give up } String credential = Credentials.basic(user, pass); return response.request().newBuilder() .header("Proxy-Authorization", credential) .build(); }) .build(); Request request = new Request.Builder() .url("https://api.vipv6proxy.com/api/checker/my-ip") .build(); try (Response response = client.newCall(request).execute()) { System.out.println(response.body().string()); } } } ``` -------------------------------- ### Per-Context Proxies for Rotation (Python) Source: https://coldproxy.com/docs/playwright Demonstrates setting up separate browser contexts with rotating IP addresses for each context. Each context will use a new IP per request. ```Python from playwright.sync_api import sync_playwright with sync_playwright() as p: browser = p.chromium.launch() ctx_a = browser.new_context(proxy={ "server": "http://gw-2312.coldproxy.com:30000", "username": "USERNAME", # rotating: new IP per request "password": "PASSWORD", }) # The exit is controlled by the username tags, not the port: this context # holds one sticky US IP while ctx_a keeps rotating. ctx_b = browser.new_context(proxy={ "server": "http://gw-2312.coldproxy.com:30000", "username": "user-country-us-session-481516-time-10m", "password": "PASSWORD", }) for ctx in (ctx_a, ctx_b): page = ctx.new_page() page.goto("https://api.vipv6proxy.com/api/checker/my-ip") print(page.text_content("body")) browser.close() ``` -------------------------------- ### httpx HTTP Proxy Setup Source: https://coldproxy.com/docs/python Configure the 'httpx' client to use a single HTTP proxy for all traffic by passing the proxy URL to the 'proxy' argument during client initialization. This is the recommended method for simple proxy configurations in httpx. ```Python import httpx proxy = "http://USERNAME:PASSWORD@gw-2312.coldproxy.com:30000" with httpx.Client(proxy=proxy, timeout=30) as client: resp = client.get("https://api.vipv6proxy.com/api/checker/my-ip") print(resp.json()) ``` -------------------------------- ### Gateway Hostname Example Source: https://coldproxy.com/docs/how-to-connect This is an example of a gateway hostname for a specific service ID. The actual service ID will be displayed in your client area. ```text gw-2312.coldproxy.com ``` -------------------------------- ### IP-Authentication with SuperPorts Source: https://coldproxy.com/docs/geo-targeting Example for IP-authenticated users using SuperPorts. This example targets a US proxy via a specific port without username tags. ```shell # IP-auth + a SuperPort range pinned to US: no username tags needed. # Use the IP:PORT shown in your client area (e.g. 203.0.113.10:30000). curl -x "http://203.0.113.10:30000" https://api.vipv6proxy.com/api/checker/my-ip ``` -------------------------------- ### GetProducts Source: https://coldproxy.com/docs/reseller-api List resellable products with their pricing and configuration options. ```APIDOC ## GetProducts ### Description List resellable products with pricing and options. ### Method POST ### Endpoint /api/v1/reseller ### Parameters #### Request Body - **action** (string) - Required - The action to perform, which is `GetProducts`. - **api_key** (string) - Required - Your reseller API key. - **username** (string) - Required - Your reseller username. ### Request Example { "action": "GetProducts", "api_key": "your_api_key", "username": "your_username" } ### Response #### Success Response (200) - **products** (array) - An array of product objects. - **id** (string) - The unique identifier for the product. - **name** (string) - The name of the product. - **price** (number) - The price of the product. - **options** (object) - Configuration options for the product. #### Response Example { "products": [ { "id": "proxy_residential", "name": "Residential Proxy", "price": 10.00, "options": { "bandwidth_gb": { "type": "integer", "required": true, "description": "Bandwidth in GB" } } } ] } ``` -------------------------------- ### Reseller API Error Response Example Source: https://coldproxy.com/docs/common-errors This is an example of a typical error response from the Reseller API. It includes a result status, an error message, and a specific error code that can help identify the issue. ```json { "result": "error", "message": "Your reseller group is not permitted to use this action.", "code": "PERMISSION_DENIED" } ``` -------------------------------- ### Go HTTP Client with Rotating and Sticky Sessions Source: https://coldproxy.com/docs/go Create an http.Client configured for either rotating IP addresses (default) or sticky IP sessions by adjusting the username tag in the proxy URL. Sticky sessions require both a session and a time tag. ```go package main import ( "net/http" "net/url" ) const ( host = "gw-2312.coldproxy.com:30000" pass = "PASSWORD" ) func proxyClient(username string) *http.Client { u := &url.URL{ Scheme: "http", User: url.UserPassword(username, pass), Host: host, } return &http.Client{ Transport: &http.Transport{Proxy: http.ProxyURL(u)}, } } func main() { // Rotating: US exit, new IP per request rotating := proxyClient("user-country-us") // Sticky: US exit, same IP held for 10 minutes (session + time together) sticky := proxyClient("user-country-us-session-481516-time-10m") _ = rotating _ = sticky } ``` -------------------------------- ### Firefox Proxy Credentials Source: https://coldproxy.com/docs/anti-detect-browsers Example of username and password format for Firefox proxy authentication. ```text Username: user-country-us-session-481516-time-10m Password: PASSWORD ``` -------------------------------- ### Username with Geo-targeting Tags Source: https://coldproxy.com/docs/geo-targeting Example of a username with stacked geo-targeting tags for country, state, and city. ```plaintext user-country-us-state-california-city-losangeles:PASSWORD ``` -------------------------------- ### Per-Context Proxies for Rotation (JavaScript) Source: https://coldproxy.com/docs/playwright Illustrates setting up distinct browser contexts with rotating IP addresses in JavaScript. Each context is configured for independent IP rotation. ```JavaScript const { chromium } = require('playwright'); (async () => { const browser = await chromium.launch(); const ctxA = await browser.newContext({ proxy: { server: 'http://gw-2312.coldproxy.com:30000', username: 'USERNAME', password: 'PASSWORD' }, }); // Username tags (not the port) control the exit: ctxB holds a sticky US IP. const ctxB = await browser.newContext({ proxy: { server: 'http://gw-2312.coldproxy.com:30000', username: 'user-country-us-session-481516-time-10m', password: 'PASSWORD' }, }); for (const ctx of [ctxA, ctxB]) { const page = await ctx.newPage(); await page.goto('https://api.vipv6proxy.com/api/checker/my-ip'); console.log(await page.textContent('body')); } await browser.close(); })(); ``` -------------------------------- ### Target Proxy by ISP Source: https://coldproxy.com/docs/geo-targeting Example of targeting a proxy through a specific ISP (Comcast) using the 'isp-comcast' tag. ```shell curl -x "http://user-country-us-isp-comcast:PASSWORD@gw-2312.coldproxy.com:30000" https://api.vipv6proxy.com/api/checker/my-ip ``` -------------------------------- ### Target Proxy by Country (Germany) Source: https://coldproxy.com/docs/geo-targeting Example of targeting a proxy located in Germany using the 'country-de' tag. ```shell # Germany exit curl -x "http://user-country-de:PASSWORD@gw-2312.coldproxy.com:30000" https://api.vipv6proxy.com/api/checker/my-ip ``` -------------------------------- ### Get Orders Success Response Source: https://coldproxy.com/docs/reseller-api Illustrative success response containing a list of services and pagination details. ```json { "result": "success", "orders": [ { "order_id": 50231, "service_id": 80417, "product_id": 101, "product_name": "Premium Residential Geo Target IPv4 (Unmetered)", "domain": "", "status": "Active", "billing_cycle": "Monthly", "amount": 45.0, "registration_date": "2026-06-02", "next_due_date": "2026-07-02", "terminated_on": null, "created_at": "2026-06-02 12:00:00", "created_via_api": true } ], "pagination": { "page": 1, "limit": 50, "total": 1, "total_pages": 1, "has_more": false } } ``` -------------------------------- ### Target Proxy by ASN Source: https://coldproxy.com/docs/geo-targeting Example of targeting a proxy by Autonomous System Number (7922) using the 'asn-7922' tag. ```shell curl -x "http://user-country-us-asn-7922:PASSWORD@gw-2312.coldproxy.com:30000" https://api.vipv6proxy.com/api/checker/my-ip ``` -------------------------------- ### Python Example: Deterministic IP Mapping per Identity Source: https://coldproxy.com/docs/ip-pinning-identifier This Python script demonstrates how each unique identity string deterministically maps to a single stable exit IP. Running the script multiple times with the same identity will yield the same IP address, while different identities will resolve to different IPs. ```python import requests def proxy_for(identity: str) -> dict: # Each identity deterministically maps to one stable exit IP user = f"user-country-us-identifier-{identity}" p = f"http://{user}:PASSWORD@gw-2312.coldproxy.com:30000" return {"http": p, "https": p} for identity in ["worker_a", "worker_b", "worker_a"]: ip = requests.get("https://api.vipv6proxy.com/api/checker/my-ip", proxies=proxy_for(identity), timeout=30).json()["ip"] print(identity, ip) # worker_a prints the same IP on both occurrences; worker_b differs ``` -------------------------------- ### Get Geo Data Source: https://coldproxy.com/docs/customer-plan-api Retrieves geo-targeting dimensions available for the service. These can be used in proxy generation or other service configurations. ```APIDOC ## GET /geo_data ### Description Retrieves the geo dimensions that can be targeted. The returned tokens can be used in geo parameters for proxy generation, username tags, or SuperPort rules. ### Method GET ### Endpoint /geo_data ### Parameters #### Query Parameters - **a** (string) - Required - The specific geo data endpoint: `countries`, `states`, `cities`, `isps`. - **country** (string) - Optional - Filters results by country code (e.g., `US`). Required for `states`, `cities`, `isps`. - **state** (string) - Optional - Filters results by state code. Required for `cities`, `isps`. - **city** (string) - Optional - Filters results by city name. Required for `isps`. ### Request Example ``` ?a=countries ``` ``` ?a=states&country=US ``` ``` ?a=cities&country=US&state=CA ``` ``` ?a=isps&country=US&state=CA&city=los-angeles ``` ### Response #### Success Response (200) - **countries**: Returns code/label pairs for countries. - **states**: Returns code/label pairs for states within a specified country. - **cities**: Returns code/label pairs for cities within a specified country and state. - **isps**: Returns ISP information within a specified country, state, and city. If no providers are listed, returns a plain `OK`. *Note: Geo data is only available for dimensions enabled on your plan.* ``` -------------------------------- ### Test Connection using X-API-* Headers Source: https://coldproxy.com/docs/reseller-api Send credentials as request headers for authentication. The body contains the action and parameters. ```shell curl -X POST "https://members.coldproxy.com/modules/addons/coldproxy_product_reseller/api/" \ -H "Content-Type: application/json" \ -H "X-API-Username: you@example.com" \ -H "X-API-Key: YOUR_32_CHAR_OR_LONGER_API_KEY" \ -d '{ "action": "TestConnection" }' ``` -------------------------------- ### JDK HttpClient Proxy Configuration (Java 11+) Source: https://coldproxy.com/docs/java Configure a proxy for Java's built-in HttpClient. This example shows how to set the proxy host and port, and provide authentication credentials. Ensure to set system properties to enable basic proxy authentication for HTTPS tunnels. ```Java import java.net.InetSocketAddress; import java.net.ProxySelector; import java.net.Authenticator; import java.net.PasswordAuthentication; import java.net.URI; import java.net.http.HttpClient; import java.net.http.HttpRequest; import java.net.http.HttpResponse; public class ColdProxyExample { public static void main(String[] args) throws Exception { // Required for Basic proxy auth over HTTPS tunnels (see WARNING below) System.setProperty("jdk.http.auth.tunneling.disabledSchemes", ""); System.setProperty("jdk.http.auth.proxying.disabledSchemes", ""); String user = "USERNAME"; String pass = "PASSWORD"; HttpClient client = HttpClient.newBuilder() .proxy(ProxySelector.of( new InetSocketAddress("gw-2312.coldproxy.com", 30000))) .authenticator(new Authenticator() { @Override protected PasswordAuthentication getPasswordAuthentication() { if (getRequestorType() == RequestorType.PROXY) { return new PasswordAuthentication(user, pass.toCharArray()); } return null; } }) .build(); HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://api.vipv6proxy.com/api/checker/my-ip")) .build(); HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString()); System.out.println(response.body()); // JSON: {"ip": "...", "version": ..., ...} } } ``` -------------------------------- ### Suspend a Service Source: https://coldproxy.com/docs/reseller-api Use this to suspend an active service, for example, when a customer's subscription lapses. An optional reason can be provided. ```json { "action": "Suspend", "username": "you@example.com", "api_key": "YOUR_API_KEY", "service_id": 80417, "reason": "Customer subscription unpaid" } ``` -------------------------------- ### Password Rotation Response Source: https://coldproxy.com/docs/customer-plan-api Example JSON response after a successful password rotation, confirming the change and providing the new password. ```json { "status": "ok", "message": "Password regenerated successfully.", "password": "newSecretPass456" } ``` -------------------------------- ### Bandwidth Options and Purchase Source: https://coldproxy.com/docs/customer-plan-api Lists available bandwidth packs and allows purchasing them using account credit for GB plans. ```APIDOC ## Bandwidth Options and Purchase (GB Plans) Lists the bandwidth packs you can buy and purchases one using account credit. ### Methods - **bandwidthoptions** - Description: Lists the available bandwidth packs with current prices. - Parameters: None - **buybandwidth** - Description: Purchases a bandwidth pack using account credit. - Parameters: - `bandwidth` (string) - Required - The amount of bandwidth in GB to purchase. ### Notes - Each `buybandwidth` call is a separate, independent GB allocation. - The purchase is processed instantly from your account credit. ### Example Usage ``` ?a=bandwidthoptions ?a=buybandwidth&bandwidth=50 ``` ``` -------------------------------- ### Proxy Generation Response Source: https://coldproxy.com/docs/customer-plan-api Example JSON response when generating proxy strings, containing a list of usable proxy URLs. ```json { "status": "ok", "proxies_list": [ "http://gw-2312.coldproxy.com:30000:USERNAME:PASSWORD", "http://gw-2312.coldproxy.com:30001:USERNAME:PASSWORD" ] } ``` -------------------------------- ### Target Proxy by ZIP Code Source: https://coldproxy.com/docs/geo-targeting Example of targeting a proxy by a specific ZIP code (90001) using the 'zip-90001' tag. ```shell curl -x "http://user-country-us-zip-90001:PASSWORD@gw-2312.coldproxy.com:30000" https://api.vipv6proxy.com/api/checker/my-ip ``` -------------------------------- ### Launch Browser with Proxy (Python) Source: https://coldproxy.com/docs/playwright Launches a Chromium browser with a specified proxy configuration applied globally. This setup is useful for applying the same proxy settings to all contexts within a browser instance. ```python from playwright.sync_api import sync_playwright with sync_playwright() as p: browser = p.chromium.launch(proxy={ "server": "http://gw-2312.coldproxy.com:30000", "username": "USERNAME", "password": "PASSWORD", }) page = browser.new_page() page.goto("https://api.vipv6proxy.com/api/checker/my-ip") print(page.content()) browser.close() ``` -------------------------------- ### Target Proxy by State (Texas, US) Source: https://coldproxy.com/docs/geo-targeting Example of targeting a proxy within Texas, USA using the 'country-us-state-texas' tag. ```shell # Texas, US curl -x "http://user-country-us-state-texas:PASSWORD@gw-2312.coldproxy.com:30000" https://api.vipv6proxy.com/api/checker/my-ip ``` -------------------------------- ### Get Service Information Request Source: https://coldproxy.com/docs/reseller-api Send this JSON payload to retrieve details and status of a specific service, including proxy credentials. ```json { "action": "GetServiceInfo", "username": "you@example.com", "api_key": "YOUR_API_KEY", "service_id": 80417 } ``` -------------------------------- ### Sticky Session Username Formats Source: https://coldproxy.com/docs/sticky-session-not-holding Demonstrates the correct and incorrect formats for ColdProxy sticky session usernames. The 'FIXED' example includes both session and time tags, ensuring a consistent exit IP for the specified duration. ```text # BROKEN — only a session tag, no time tag -> rotates every request user-key-myaccount-session-12345:PASSWORD # FIXED — session AND time together -> same exit IP for 10 minutes user-key-myaccount-session-12345-time-10m:PASSWORD ```