# How to Set the Latency Test Method in Shadowrocket for Accurate Node Testing

> Learn how to set the latency test method in Shadowrocket to CONNECT for accurate node testing. Measure TCP handshake times for real-world proxy performance.

- Repository: [如何翻墙/fanqiang](https://github.com/bannedbook/fanqiang)
- Tags: how-to-guide
- Published: 2026-09-05

---

**Set the latency test method to CONNECT in Shadowrocket's Settings to measure TCP connection handshake times rather than ICMP ping, providing more accurate real-world proxy performance data.**

The bannedbook/fanqiang repository maintains detailed iOS configuration guides for Shadowrocket (also known as “小火箭”). Configuring the latency test method correctly ensures you obtain reliable performance metrics that reflect actual proxy connection capabilities rather than simple network reachability.

## Locating the Latency Test Method Setting

According to the source documentation in [`ios/Shadowrocket.md`](https://github.com/bannedbook/fanqiang/blob/main/ios/Shadowrocket.md), the latency test configuration resides within the application's Settings menu. The specific implementation details appear in lines 103-106 of the tutorial file, which describes navigating to the **延迟测试方法** (Latency Test Method) option.

To access this setting manually:

1. Open Shadowrocket on your iOS device
2. Tap **Settings** at the bottom of the screen
3. Select **延迟测试方法** from the menu options
4. Choose your preferred testing protocol

## CONNECT vs PING: Choosing the Right Method

Shadowrocket supports multiple latency testing methodologies, but they measure fundamentally different network characteristics:

- **CONNECT** – Attempts a full TCP three-way handshake with each proxy node, measuring the round-trip time required to establish a connection. This method accurately simulates how your applications actually interact with the proxy server.

- **PING** – Sends ICMP echo requests to measure basic network latency. While faster to execute, ICMP traffic often receives lower priority from network devices and may not traverse the same network path as TCP traffic, resulting in potentially misleading latency figures.

For production environments where accurate node selection matters, **CONNECT** is the recommended configuration.

## Step-by-Step Configuration via GUI

Based on the implementation details documented in the bannedbook/fanqiang repository, follow these steps to activate the TCP CONNECT testing method:

1. Launch Shadowrocket and ensure you have loaded your subscription or proxy configuration
2. Navigate to **Settings** → **延迟测试方法**
3. Select **CONNECT** from the available options
4. Return to the main interface and pull down to refresh your node list
5. Tap the latency test button (usually displayed as a speedometer icon) to execute measurements

When enabled, Shadowrocket initiates actual TCP connections to each node endpoint, capturing the precise time required for the SYN-ACK handshake completion.

## Advanced Configuration via Subscription JSON

While the GUI provides manual configuration, you can enforce the CONNECT test method programmatically through custom subscription configurations. As documented in the repository's configuration examples, include the `latencyTest` parameter in your JSON subscription file:

```json
{
  "type": "subscribe",
  "url": "https://example.com/subscription",
  "settings": {
    "latencyTest": "CONNECT",
    "testUrl": "http://www.google.com/generate_204"
  }
}

```

To apply this configuration:

1. Open Shadowrocket → **配置** (Configuration)
2. Tap the **+** button to add a new remote configuration
3. Paste the JSON into the **远程文件** (Remote File) field, or host it at an accessible URL
4. Save the configuration and allow the app to reload
5. Verify the latency test method displays as CONNECT in Settings

## Why TCP CONNECT Provides Superior Accuracy

The CONNECT method offers distinct technical advantages over traditional ICMP-based testing:

- **Protocol Fidelity** – Since proxy applications establish TCP connections to transfer HTTP/HTTPS traffic, measuring TCP handshake latency reflects actual application performance rather than administrative ping responses.

- **Firewall Traversal** – Many network environments filter or de-prioritize ICMP packets while allowing TCP traffic on standard ports. CONNECT testing verifies both network reachability and port accessibility simultaneously.

- **Resource Realism** – ICMP responses typically originate from kernel-space network stacks with minimal processing overhead, whereas TCP connections exercise the full user-space proxy application, revealing server load conditions that ping misses.

## Summary

- **CONNECT** is the superior latency test method for Shadowrocket, utilizing TCP handshakes rather than ICMP pings
- Configuration resides in [`ios/Shadowrocket.md`](https://github.com/bannedbook/fanqiang/blob/main/ios/Shadowrocket.md) lines 103-106 within the bannedbook/fanqiang repository
- GUI configuration path: Settings → 延迟测试方法 → CONNECT
- JSON configuration enforces the setting via `"latencyTest": "CONNECT"` in subscription files
- TCP testing provides accurate proxy performance metrics by simulating real connection establishment

## Frequently Asked Questions

### What is the default latency test method in Shadowrocket?

Shadowrocket typically defaults to ICMP-based PING testing for speed, which provides faster results but less accurate proxy performance data. You should manually change this to CONNECT in Settings → 延迟测试方法 for production use, as documented in the bannedbook/fanqiang configuration guides.

### Why is CONNECT more accurate than PING for proxy testing?

CONNECT measures the time required to complete a TCP three-way handshake with the proxy server, which exactly mirrors how your applications establish connections. PING merely tests ICMP echo responses, which may take different network paths, receive different QoS priority, and bypass the actual proxy application stack that handles your traffic.

### Can I configure the latency test method via subscription URL?

Yes, you can enforce the CONNECT method through custom JSON subscription configurations by specifying `"latencyTest": "CONNECT"` in the settings object. When users import this subscription, Shadowrocket automatically applies the specified testing methodology without requiring manual GUI configuration.

### Does changing the latency test method affect my actual connection speed?

No, the latency test method only affects how Shadowrocket measures and displays node performance statistics. It does not alter the actual data transfer speeds or connection protocols used when browsing through the proxy. However, using CONNECT may slightly increase the time required to complete batch latency tests since TCP handshakes take longer than ICMP pings.