Studying abroad often means switching between two very different network requirements. University portals, learning platforms, video-conference services, library databases, and local banking sites usually work best through the ordinary local connection. At the same time, Chinese video platforms, domestic cloud services, shopping sites, and some government websites may require a mainland China IP address, Chinese DNS behavior, or a route that performs better through a China-based exit. Changing the entire Clash profile every time you open a different website is inconvenient and can also create avoidable DNS and proxy mistakes.

A more practical approach is to keep one active Clash or Mihomo configuration and divide traffic by purpose. Campus and local services use DIRECT, while selected Chinese services use a proxy group connected to an appropriate China-region node. Everything else can follow a separate default policy. This is split routing: the client remains in rule mode, but different destinations receive different handling decisions.

Clash Setup for Students Abroad: Access China Services

Plan the routing model before editing YAML

Start by listing the services you actually use instead of trying to create a rule for every domain on the internet. A student studying in the United Kingdom, Australia, Canada, Japan, or another region may need four traffic categories: university and local services, Chinese services that need a mainland route, ordinary international websites, and network destinations that should never use a proxy. Separating these categories makes later troubleshooting much easier.

Traffic category Typical policy Reason
Campus portals and local services DIRECT Preserves local access, lower latency, and fewer login challenges.
Chinese video and domestic websites China proxy group Provides a mainland exit when regional restrictions require it.
General international websites Default proxy or DIRECT Depends on your normal browsing and privacy requirements.
Private networks and local devices DIRECT Avoids sending printers, routers, and campus addresses to a remote node.

The most important decision is whether a service needs a China exit or merely needs to avoid the proxy. A Chinese website can still work through a local overseas connection, especially if it is globally available. In that case, forcing it through a China node may increase latency or trigger a security check. Conversely, a video platform may show different content or refuse playback unless the public IP belongs to mainland China. Test each service individually rather than assuming that every domain ending in .cn requires the same route.

Choose a suitable China-region node

Place the nodes used for domestic services in a clearly named proxy group. Names such as China-Streaming or Mainland-Access are easier to identify than a long list of provider-generated names. If your subscription offers several mainland locations, keep at least two candidates because one may have poor connectivity to a specific service or may be rejected by that service.

Latency tests are useful but incomplete. A node with a low ping to the proxy server may still perform poorly when connecting to a video CDN, a banking system, or a government website. Test the actual service after selecting a node. Check whether the page loads, whether video playback starts, whether login verification appears, and whether the service displays the expected region. Do not repeatedly refresh a financial login page while changing nodes, because multiple location changes can trigger account protection.

Prepare a safe Clash configuration

Before changing a subscription-based profile, export a backup or duplicate the profile. Many clients refresh subscription content and may overwrite direct edits. Clash Verge Rev and other Mihomo-based clients commonly provide profiles, overrides, or merge settings, but the names and locations vary by version. If the configuration is generated from a subscription, use the client’s supported override mechanism when available. Do not assume that editing a downloaded file will remain effective after the next update.

Confirm the active kernel before using advanced fields. A configuration written for Mihomo may include rule providers, enhanced DNS settings, TUN options, or script behavior that an older Clash core does not understand. In the client, check the kernel or core information page and inspect the startup log after loading the profile. A profile that silently falls back to a different core can produce missing groups, ignored rules, or a configuration-load error.

The basic structure needs three connected parts: proxy definitions or proxy providers, proxy groups, and rules. The rule selects a policy name; the policy name must exactly match a proxy group or the special policy DIRECT or REJECT. If a rule refers to China-Streaming but the group is called China Stream, the rule will not work as intended.

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

proxy-groups:
  - name: China-Streaming
    type: select
    proxies:
      - China-Node-1
      - China-Node-2
      - DIRECT

rules:
  - DOMAIN-SUFFIX,example-university.edu,DIRECT
  - DOMAIN-SUFFIX,example.cn,China-Streaming
  - MATCH,DIRECT

This is a structural example, not a complete working subscription. The names China-Node-1 and China-Node-2 must exist in the active configuration. A subscription may instead expose proxies through a provider, in which case the group may use a provider reference rather than manually listing every node. Keep your existing provider structure if it already works; add only the smallest necessary override.

Write rules for Chinese services without overmatching

Rules are evaluated from top to bottom. Once a connection matches a rule, later rules normally do not change that decision. Put specific exceptions before broad regional rules, and place MATCH last. A broad GEOIP,CN,China-Streaming rule near the top can capture far more traffic than expected, including shared CDNs, third-party APIs, and domains that happen to resolve to a Chinese address.

For known websites, domain rules are usually easier to understand and maintain. DOMAIN matches one exact domain, DOMAIN-SUFFIX matches the domain and its subdomains, and DOMAIN-KEYWORD is broader and should be used cautiously. Prefer a suffix rule when you know the service’s official domain. For example:

rules:
  - DOMAIN-SUFFIX,video.example.cn,China-Streaming
  - DOMAIN-SUFFIX,cloud.example.cn,China-Streaming
  - DOMAIN,login.example.cn,China-Streaming
  - DOMAIN-SUFFIX,university.example.edu,DIRECT
  - DOMAIN-SUFFIX,library.example.edu,DIRECT
  - MATCH,DIRECT

Replace the example domains with official domains confirmed from the service itself. Do not copy a large rule list from an unknown source without reviewing it. A rule provider can contain outdated domains, advertising domains, or broad entries that route unrelated traffic through the same node. For a small student setup, a short local list is often easier to audit than a large imported database.

GEOSITE,CN can be useful when the active Mihomo rule database is current and the service category is appropriate. It may cover many Chinese domains, but it does not know which sites require a mainland IP, and its result depends on the database contents. A typical broad rule might look like this:

rules:
  - RULE-SET,university-direct,DIRECT
  - GEOSITE,CN,China-Streaming
  - GEOIP,CN,China-Streaming,no-resolve
  - MATCH,DIRECT

Use a broad rule only after adding direct exceptions for services that should remain local. Also check whether your client supports the rule syntax and whether the referenced rule set has been downloaded. If a rule provider is unavailable, the client may skip it, report an error, or leave the traffic to a later rule. The connection log is the authoritative place to verify the actual matched rule.

Protect campus, banking, and local exceptions

University services deserve explicit direct rules even when they do not appear to be region-sensitive. Campus single sign-on, library authentication, research databases, and learning management systems may depend on local institutional access, device certificates, or a stable session. Add the university’s main domain and known subdomains to a direct rule set. If the institution publishes several separate domains, include each verified domain rather than relying only on a keyword such as university.

Local banking and payment services should also be tested carefully. A bank may accept a local connection but challenge a foreign or datacenter IP, or it may require a fixed region for fraud detection. If a bank does not explicitly require a China route, leave it on DIRECT. For Chinese banking and government services, a China proxy may solve a geographic availability issue but may also cause a security block. Do not repeatedly rotate nodes to defeat a block; use the provider’s official overseas access method or contact support.

Understand DNS and TUN behavior

Routing rules alone do not explain every result. DNS resolution, system proxy behavior, and TUN interception determine whether an application’s request reaches Clash and which information is used for matching. A browser using the system proxy may send HTTP and HTTPS requests into Clash, while a desktop application using its own DNS-over-HTTPS implementation may behave differently. A terminal program may ignore the operating system proxy entirely.

If you use TUN mode, more applications can be captured, including programs that do not support ordinary HTTP or SOCKS proxy settings. TUN requires elevated permissions and changes the way traffic enters the kernel. It can also affect campus VPNs, virtual machines, games, printers, and local discovery. Start with the system proxy when possible, then enable TUN only when a required application cannot use the local proxy. After enabling TUN, verify that local networks and private addresses remain direct.

Mihomo DNS settings often use fake-IP or redirection behavior to improve rule matching. The exact field names and support depend on the kernel version. Do not paste DNS blocks from unrelated tutorials without checking compatibility. A safe troubleshooting process is to change one DNS option at a time, reload the profile, and inspect both DNS logs and connection logs. If a domain is resolved outside the intended path, the resulting IP may cause an unexpected GEOIP match or a failed connection.

dns:
  enable: true
  enhanced-mode: fake-ip
  fake-ip-range: 198.18.0.1/16
  nameserver:
    - https://1.1.1.1/dns-query
    - https://dns.google/dns-query

The values above are illustrative and may not fit a university network, a local firewall, or your privacy requirements. Some networks block public DNS-over-HTTPS endpoints; some services behave differently when resolved through an overseas resolver. If campus access becomes unreliable after changing DNS, restore the previous DNS configuration first and determine whether the issue is name resolution, proxy routing, or the upstream service.

Test, document, and maintain the split-routing setup

After importing or editing the configuration, reload it and confirm that the client reports no YAML or provider errors. Select the intended China group manually before testing. Open one Chinese service, one campus service, and one ordinary international site. In the connection panel, inspect the domain, matched rule, selected policy, and final proxy node. A page loading successfully is not enough; the log should confirm that the request followed the intended route.

  1. Check the active profile and Mihomo or Clash core version.
  2. Confirm that the local listener is running, commonly on the client’s displayed mixed port.
  3. Test the campus domain and verify that it uses DIRECT.
  4. Test the Chinese service and verify that it uses China-Streaming.
  5. Check whether video playback, login, and secondary API requests use the same policy.
  6. Disable TUN or the system proxy separately when comparing behavior.
  7. Record the working node and rule rather than changing several settings at once.

Mobile applications may use additional domains for images, advertisements, authentication, telemetry, and media delivery. A page may open through the China group while the video CDN remains direct, causing playback failure. Conversely, forcing every related domain through a distant node can make the application slow. Watch the connection list while starting playback or submitting a form, then add only the missing official domains.

Review the setup after subscription updates, core upgrades, and changes to your university network. Check that the proxy group still contains usable nodes, rule providers still update, and the final fallback remains intentional. Keep a short record of custom rules, the date they were tested, and the reason for each exception. This makes it possible to remove obsolete entries instead of allowing a growing list of unexplained overrides.

A single rule-mode profile can therefore handle most daily student workflows abroad: local campus resources stay on the ordinary connection, selected Chinese services use a suitable mainland route, and unrelated traffic follows a deliberate fallback. The setup remains easier to audit when the rules are specific, the profile source is understood, and every important decision is confirmed in the Clash connection log.

Download Clash