Quick start
Test a proxy with curl
The fastest way to prove that your credentials, host and port work before you use any other tool.
This guide is part of the ProxyOnly quick-start series. It assumes nothing and takes a few minutes. Prices are live, and you can start with a balance of one US dollar in any of the 63 countries we stock.
- Guide
- Test a proxy with curl
- Series
- 13 quick-start guides
- Minimum balance
- US$1
Why start with curl
curl is installed on macOS, most Linux systems and current versions of Windows, and it does one thing: it sends a request and prints the result. When a more complex tool fails to use your proxy, curl tells you whether the proxy itself is the problem or the tool is.
The test request
Send a request to an IP echo service through the proxy. If the proxy works, the address that comes back is the proxy's exit address and not your own. Use -x for the proxy and -U for the credentials, or put everything in the URL.
- Run the command with your own values.
- Read the origin address in the answer. It should differ from your own address.
- Change the country in the username and run it again. The address should change to the new country.
- Add -v to see the connection steps if it fails.
curl -x http://proxy.proxyonly.com:8000 -U "username-country-us:password" https://httpbin.org/ipReading the result
A JSON answer with an address means success. A 407 means the credentials were not accepted, so check the username and password. A connection timeout means the host or the port is wrong, or your network blocks the port. A certificate or TLS message usually means the proxy URL used https where it should use http.
Add --max-time 20 so a stuck request does not hang. To see how long the whole thing takes, add -w to print timing values after the response.
curl --max-time 20 -s -o /dev/null -w "%{http_code} %{time_total}s\n" -x http://proxy.proxyonly.com:8000 -U "username-country-us:password" https://httpbin.org/ipMove on to your real tool
Once curl works with the credentials, any failure in another tool is about that tool's settings. Copy the exact same values, and check that the tool is using an http proxy and not a socks one, unless you were given socks details.
Which proxy type fits any country
The right type depends on how strict the destination is, how much traffic you will send and how long you need the address. A short comparison of the types we sell:
Datacenter IPv4. The default choice for most jobs. These are dedicated IPv4 addresses hosted in a datacenter, fast and inexpensive, and the best fit for high-volume reading of public pages, monitoring and automation. Some websites treat datacenter ranges more cautiously than consumer connections, so test your target before you commit to a long rental.
ISP proxies. Static addresses that are registered to an internet service provider rather than a hosting company. They keep the speed of datacenter hardware and look more like an ordinary home or office connection, which helps with destinations that are strict about hosting ranges.
Shared IPv4. A shared address is used by more than one customer and costs less. It suits light tasks, quick checks and testing where a clean, exclusive address is not essential.
IPv6. IPv6 addresses are very cheap and plentiful, and they work well with destinations that serve IPv6 traffic, such as many large search, video and social platforms. Many smaller sites are still IPv4 only, so check that your target supports IPv6 before you buy.
Mobile proxies. Addresses from mobile carrier networks. Many phones share the same carrier address, so websites tend to be tolerant of this traffic, which makes mobile proxies the right choice for testing mobile ads, apps and landing pages. They cost more than datacenter addresses.
Residential proxies. Addresses from home internet connections, billed by the amount of traffic you use and not by the IP. They suit light, bursty jobs on sites that block datacenter and ISP ranges. Heavy traffic gets expensive quickly, so estimate your monthly volume first.
If you are unsure, rent one address of the type you think you need, run your real task against it for a day, and look at the success rate. Because rental periods start at a few days, trying a type costs very little.
Using proxies responsibly in any country
A proxy is a networking tool and it is lawful in most places, but what you do with it still has to be lawful and fair. Follow the laws that apply to you and to the place you send traffic to, read the terms of the sites you visit, honour robots rules and rate limits, and never use an address to access accounts or data that are not yours. ProxyOnly cannot give legal advice, and our acceptable use policy applies to every order.
In practice that means reading public pages, checking your own sites and ads, and testing your own products. If a task would be unwelcome to the site owner when done by hand, it is unwelcome when done through a proxy too.
Frequently asked questions
How do I test a proxy from the command line?
Use curl with -x for the proxy and -U for the credentials, and request an IP echo page. The address returned should be the proxy's.
What does 407 mean in curl?
The proxy did not accept your credentials. Check the username and password.
curl works but my tool fails. Why?
Your tool's proxy settings differ from what curl used. Copy the same values and check the proxy type.
Can I test the country with curl?
Yes. Change -country-xx in the username and compare the returned address in an IP lookup.
Ready to try it?
Create an account, add funds from US$1 and pick your country and proxy type.