# Troubleshoot proxy connection timeouts

Distinguish DNS, TCP, proxy forwarding, target host response, and client timeout settings.

The timeout must first be confirmed at which stage it occurred. A single timeout prompt cannot tell whether it is a gateway, exit, destination host, or client limitation.

## Stratification inspection

- Parse the proxy host and confirm that DNS has a result.
- Test TCP connections to the proxy port.
- Complete authentication and request simple public targets.
- Log connection timeouts and read timeouts separately.

## Client settings

- Set separate, limited timeouts for connections and reads.
- Do not use infinite wait.
- Batch tasks limit the number of connections that can be made simultaneously.

## Comparative method

- Compare simple goals and business goals with the same configuration.
- Use different networks to compare whether it is a local firewall issue.
- Change only one variable and then test.

## Recovery strategy

- Retryable network errors using index avoidance and random shake.
- The maximum number of times to enter the failed queue is not indefinite.
