On this page
Managing AI services separately is less about collecting a long domain list than knowing where account verification, model requests, and uploads go. Other products may also use shared login domains. Add rules based on actual sessions and keep a stable outbound connection for each service, so one change does not also alter unrelated access.
Which requests handle pages, login, model replies, and uploads?
When configuring rules for ChatGPT, Gemini, or Claude, sign in, send a message, and upload a file separately, recording each domain and outbound route. A working homepage confirms only some page requests; other requests to the same service may use different policies. If something already fails, use the table below to locate it by action.
Requests Associated with Each Failed Action
| Observed behavior | What to Inspect | Common Wrong Turns |
|---|---|---|
| Blank page or missing styles | Scripts, static assets, and DNS | Repeatedly switch accounts |
| Returns to the sign-in page after authentication | Authentication redirects, cookies, and egress region | Add rules only for the model API |
| Messages keep spinning or stop partway through | Model endpoints, streaming connections, and node switching | Test only the home page |
| File uploads stall | Upload domains, object storage, and request-body size | Proxy every CDN |
Keep Login and API Requests on the Same Exit
If authentication requests and the first API requests after sign-in use different egress paths, the service may request verification again or invalidate the session. While troubleshooting, create a manual policy group, pin one working node, and keep the account page, primary site, and endpoints on the same egress throughout one sign-in session.
This does not mean all three services must share one node forever. After confirming the problem, you can create separate groups for ChatGPT, Gemini, and Claude, but each service's own authentication and data requests should remain in the same region. An unavailable account, a service not offered in your region, or product-side rate limiting will not disappear because you add more Clash rules.
Identify domains from a real session instead of copying an entire old list
Clear connection records, then perform just one action, such as logging in to Claude, sending a short message in Gemini, or uploading a small file in ChatGPT. Record the hostnames, matched rules, and outbounds around the failure to find requests that were not forwarded as intended.
Start recording from known product entry points: ChatGPT uses chatgpt.com, while the OpenAI API uses api.openai.com. The Gemini web app uses gemini.google.com, and a common Gemini API endpoint is generativelanguage.googleapis.com.
The Claude web app uses claude.ai, while the Anthropic API uses api.anthropic.com. Add sign-in redirects, static assets, and upload addresses from your own connection records.
Place new rules before broad GEOIP entries, rule sets, and MATCH. Google sign-in domains are also shared by services such as Gmail and YouTube, so do not permanently bind a broad domain such as accounts.google.com to an AI group solely for Gemini.
Only after connection records confirm that an authentication request used the wrong egress should you add the host seen in that session to the AI group and verify again.
The example below is not a complete configuration to paste unchanged. Find a group defined in your current subscription and replace every YOUR_EXISTING_GROUP; otherwise, you will get group not found. After creating the three AI groups, open the existing groups they reference, pin working nodes, and then add the rules.
# 必须先把 YOUR_EXISTING_GROUP 替换成当前配置里真实存在的组名
proxy-groups:
- name: AI-OPENAI
type: select
proxies:
- YOUR_EXISTING_GROUP
- DIRECT
- name: AI-GOOGLE
type: select
proxies:
- YOUR_EXISTING_GROUP
- DIRECT
- name: AI-CLAUDE
type: select
proxies:
- YOUR_EXISTING_GROUP
- DIRECT
rules:
- DOMAIN-SUFFIX,chatgpt.com,AI-OPENAI
- DOMAIN,api.openai.com,AI-OPENAI
- DOMAIN,gemini.google.com,AI-GOOGLE
- DOMAIN,generativelanguage.googleapis.com,AI-GOOGLE
- DOMAIN,api.anthropic.com,AI-CLAUDE
- DOMAIN-SUFFIX,anthropic.com,AI-CLAUDE
- DOMAIN-SUFFIX,claude.ai,AI-CLAUDE
- GEOIP,CN,DIRECT
- MATCH,YOUR_EXISTING_GROUPEvidence that these rules are actually working
- Configuration validation passes with no group not found error
- Test requests from ChatGPT, Gemini, and Claude each match their own policy group
- Egress does not change during sign-in redirects or while sending a message
- Google services without rules are not accidentally routed into AI-GOOGLE
If the web app works but the CLI times out, they probably are not using the same proxy entry point
Browsers usually read the Windows or macOS system proxy, but a Python SDK, command-line tool, IDE extension, or container may not. Check whether the failed request appears on the Clash connections page. If no record appears, check that process’s proxy settings and whether it actually sent the request; an empty list alone does not prove that the request bypassed the proxy.
Command-line tools can temporarily set HTTP_PROXY, HTTPS_PROXY, and NO_PROXY; desktop development environments can also configure a proxy as documented by the app. Consider TUN only when several processes genuinely ignore the system proxy. If the connection already appears in the records, stop changing environment variables and inspect its matched rule, policy group, and node.
Are Different DNS Paths Causing the Blank Page?
When browser secure DNS, system DNS, and Clash DNS operate at the same time, the same service may resolve to different addresses in different programs. During troubleshooting, temporarily disable the browser's independent DoH so both domain queries and connections pass through Clash, then check whether blank pages or resource-loading failures persist.
Only when resolution succeeds but the TLS handshake or connection still times out should you return to node quality and rules. Do not switch among ten cities because of one DNS failure, and do not change Fake-IP, sniffing, and upstream DNS together without first observing the result.
Long responses and uploads are more sensitive to egress changes than to a few milliseconds of benchmark latency
AI conversations maintain long-lived streaming connections. An automatic group that reselects nodes too frequently can make the home page consistently fast while answers stop midway. During testing, use one pinned node to complete a long response, regenerate it, and upload a file; then compare whether the automatic group actually improves the experience.
For an upload failure, also determine whether the request was sent. If progress stays at 0%, first check whether the upload address matched. If it stops partway with a specific HTTP status, inspect the size limit, file type, and service response. Clash can change the network path, but it cannot bypass the product's own restrictions.
Practical Tests for Login, Long Responses, Uploads, and API Calls
Tests that reveal more than opening the home page
Sign in again
Confirm that the authentication redirect does not return to the sign-in page and that the egress region stays unchanged.
Send a long conversation
Observe time to first token, streaming output, and the final status—not merely whether the first sentence appears.
Upload a small file
Check the upload domain, progress, and final processing result.
Make one API call
Record the host, HTTP status code, and whether the client used the correct proxy entry point.
When login is stable but a conversation stops, keep the authentication rules and inspect model requests. When the browser works but the API client has no connection records, check that process’s proxy settings. Change only settings relevant to the failing action each time.
