GPT-5 access is not determined by one switch in Clash. A dependable workflow depends on several separate layers: account and service availability, the Clash client, the Mihomo or compatible proxy core, the subscription configuration, the selected node, DNS behavior, and the application’s own connection method. In China, a browser may load a sign-in page while the desktop application or API request still fails because the two paths use different domains, protocols, or proxy settings.

This guide focuses on practical network configuration rather than promising universal access. Service availability, account eligibility, regional restrictions, authentication requirements, and applicable laws can change. Use an account and network arrangement that is permitted for your situation, and avoid assuming that a successful connection to one GPT-5-related domain proves that every feature will work.

GPT-5 With Clash: A Practical Access Guide for China

Map the GPT-5 connection path before changing settings

The first step is to identify which application you want to use. A web browser, an official desktop application, a command-line tool, and a third-party coding environment may contact different hosts. They may also use different proxy APIs. A browser commonly reads the operating system HTTP proxy, while a terminal command may require HTTP_PROXY, HTTPS_PROXY, or an explicit SOCKS option. Some applications ignore both and require their own proxy setting.

Clash cannot route traffic that never enters its local listener. Therefore, start with the Clash connection log instead of repeatedly switching nodes. Open the target application, perform one clearly identifiable action, and watch for new entries. Look for the destination domain, destination port, matched rule, proxy group, and final node. If no connection appears, the application is bypassing Clash, using another client, reusing a cached session, or failing before it creates a network request.

Test target Typical proxy path What to verify
Browser website System proxy, browser extension, or browser-specific proxy Disable competing extensions and inspect the Clash log
Desktop AI application System proxy, application proxy, or embedded network stack Check application settings and confirm the process appears in the log
Terminal command Environment variables, command flags, or SOCKS wrapper Print proxy variables and test the local listener directly
API or coding tool Runtime-specific HTTP client or environment configuration Check the tool’s proxy documentation, TLS errors, and endpoint hostname

Test one domain at a time. A login page, an authentication endpoint, a model request endpoint, an update server, and an analytics host may all be separate destinations. A rule that sends the main website through a proxy does not automatically send every related request through the same policy. Conversely, sending every domain through one remote node can create unnecessary latency and make local services less convenient.

Choose a suitable Clash client and import the subscription

For a new desktop setup, choose a maintained client that supports the features your workflow needs. Clash Verge Rev and other Mihomo-based clients commonly expose system proxy, TUN, DNS, rule mode, connection logs, proxy-group selection, and subscription updates in one interface. The exact menus and bundled core version vary, so check the client’s About, Core, or Runtime page after installation. The name of the GUI does not by itself guarantee that a particular YAML field or protocol is supported.

A subscription is configuration data, not the client and not the proxy core. It may contain proxy nodes, proxy groups, rule providers, DNS settings, and update intervals. When importing it, use the client’s subscription or profile page rather than pasting the URL into an unrelated field. After the first update, open the generated configuration and confirm that it contains at least one usable proxy group and that the group names referenced by the rules actually exist.

Before modifying a subscription-generated profile, save the original URL and export a copy of the current configuration if the client supports it. Direct edits to a generated file can disappear during the next update. Persistent changes are better placed in the client’s override, merge, script, or profile-enhancement feature, depending on what the installed client provides.

mixed-port: 7890
allow-lan: false
mode: rule
log-level: info

proxy-groups:
  - name: GPT5
    type: select
    proxies:
      - Auto
      - DIRECT

rules:
  - MATCH,GPT5

This example is intentionally minimal. It does not provide real nodes and should not be pasted over a working subscription. The important ideas are the local mixed port, rule mode, a selectable group, and a final rule. A production profile normally includes provider definitions, DNS options, rule providers, multiple policy groups, and more precise rules.

Verify the local listener and system proxy

Most desktop clients use a local HTTP, SOCKS5, or mixed port. A common example is 7890, but the active port may be different. Confirm it in the running client rather than assuming a value from an online tutorial. A port declared in YAML is not enough: the core must have started successfully and the operating system must show a process listening on that port.

Enable the client’s system proxy switch only after confirming the listener. On Windows, inspect the operating system proxy page and ensure the address points to the same local host and port shown by Clash. On macOS, check the active network service under the proxy settings. If the client offers an automatic system-proxy mode, use that first and avoid manually configuring a second proxy at the same time.

Keep allow-lan: false unless another device on the local network genuinely needs to use the proxy. Enabling LAN access binds the listener more broadly and may expose it to other devices if firewall rules are not restricted. It is not required for a GPT-5 workflow running on the same computer.

Build targeted routing rules for GPT-5 traffic

Rule order matters. Mihomo evaluates rules from top to bottom and generally uses the first matching rule. A broad rule placed above a specific rule can make the specific rule unreachable. Start by observing the actual domains in the connection log, then add narrow rules for confirmed destinations. Do not create a rule based only on a guessed hostname from a search result.

A domain rule can be written in several ways. DOMAIN matches one exact domain, DOMAIN-SUFFIX matches the domain and its subdomains, and DOMAIN-KEYWORD matches a text fragment but can also create accidental matches. For a stable setup, prefer exact or suffix rules when you know the required host. Use a proxy group rather than hard-coding one node so that the route can be changed without editing every rule.

proxy-groups:
  - name: GPT5
    type: select
    proxies:
      - GPT5-Auto
      - Fast-Node
      - DIRECT

rules:
  - DOMAIN-SUFFIX,example-ai-service.com,GPT5
  - DOMAIN-SUFFIX,example-auth-service.com,GPT5
  - DOMAIN-SUFFIX,example-cdn.com,GPT5
  - MATCH,Final

The domains above are placeholders, not a list of official GPT-5 endpoints. Replace them only with hostnames confirmed from the application log or the service’s current documentation. Services can change their authentication, API, content delivery, telemetry, and update domains. Adding a guessed “GPT” keyword rule may route unrelated websites or fail to catch a hostname that does not contain that word.

For browser use, a focused group can be useful when the browser also accesses domestic websites. For a dedicated API environment, an explicit proxy variable may be cleaner than enabling TUN for the entire operating system. In either case, keep a DIRECT option available for troubleshooting only when the service and account rules allow it; a direct test can help distinguish routing failure from account or service failure, but it may not be appropriate for the target connection.

Select a node by reliability, not just latency

A low ping value is useful but incomplete. Many latency tests measure a small probe to a node or test server, while an AI sign-in or model request involves DNS resolution, TLS negotiation, authentication, long-lived HTTPS connections, response streaming, and sometimes larger request bodies. A node that reports 80 milliseconds in a quick test may still perform poorly during a sustained response.

Observation Likely area to inspect Practical action
Node test is fast, but the website times out Destination routing, DNS, or server-side filtering Inspect the matched rule and test another node in the same group
Login page loads, but authentication loops Authentication host, cookies, time, or inconsistent exit IP Route related auth domains consistently and avoid rapid node switching
Chat starts but streaming stops Unstable connection, timeout, or long-lived HTTPS handling Try a stable node and check whether the connection is repeatedly closed
API returns a regional or permission error Account eligibility or service policy Do not treat it as a simple Clash rule error; verify account requirements

Create an automatic group only when its health-check behavior reflects the real task. A URL that returns a small static page may show availability without measuring sustained streaming quality. A manual select group is often easier during initial diagnosis because it lets you keep one node fixed while comparing results. Once a reliable node is identified, an automatic group can provide fallback, but avoid switching nodes in the middle of an authentication flow.

DNS deserves separate attention. With fake-IP mode, redirection, or TUN enabled, the application may see synthetic addresses while the core keeps the original domain internally. Some applications handle this normally; others use certificate pinning, custom DNS, or a network library that behaves differently from a browser. If a request fails only with TUN enabled, first compare it with system-proxy mode. Do not change several DNS options and the routing rules at the same time, because that removes the ability to identify the cause.

Use TUN and terminal proxy settings deliberately

System proxy mode is usually the least invasive starting point. It affects programs that respect the operating system’s proxy settings, which often includes browsers and many desktop applications. It does not automatically capture every process. Games, command-line tools, virtual machines, containers, and applications with their own network stack may continue to connect directly.

TUN mode creates a virtual network interface and can capture traffic from applications that ignore the system proxy. It also introduces more variables: administrator permission, route installation, DNS interception, IPv6 behavior, operating-system firewall rules, and conflicts with other VPN or network-filtering software. Enable it only after ordinary system-proxy mode has been tested, and turn off other VPN clients during the comparison.

For terminal tools, verify the local port explicitly. A generic HTTP or mixed-port test may look like this:

curl -x http://127.0.0.1:7890 https://example.com

# For a SOCKS5-compatible client:
curl --socks5-hostname 127.0.0.1:7891 https://example.com

Use a real test destination that you are authorized to access. The --socks5-hostname form asks the proxy to resolve the hostname, which can be useful when local DNS resolution is the problem. If the command works with an explicit proxy but fails without one, the terminal is not reading the system proxy. In that case, configure the tool’s supported environment variables or command options rather than enabling TUN immediately.

# POSIX-compatible shells
export HTTP_PROXY=http://127.0.0.1:7890
export HTTPS_PROXY=http://127.0.0.1:7890

# Clear them when testing a direct path
unset HTTP_PROXY HTTPS_PROXY ALL_PROXY

Variable names and proxy URL formats vary between programs. Some tools use lowercase names, some accept only SOCKS5, and some require a separate certificate or no-proxy list. Check the tool’s own help output. Keep local destinations such as 127.0.0.1, local development hosts, and private network ranges out of a global proxy variable when necessary.

Troubleshoot sign-in, chat, and API failures separately

Sign-in failure is not equivalent to model-request failure. Authentication can involve redirects, cookies, anti-abuse checks, identity providers, and browser storage. If the sign-in page loads but the callback fails, inspect the last few domains in the Clash log and check whether the callback host uses the same policy as the initial page. Keep the node stable during one login attempt; changing exits repeatedly can invalidate a session or trigger additional verification.

If sign-in succeeds but the chat interface cannot send a prompt, check the request domain and response status in the connection log. A rule may route the page through a proxy while sending the API or streaming endpoint to DIRECT. If the request reaches the service and returns an explicit account, region, quota, or permission message, changing ports will not resolve that message. Confirm the account’s eligibility, subscription status, model availability, and current service policy.

For API clients, inspect the complete endpoint URL, authorization header handling, model identifier, timeout, and response mode. A proxy can establish the TCP and TLS connection while the API still rejects the request because of an invalid key or unsupported model name. Streaming requests also need a client that keeps the connection open and correctly handles incremental events. Test a small authorized request first, then increase the timeout for longer responses.

  1. Confirm that the Clash core is running and the selected profile loaded without errors.
  2. Confirm the application request appears in the connection log.
  3. Confirm the matched rule and proxy group are the ones intended for the service.
  4. Keep one node fixed and repeat the same request.
  5. Compare system-proxy mode with explicit application or terminal proxy settings.
  6. Only then test TUN, DNS changes, or a different configuration source.

This order prevents a common diagnostic mistake: replacing the client, subscription, DNS mode, node, and rules all at once. When every variable changes, a temporary improvement does not explain what actually fixed the problem, and the same failure is difficult to reproduce later.

Keep the GPT-5 routing setup maintainable

Record the client name, core name and version, active local port, profile source, selected group, DNS mode, and whether TUN is enabled. This small inventory makes later troubleshooting much faster, especially when more than one Clash client is installed. Running two clients at the same time can create port conflicts, competing system-proxy settings, and misleading connection logs.

Update subscriptions carefully. After an update, check whether the proxy group names, rule-provider names, and local overrides still exist. A provider may rename a group or regenerate rules, causing a previously working custom rule to point to a missing policy. Keep custom rules in a supported override layer and export a backup before making structural changes.

Do not expose the external controller or a proxy listener to the public internet. Use a loopback address for local administration where possible, set a strong controller secret if the client exposes that option, and leave LAN access disabled unless it is required. Treat subscription URLs and controller credentials as sensitive information: they may provide access to traffic configuration or account resources.

For day-to-day use, a practical baseline is simple: one maintained Mihomo-based client, one clearly named profile, one dedicated proxy group for the target service, narrow verified rules, a stable fallback node, and system proxy mode before TUN. Keep a separate troubleshooting profile with more verbose logs, but return to a quieter production profile after the route is confirmed.

Download Clash