### HTTP Rotating Proxy Example Source: https://docs.dataimpulse.com/proxies/protocols Demonstrates connecting to a rotating HTTP proxy using curl. This example shows the basic syntax for setting an HTTP proxy for a request. ```bash curl -x "http://login:password@gw.dataimpulse.com:823" https://api.ipify.org/ ``` -------------------------------- ### SOCKS5 Rotating Proxy Example Source: https://docs.dataimpulse.com/proxies/protocols Demonstrates connecting to a rotating SOCKS5 proxy using curl. This example shows the syntax for setting a SOCKS5 proxy for a request. ```bash curl -x "socks5://login:password@gw.dataimpulse.com:824" https://api.ipify.org/ ``` -------------------------------- ### SOCKS5 Sticky Proxy Example Source: https://docs.dataimpulse.com/proxies/protocols Demonstrates connecting to a sticky SOCKS5 proxy using curl. Sticky SOCKS5 connections ensure consistent routing through the same proxy server. ```bash curl -x "socks5://login:password@gw.dataimpulse.com:10000" https://api.ipify.org/ ``` -------------------------------- ### HTTP Sticky Proxy Example Source: https://docs.dataimpulse.com/proxies/protocols Demonstrates connecting to a sticky HTTP proxy using curl. Sticky connections maintain the same proxy server for a session, typically configured via specific ports. ```bash curl -x "http://login:password@gw.dataimpulse.com:10000" https://api.ipify.org/ ``` -------------------------------- ### Anonymous Proxy cURL Example Source: https://docs.dataimpulse.com/proxies/parameters/anonymous This example shows how to use the `anon` parameter with `curl` to connect to a proxy server, ensuring that only anonymous proxies are utilized. Enabling this option may lead to a smaller pool of available proxies compared to standard configurations. ```curl curl -x "http://login__anon:password@gw.dataimpulse.com:823" https://api.ipify.org/ ``` -------------------------------- ### cURL Example for ASN and Country Code Proxy Targeting Source: https://docs.dataimpulse.com/proxies/parameters/asn Demonstrates using cURL to connect to a proxy server configured with a specific country code (cr) and ASN number (asn). This allows routing traffic through proxies associated with particular carriers. The example shows how to fetch an IP address using this targeted proxy setup. ```shell curl -x "http://login__cr.pl;asn.39603:password@gw.dataimpulse.com:823" https://api.ipify.org/ ``` -------------------------------- ### Using Sticky Proxies with Curl (HTTP/SOCKS5) Source: https://docs.dataimpulse.com/proxies/types-of-connections Demonstrates how to connect to DataImpulse sticky proxies using `curl`. This includes examples for both HTTP and SOCKS5 protocols, specifying the proxy host, port, and authentication credentials. ```bash curl -x "http://login:password@gw.dataimpulse.com:10000" https://api.ipify.org/ ``` ```bash curl -x "socks5://login:password@gw.dataimpulse.com:10000" https://api.ipify.org/ ``` -------------------------------- ### Configure IP Rotation and Country for Sticky Proxies Source: https://docs.dataimpulse.com/proxies/parameters/session-interval This example demonstrates how to use curl to connect to a sticky proxy service, specifying the IP rotation interval (sessttl) and country code (cr). The `sessttl` parameter controls how often the IP address rotates in minutes, and `cr.fr` selects an IP from France. ```shell curl -x "http://login__cr.fr;sessttl.60:password@gw.dataimpulse.com:10000" https://api.ipify.org/ ``` -------------------------------- ### Connect via Proxy with ZIP Code Source: https://docs.dataimpulse.com/proxies/parameters/zip Example using curl to connect to a proxy server, specifying country and ZIP code parameters in the proxy URL. This demonstrates how to route traffic through a specific geographic location. ```bash curl -x "http://login__cr.us;zip.10001:password@gw.dataimpulse.com:823" https://api.ipify.org/ ``` -------------------------------- ### Example: Target Germany and Berlin Source: https://docs.dataimpulse.com/proxies/parameters/city Demonstrates how to use curl with a proxy configured to route traffic from Berlin, Germany. The proxy string includes the country code 'de' and the city code 'berlin'. ```curl curl -x "http://login__cr.de;city.berlin:password@gw.dataimpulse.com:823" https://api.ipify.org/ ``` -------------------------------- ### Using sessid in Curl Commands for Proxy Connections Source: https://docs.dataimpulse.com/proxies/parameters/session-id Demonstrates how to use the `sessid` parameter in `curl` commands to connect to a proxy server, requesting a specific IP address for a 30-minute session. The examples show the format for HTTP proxies. ```shell curl -x "http://login__cr.au;sessid.123:password@gw.dataimpulse.com:823" https://api.ipify.org/ ``` ```shell curl -x "http://login__cr.au;sessid.45:password@gw.dataimpulse.com:823" https://api.ipify.org/ ``` -------------------------------- ### Exclude Germany using curl Source: https://docs.dataimpulse.com/proxies/parameters/exclude-country Example of excluding Germany from proxy configurations using curl. The 'nocr' parameter is used in the proxy URL to specify country exclusion. ```curl curl -x "http://login__nocr.de:password@gw.dataimpulse.com:823" https://api.ipify.org/ ``` -------------------------------- ### Route Traffic from a Specific US State Source: https://docs.dataimpulse.com/proxies/parameters/state This example demonstrates how to use curl to route traffic through a proxy originating from a specific US state (Arizona). It shows the proxy configuration within the URL, including the state parameter. ```bash curl -x "http://login__cr.us;state.arizona:password@gw.dataimpulse.com:823" https://api.ipify.org/ ``` -------------------------------- ### Exclude ASN Proxy IPs with Curl Source: https://docs.dataimpulse.com/proxies/parameters/exclude-asn This example demonstrates how to exclude specific ASN proxy IPs from your requests using the curl command. It illustrates the proxy format required to bypass ASN proxies, such as AS20947, by prepending `noasn` to the login username. ```bash curl -x "http://login__noasn.as20947:password@gw.dataimpulse.com:823" https://api.ipify.org/ ``` -------------------------------- ### Configure Proxy for Multiple Countries Source: https://docs.dataimpulse.com/proxies/parameters Demonstrates setting multiple country parameters in the proxy URL. Multiple country codes, such as 'cr' and 'au', are appended separated by commas after the '__' delimiter. ```bash curl -x "http://login__cr.de,au:password@gw.dataimpulse.com:823" https://api.ipify.org/ ``` -------------------------------- ### Configure Proxy for Single Country Source: https://docs.dataimpulse.com/proxies/parameters Demonstrates setting a single country parameter in the proxy URL. Parameters are appended after login information using '__' as a delimiter, with country codes like 'cr' for Germany. ```bash curl -x "http://login__cr.de:password@gw.dataimpulse.com:823" https://api.ipify.org/ ``` -------------------------------- ### Proxy Request via Multiple Countries Source: https://docs.dataimpulse.com/proxies/parameters/country Specify multiple countries for proxy requests by comma-separating their codes in the proxy URL. This allows traffic to be routed through proxies in any of the listed countries. ```bash curl -x "http://login__cr.de,au:password@gw.dataimpulse.com:823" https://api.ipify.org/ ``` -------------------------------- ### SOCKS5 Proxy Error Handling Source: https://docs.dataimpulse.com/errors Describes how errors are presented when using SOCKS5 proxy connections. Errors are indicated by status codes during connection establishment and authentication, or by connection resets for UDP attempts. ```APIDOC SOCKS5 Proxy Errors: Error Presentation: - For errors like NO_USER, REQUESTS_EXHAUSTED, TRAFFIC_EXHAUSTED, THREADS_EXHAUSTED: An unsuccessful authentication response will be returned with the Denied status when there was an attempt to connect to a proxy server. - For errors like PORT_BLOCKED, NO_RAY, NO_HOST_CONNECTION: Authentication will be passed, after which, the proxy connection will be reset if there is an attempt of a UDP connection, or the connection will be dropped. Error Details: - More details relevant to the errors can be found on our blog: [Proxy Errors: Types, Causes, and Solutions](https://dataimpulse.com/blog/proxy-errors-types-causes-and-solutions/) ``` -------------------------------- ### Proxy Request via Single Country Source: https://docs.dataimpulse.com/proxies/parameters/country Specify a single country for proxy requests by including its code in the proxy URL. This directs traffic through a proxy server located in the chosen country. ```bash curl -x "http://login__cr.de:password@gw.dataimpulse.com:823" https://api.ipify.org/ ``` -------------------------------- ### HTTP Proxy Error Codes Source: https://docs.dataimpulse.com/errors Lists common HTTP error codes returned by the proxy server, detailing the status code and its specific meaning for incorrect requests or server-side issues. These errors are shown in the response of the proxy server after using the service. ```APIDOC HTTP Proxy Errors: 400 Bad Request - Description: CONNECT request to the proxy server was created incorrectly. 403 PORT_BLOCKED - Description: The connection attempt is made to the blocked ports. 403 SITE_PERMANENTLY_BLOCKED - Description: The access to the specified site has been permanently blocked. 403 HOST_BLOCKED - Description: The access to the specified site has been blocked by user in the current plan settings. 407 NO_USER - Description: The user’s plan doesn’t exist. 407 TRAFFIC_EXHAUSTED - Description: The traffic limit of the plan is exceeded. 407 THREADS_EXHAUSTED - Description: The threads limit of the plan is exceeded. 407 PORT_NOT_ALLOWED - Description: Used sticky sessions port is not allowed by current plan settings. 407 USER_BLOCKED - Description: The user’s current plan has been blocked. 500 INTERNAL_SERVER_ERROR - Description: The server encountered an unexpected condition that prevented it from fulfilling the request. 502 NO_HOST_CONNECTION - Description: There is no connection to the host specified in the CONNECT request. 503 NO_RAY - Description: There are no proxies available based on the targeting parameters specified in the request. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.