Skip to content

Updated

curl Error 28 Through a Proxy:
Find the Slow Leg

  1. curl error 28 only says that a time limit ran out.
  2. Which limit, and in which phase, is what matters.
  3. Run the same URL twice with the timing format below, once direct and once through the proxy. If the proxied run stalls before the TCP connect finishes, the problem is reaching the proxy (address, port, firewall). If it connects but the first byte comes late, the exit or the website is slow. If both runs are slow at the same point, the proxy is not the cause. Raise a limit only after you know the phase.

Check it right after buyingExample output

curl -x http://USER:PASS@HOST:PORT https://ipinfo.io/json

ip
203.0.113.24
country
US
Matches the country you picked
Day 15
203.0.113.24
Same address for the whole term
Example addresses (203.0.113.0/24), not real exits
01 / 09What error 28 and ERR_TIMED_OUT mean

Run one timed request direct and one through the proxy, read where the seconds go, then change the right thing.

What error 28 and ERR_TIMED_OUT mean

In libcurl, error 28 is CURLE_OPERATION_TIMEDOUT: a time limit was reached. It is not the same as error 7, which means curl could not connect to the host or proxy at all. Chrome and Edge show similar families: ERR_TIMED_OUT (an operation timed out), ERR_CONNECTION_TIMED_OUT (a connection attempt timed out) and ERR_PROXY_CONNECTION_FAILED (the proxy itself could not be resolved or connected).

curl does not set most time limits for you, so a request can wait much longer than you expect until you set --connect-timeout and --max-time yourself.

Three usual causes behind a proxy timeout

One: the proxy cannot be reached, so the TCP connect to it never completes (wrong host or port, a firewall that drops packets, or an unusable local network). Two: the proxy is reached, but the exit IP or the route to the website is slow, so the first byte arrives late or the transfer crawls. Three: the limits are too tight for the path, for example a connect limit of 2 seconds on a long route.

A fourth look-alike is a slow or failing DNS lookup, which shows up as a large dns number or as error 5 or 6.

Time the same request direct and through the proxy

# A) Direct, no proxy: how long does each phase take?
curl -o /dev/null -s --connect-timeout 10 --max-time 60 -w 'dns %{time_namelookup}  tcp %{time_connect}  tls %{time_appconnect}  first-byte %{time_starttransfer}  total %{time_total}\n' https://example.com/

# B) Same URL through the proxy, same limits
curl -o /dev/null -s --connect-timeout 10 --max-time 60 -x http://LOGIN:PASSWORD@HOST:PORT -w 'dns %{time_namelookup}  tcp %{time_connect}  tls %{time_appconnect}  first-byte %{time_starttransfer}  total %{time_total}\n' https://example.com/

# C) Abort only when the transfer really stalls (below 1000 bytes/s for 20 s)
curl -o /dev/null -s --connect-timeout 10 --speed-limit 1000 --speed-time 20 -x http://LOGIN:PASSWORD@HOST:PORT https://example.com/
echo "exit code: $?"   # 28 = timeout

Example only: replace LOGIN, PASSWORD, HOST and PORT with the values from your proxy page, and example.com with your target. The limits are starting values to try, not recommendations from curl.

Where the seconds go

Where the seconds go
ItemWhat it measuresIf it is large
time_namelookupTime until the name was resolvedDNS is slow; with a proxy URL, also check that the proxy host name resolves
time_connectTime until TCP connected to the host or proxyReaching the proxy is the problem: address, port, firewall, local network
time_appconnectTime until the TLS handshake finishedThe TLS leg is slow; compare with the direct run
time_starttransferTime until the first byte was receivedExit or website is slow to answer; compare direct against proxied
time_totalWhole operationLarge only here means the transfer itself is slow; consider --speed-limit with --speed-time

Variable meanings taken from the curl manual, read on 20 November 2026; times are cumulative from the start of the request.

Decide which leg is slow

  1. Step 1: run A and B above

    Use the same URL and the same limits. Write down the five numbers from each run.

    Expected result Two lines of numbers to compare.

  2. Step 2: find the first number that is large in B but not in A

    If it is time_connect, the problem is reaching the proxy. If it is time_starttransfer, the proxy is reached and the exit or the site is slow.

    Expected result You know which phase to work on.

  3. Step 3: if A is also slow at the same point

    The website or your own network is the cause. A proxy change will not help.

    Expected result You stop changing proxy settings.

  4. Step 4: change one thing and rerun

    Fix the address, port or firewall, try another exit, or raise a limit for the phase that is actually slow. Rerun B each time.

    Expected result The slow phase gets shorter.

    Before continuing Do not raise limits blindly: a wrong port will time out at any value.

Symptoms and next action

time_connect is large or the run ends with error 28 before connect

Check Check host, port and protocol (HTTP 2222, SOCKS5 3333 on Proxy302); try from another network.

Fix Correct the entry; allow outbound traffic to that port in the firewall.

Stop when If a plain TCP check to the port also times out from your network, the path is blocked.

Connects fast, first byte is late only through the proxy

Check Repeat B a few times and with another target.

Fix Try another exit IP; on rotating residential a new connection normally gets a new IP. A fixed IP stays the same, so try another one only if repeated runs are slow.

Stop when If direct is just as slow, stop changing the proxy.

Error 28 with some bytes received

Check The transfer started and then stalled.

Fix Use --speed-limit and --speed-time rather than a very long --max-time; consider a smaller response.

Stop when If it stalls at random points, test another time of day.

dns number is large, or error 5 or 6

Check Resolve the proxy host name and the target host name separately.

Fix Fix DNS on your side; use socks5h:// if the proxy should resolve target names.

Stop when If the proxy host does not resolve at all, correct the host name.

With Proxy302: collect the numbers for a ticket

  1. Step 1

    Open My assets and copy HOST, PORT, USERNAME and PASSWORD.

  2. Step 2

    Run commands A and B with the port that matches the asset protocol (HTTP 2222, SOCKS5 3333).

  3. Step 3

    If B is slow where A is not, open a Support ticket with the order number, both lines of numbers, the time and your location.

curl error 28 and proxy timeouts: common questions

What is the difference between curl error 7 and error 28?

Error 7 means curl failed to connect to the host or proxy; error 28 means a time limit was reached. Either can mean a blocked port, so read the message and the timing numbers.

Which timeouts should I set?

Set --connect-timeout for the connection phase and --max-time for the whole transfer, because curl sets few limits by default. Pick values from your measured numbers; 10 and 60 seconds are only starting examples.

Does --max-time cover the connection too?

It limits the whole transfer, while --connect-timeout limits only the connection phase. With --retry the max-time counter resets on each retry.

What does ERR_TIMED_OUT mean in Chrome?

Chromium defines it as an operation that timed out. ERR_CONNECTION_TIMED_OUT is a connection attempt that timed out; ERR_PROXY_CONNECTION_FAILED is about reaching the proxy itself.

Will a new IP fix a timeout?

Only if the old exit was the slow leg. Time a direct run first; if it is just as slow, the website or your network is the cause.

Further reading

Setup guides Proxy302 publishes on GitHub on the same topic:

Reference links

5
  1. libcurl error codes

    Official documentation · Confirmed on:

    Read on 20 November 2026: CURLE_OPERATION_TIMEDOUT (28) is "the specified time-out period was reached according to the conditions"; CURLE_COULDNT_CONNECT (7) is "failed to connect() to host or proxy"; 5 and 6 are resolve failures for the proxy and the host; 97 is a proxy handshake error.

  2. curl manual: timeouts and write-out variables

    Official documentation · Confirmed on:

    Read on 20 November 2026: --connect-timeout limits only the connection phase; --max-time limits each whole transfer and resets on retry; --speed-limit and --speed-time abort a transfer that stays too slow, 30 seconds by default; time_namelookup, time_connect (TCP connect to the host or proxy), time_appconnect (TLS handshake), time_starttransfer (first byte) and time_total are measured from the start.

  3. Everything curl: timeouts

    Official documentation · Confirmed on:

    Read on 20 November 2026: most operations in curl have no time-out by default, so setting limits explicitly is up to you.

  4. Chromium source: net error list

    Official documentation · Confirmed on:

    Read on 20 November 2026: ERR_TIMED_OUT (-7) is "an operation timed out", ERR_CONNECTION_TIMED_OUT (-118) is "a connection attempt timed out", ERR_PROXY_CONNECTION_FAILED (-130) is a failure to resolve or connect to the proxy itself.

  5. Proxy302 product facts and price list

    Product observation · Confirmed on:

    Product facts file of the site (values checked against the console, the backend and the price table on 18-19 October 2026): products, prices in US$ (1 PTC = US$1), lease terms, protocols and ports, countries, quantity limits, no free trial.

Ready to try it?

Create an account, top up once, then pick rotating residential, static ISP or datacenter IPs and have one running in your browser within minutes.