Skip to main content

Getting node information with the "respond-with" header

Kate avatar
Written by Kate
Updated over 10 months ago

Sometimes, you may want to know which proxy node is processing your request. There are two ways to do this, each with its own pros and cons.


Method 1: Check your IP with the first request

Send your first request to a service that shows your IP, like:

Then, make your actual request.

Pros:

  • Easy to use with any HTTP client.

  • If the first node isn't available, the proxy will automatically try another one.

Cons:

  • We cannot guarantee that the same node will be used for both the IP check and the next request. If a node change occurs, it will happen seamlessly without any notification to the user.


Method 2: Use the "respond-with" header

To obtain information about the node being used, send a request to our server with the "respond-with" HTTP header in the proxy settings, including one or more of the following parameters:

request_id
uid
conn_type
country
region
city
isp
asn
ip

Example:

curl -x "<your package login>:wifi;[email protected]:9000" --proxy-header "respond-with: ip,country" -v https://www.cloudflare.com/cdn-cgi/trace

Pros:

  • The exact node from which you received information will be the one that processes your request.

  • You can receive not only basic IP information and connection type but also request_id and node_uid, which you can get only from SOAX.

Cons:

  • It only works with HTTPS requests.

  • There are no automatic retries if the node fails.


Code examples in different programming languages

Did this answer your question?