Clash's url-test can request a URL test node that returns a response of 204 to evaluate the latency of the node and automatically select the optimal route.
Shadowrocket's default latency test method is CONNECT, which requests a URL that returns a response of 204 through a proxy server to test the latency of the node and evaluate the quality of the node.
These URLs are mainly used by some large foreign internet companies for fast network connectivity testing, user tracking, and other purposes. By accessing a URL that returns a 204 status code, it can be determined whether the network is smooth. These URLs usually have a small or empty request body to minimize network overhead.
It should be noted that these URLs may change due to service adjustments, so it is recommended to test and verify them before actual use.
This article lists multiple 204 test URLs from major companies that can be selected and replaced.
Clash url-test example#
- name: ♻️ Auto Select
type: url-test
url: http://www.gstatic.com/generate_204
interval: 300
proxies:
- Node 1
- Node 2
- Node 3
Shadowrocket Configuration#
【Settings】-> 【Latency Test Method】->【URL Test Settings】
Common 204 URLs#
Google#
http://www.gstatic.com/generate_204#
- URL used by Google Chrome browser to detect network connectivity, also the default in Clash and Shadowrocket configurations
http://maps.googleapis.com/maps/api/mapsjs/gen_204#
- Google Maps
http://www.google.com/generate_204#
- Another URL used by Google Chrome browser to detect network connectivity
http://www.google-analytics.com/generate_204#
- Google Analytics
http://connectivitycheck.gstatic.com/generate_204#
- Another URL used by Google Chrome browser to detect network connectivity
https://clients3.google.com/generate_204#
- Another URL used by Google to detect network connectivity
http://www.google.com/blank.html#
- A blank page from Google, accessing it will return 204
https://ssl.gstatic.com/ui/v1/icons/mail/images/cleardot.gif#
- A blank image URL used by Gmail, accessing it will return 204
Cloudflare#
http://cp.cloudflare.com/generate_204#
- CDN giant Cloudflare
Apple#
http://captive.apple.com#
- URL used by Apple devices to detect hotspot portals, accessing it will return 204
http://www.apple.com/library/test/success.html#
- Another URL used by Apple devices to detect network
Microsoft#
http://www.msftncsi.com/ncsi.txt#
- URL used by Microsoft to detect Internet connection, accessing it will return 204
http://www.msftconnecttest.com/connecttest.txt#
- Another URL used by Microsoft to detect Internet connection, accessing it will return 204
https://bat.bing.com/action/0#
- URL used by Microsoft Bing search engine to track users, accessing it will return 204
Facebook#
https://www.facebook.com/common/referer_frame.php#
- URL used by Facebook to track user referrals, accessing it will return 204
Firefox#
http://detectportal.firefox.com/success.txt#
- URL used by Firefox browser to detect network connectivity
Twitter#
https://twitter.com/favicon.ico#
- Twitter's favicon icon URL, accessing it will return 204