The command to run first
This asks an address echo service what address the request appeared to come from. Run it, then run it without the proxy flag and compare. If the two answers match, your traffic is not going through the proxy at all.
curl -x "http://USERNAME:[email protected]:80" https://api.ipify.org?format=jsonKeeping credentials out of your shell history
The form above puts a password into your history file and into the process list where other users on the machine can read it. Separating the credentials avoids both, which matters more than it sounds on any shared machine.
curl --proxy "gate-eu.proxies.nullvault.shop:80" \
--proxy-user "USERNAME:PASSWORD" \
https://api.ipify.org?format=jsonSOCKS5, and why the h matters
Use socks5h rather than socks5. Without the h, curl resolves the destination hostname on your machine and sends the resulting address to the proxy, which leaks the target to your own resolver and can send you to the wrong regional server. With it, the proxy does the resolving.
curl -x "socks5h://USERNAME:[email protected]:80" https://api.ipify.org?format=jsonReading what went wrong
Verbose output shows the CONNECT exchange with the proxy, which is where authentication failures actually appear. A 407 is the proxy rejecting your credentials, a timeout at CONNECT is usually the wrong port, and a successful CONNECT followed by a failure means the proxy is fine and the destination is refusing you.
curl -v -x "http://USERNAME:[email protected]:80" https://api.ipify.org 2>&1 | head -30What to buy
Any pool, since this is a test rather than a workload. Use the smallest metered order to confirm the pool reaches your target before committing to a larger one.
Common questions
What does a 407 mean?
The proxy received your request and rejected the credentials. Either they are wrong, or they were never sent, which happens when the username or password contains a character that needs escaping in a URL. The separate proxy user form avoids that class of problem entirely.
Should I use socks5 or socks5h?
socks5h in nearly every case. It resolves the destination at the proxy rather than on your machine, which keeps your resolver out of it and gives you the regional answer the exit address should be seeing. Plain socks5 is the version that surprises people later.
curl works but my code does not. Why?
Usually proxy environment variables, a client that does not read them, or a client that does when you did not expect it. It can also be certificate verification, which curl and your language runtime handle with different defaults. Verbose output on both sides will show which.