Technical Manual / Protocol Guide
Clash Protocol and Core Reference
If you're installing for the first time or importing a subscription, start with the user guide to set up and verify your connection. This page is a technical reference: first confirm that the core can load the configuration, then check whether the protocol and transport suit your network, and finally test them with the apps you actually use.
01 / Read the protocol settings
How protocols, transports and clients fit together
The layers between your app and the remote server
In a client, Rule, Global and Direct modes determine which outbound route handles traffic—not which protocol the connection uses. In Rule mode, the core matches domains, addresses or other available information against policies, then the selected proxy group chooses the outbound route. System proxy and TUN settings sit further upstream and determine which traffic reaches the core. A browser may follow the system proxy while another app makes connections on its own. Different results don't mean a remote protocol is broken. Before comparing protocols, keep the access method and proxy group fixed so requests don't switch routes during testing.
Read a node configuration in three layers. First, the remote address, port and authentication details tell you where to connect and what credentials to use. Second, the transport and security settings describe how the connection is carried—for example, WebSocket over TCP, QUIC over UDP, or TLS to authenticate the remote server. Third, the proxy protocol defines how app traffic is forwarded, whether UDP packets are supported, how destination addresses are represented and how requests share an outer connection. A client may put all of these in one form, but they aren't interchangeable: changing the protocol doesn't generate matching credentials, and changing the transport doesn't make the server open a corresponding endpoint.
Use the comparison table to rule out incompatible options
| Protocol | Common transport | Check before connecting |
|---|---|---|
| Shadowsocks(SS) | Native TCP or UDP, depending on the use case and deployment | Cipher, key and plugin settings |
| VMess | Usually TCP or WebSocket, sometimes with TLS | User ID, time, transport and security settings |
| Trojan | Usually TLS over TCP | Password, server name and certificate |
| VLESS | TCP, WebSocket or another supported transport, depending on the deployment | User ID, security layer, flow control and transport |
| Hysteria2 | QUIC over UDP | UDP reachability, authentication, TLS and bandwidth settings |
| TUIC | QUIC over UDP | Protocol version, credentials, TLS and UDP forwarding mode |
When someone says “UDP is supported,” ask which layer they mean. Trojan can forward an app's UDP packets over a typical TLS byte stream, while the outer connection on the local network may still use TCP. Hysteria2 relies on UDP between the client and proxy server even when you're browsing ordinary TCP-based websites. If your network can't reliably send UDP to the server, Hysteria2 may fail during the handshake. Conversely, a successful outer QUIC connection doesn't prove that an app's packets reached the proxy. Test access, the outer connection and the destination side separately; success at one stage doesn't mean the whole path works.
Trace failures in connection order
Start troubleshooting with configuration parsing. If the configuration won't load, speed tests are beside the point; check the fields, indentation, protocol names and core capabilities first. If it loads but no valid request has been sent, distinguish endpoint DNS resolution from local access issues. Once a handshake begins, check port reachability, certificates, system time and authentication. Only then investigate whether the remote server can reach the destination. Record both a working comparison route and the stage where the failure occurs, then retry against the same destination around the same time. A browser timeout alone can't tell you whether traffic wasn't intercepted locally, never reached the remote server or simply got a slow response from the destination.
02 / Encrypted proxies and authenticated sessions
Shadowsocks and VMess
Shadowsocks: check the cipher and key format first
Shadowsocks was designed as a lightweight encrypted proxy, with a small protocol stack for relaying destination addresses and app traffic through a remote server. Common classic AEAD ciphers combine encryption with integrity protection; native deployments can handle streams and datagrams without adding a TLS layer. Its small set of settings makes it a useful baseline for configuration and resource use, but fewer settings don't mean every deployment works the same way. Plugins add their own transport requirements, and a local toggle can't provide UDP if the server only accepts TCP. When comparing results, first check whether you're testing native SS or a setup layered with a plugin.
Enter the cipher and key exactly as provided. Classic AEAD ciphers often derive a key from a password. Common Shadowsocks 2022 ciphers require a preshared key of a specific length and format; you can't replace it with an ordinary password from an older node. Even if the client labels the field “password,” its meaning depends on the cipher. After importing, check that the cipher and plugin names were preserved, and never include a key in troubleshooting screenshots. If both ends support only a subset of maintained ciphers, choose from that overlap rather than renaming an unfamiliar cipher to something that looks similar.
A failed SS connection may simply close without a clear authentication error. After confirming the address and port, check the cipher, key source and matching server endpoint, then inspect the plugin settings and listener. If browsing works but an app using datagrams times out, first confirm the client is intercepting that app's traffic. Then check that UDP is enabled in the client, accepted by the server and allowed by the network in between. Don't change the port, key and plugin all at once; changing one thing at a time lets you identify which condition restored the connection.
VMess: separate protocol authentication from the outer transport
VMess emerged from the V2Ray ecosystem, with user-ID-based authentication, request encapsulation and payload protection. It can use a range of outer transports common at the time, from a direct byte stream to WebSocket, with TLS enabled where the deployment requires it. Copying only the user ID doesn't recreate the node's full behavior; the transport type, path and related host fields are part of the configuration too. Connecting with a basic transport to an endpoint that requires a specific path will often fail before the proxy protocol can authenticate.
VMess authentication is sensitive to clock skew. If a device has been asleep for a long time, had its battery replaced or has automatic time sync disabled, check that its clock matches a trusted time source—not just that the displayed time zone looks right. Older subscriptions may also contain legacy ID settings; modern AEAD configurations typically use alterId: 0, but follow the valid parameters provided by the server. If the current core rejects an old configuration, request an up-to-date one rather than cycling through parameters from different generations. With TLS enabled on the outer transport, an incorrect clock can also make a valid certificate appear not yet valid or expired.
If both setups can load websites, differences between native SS and VMess over WebSocket may come from the outer handshake, relay path or access server—not the cipher itself. On older devices, hardware acceleration and how efficiently the client handles buffers can also change battery-use results. If you need to keep an existing service working, start with a supported endpoint that's already reliable. For a new setup, establish a baseline with the same tasks, then check whether a more complex transport solves a specific access problem. Adding another transport layer won't make chat messages arrive faster or reduce load on the remote server by itself.
03 / Authentication and security layers
Trojan and VLESS
Trojan: check TLS before the password
A common Trojan setup carries proxy requests over a TLS connection. Standard certificates and encryption protect the outer connection, while the proxy layer checks the password and specifies the destination. Its configuration is often more straightforward than a node combining several transports, but the server address, TLS server name and destination website are three different things. The first tells the client where to connect; the second is used for the handshake and certificate verification; the third is the site the app wants to reach. If the configuration dials one address but verifies another valid name, follow the deployment instructions. Don't put the website you're visiting into a domain field just because it asks for a name.
If the error mentions an expired certificate, hostname mismatch or untrusted issuer, first check the system time, endpoint, certificate names and trust chain. Then check whether the client is using the dial address as the server name when the provider specifies a separate verification name. Focus on the Trojan password or proxy endpoint only after TLS is established and the remote identity is verified. Don't disable certificate checks as a substitute: that only stops the client from verifying who it's connected to. If the browser and client show different warnings, see Troubleshooting HTTPS certificate errors to identify which part of the connection failed.
Trojan can carry UDP at the protocol layer, but common deployments put that traffic inside a reliable TLS byte stream. When packets are lost underneath, retransmission of one segment can delay later data on the same connection. That's part of reliable delivery for a file download, but waiting for retransmission can be more noticeable than an occasional dropped packet for a voice packet that's already out of date. If websites work but calls stutter, first confirm that the calling app uses this outbound route, then test the call itself. A successful browser handshake or a connected icon can't tell you whether UDP traffic will be equally reliable.
VLESS: match authentication, transport and flow control separately
VLESS grew out of experiments in the V2Ray ecosystem to simplify the proxy layer. Common deployments authenticate with a user ID and typically rely on a separate security layer to protect the connection. In common configurations, encryption=none means the VLESS layer adds no encryption; it doesn't mean the entire connection is unencrypted, nor does it prove that a security layer is enabled. When checking a node, identify its security mode, transport and flow control separately. Subscription links can pack these parameters together, while the imported client may put them in two or three different menus. Check the parsed configuration when comparing nodes.
For example, a WebSocket endpoint requires matching transport types and paths on both ends; some deployments also require the correct request host. An endpoint that supports a particular flow-control mode must use a transport and security setup compatible with that mode. These aren't alternate names for the same set of options, and you can't copy a flow-control value from one node to a different transport. A subscription with newer security or transport settings may not work fully even if the client lists VLESS support. “Supports VLESS” may only mean the client has a basic VLESS implementation; it doesn't guarantee that every combination in the subscription will work.
When migrating, use a node known to work in a known-good environment as your baseline, not the whole subscription. First make sure the new client preserves the advanced fields supplied by the server. Then check whether its logs distinguish a dial failure, TLS failure and rejected proxy session. If the GUI doesn't show advanced settings, check whether it can export the effective configuration or compare the combination against the core's documentation. Don't rule out a compatibility issue just because another node using the same protocol works: they may share a protocol name but use entirely different outer transports and handshake requirements.
04 / UDP transports and congestion control
Hysteria2 and TUIC
Both use QUIC, but their protocol settings aren't interchangeable
Hysteria2 and TUIC can both carry proxy sessions over QUIC on UDP. QUIC combines the handshake, security and multiplexed streams. Unlike multiple requests sharing a single TCP byte stream, separate reliable streams on one QUIC connection don't all have to wait for the same missing bytes. Packet loss still triggers recovery, however, and congestion control affects the sending rate available to the whole connection. Whether datagrams are retransmitted also depends on the forwarding mode. Understanding this distinction helps explain why an endpoint might handle concurrent requests more smoothly yet offer no clear advantage on a single long connection or over the same Wi-Fi signal.
Connectivity comes first. Home broadband, hotel Wi-Fi, corporate networks and mobile data may handle long-lived UDP sessions differently. If the connection times out immediately, distinguish an unreachable server port from a failed TLS handshake or rejected credentials. If it drops after sitting idle and resumes when you send another request, consider address-mapping timeouts, Wi-Fi sleep and network changes. A successful handshake doesn't prove that the connection will stay up, and a brief failure doesn't automatically point to the protocol. Test the same node on controlled Wi-Fi and cellular connections and see whether the failure follows the network.
Hysteria2: check stability before measuring speed
Hysteria2 builds on Hysteria's approach to proxying over high-latency or lossy links. It's worth considering when bandwidth is available but a long-distance path makes it hard to use consistently with conventional transports. Some congestion-control modes use configured upload and download bandwidth values. These values are inputs to transport control, not speeds promised by your ISP. The available modes also depend on the configuration at both ends. Hysteria and Hysteria2 settings aren't interchangeable just because the names are similar; preserve the authentication and TLS parameters supplied by the server too.
Start with the provider's recommended settings. Check for stable transfers on an otherwise idle network, then repeat while other devices are using it. If higher bandwidth settings produce a slightly faster download peak but more timeouts on interactive requests or noticeably worse calls, that's not an improvement. An unrealistic target rate can build up queued data, increase latency and crowd out other sessions. Cellular upload and download conditions can vary independently, so assess sustained performance in each direction instead of treating a brief speed peak as a long-term setting.
TUIC: check the protocol version and forwarding mode
TUIC handles requests from different apps over a QUIC session and defines how UDP traffic is forwarded. Before configuring it, confirm that the server and client implement the same protocol version. For a common v5 setup, authentication usually requires a user ID and password; an older configuration's single authentication field isn't a substitute. Some implementations can carry UDP payloads as QUIC datagrams or relay them over reliable streams. These modes differ in packet loss, queuing and delivery timing. Check which modes both ends support, then compare real-world performance for calls, games or browsing rather than assuming one mode suits every app.
Don't choose between the two protocols based only on a latency button. It usually sends an application-level probe, whose result depends on the test address, connection reuse and current load; it doesn't measure sustained throughput or mobility. If you need to switch between Wi-Fi and cellular, test separately whether existing sessions survive the transition. QUIC has mechanisms related to connection migration, but practical results depend on the implementation, path validation and how the operating system handles network access. For work that can't tolerate dropped calls, keep a tested TCP-based endpoint available rather than assuming any QUIC proxy will switch networks seamlessly.
05 / Measuring trade-offs
Connection speed, resource use and battery life
Measure initial connection, sustained transfer and idle behavior separately
Connection speed includes at least three things: time to connect, time to receive the first data and sustained transfer speed. Short web requests depend more on the first two; large downloads rely more on the last. Meetings and interactive services are also affected by occasional requests that take unusually long. A cold start involves resolving the endpoint and completing the outer connection and proxy handshake. An existing session may reuse its connection and skip some of that work. Before saying one feels “faster,” note the task and connection state. A protocol may do well when you reopen pages but perform worse after a device wakes from sleep; averaging the two can hide the issue that matters.
For a fair comparison, keep the client, core, device network, destination and outbound route the same. Testing two protocol endpoints on the same server is especially useful. Turn off automatic proxy-group switching, avoid background sync, and alternate between candidates during nearby time windows instead of always testing one later. Use the same resource for downloads and record completion time, failures and retries. For short requests, distinguish first visits from repeat visits. You don't need a perfect score in every test; focus on weaknesses that affect your work. A faster download may still be a poor choice for everyday use if service connections time out frequently.
Assess CPU and memory across the whole path
There's no fixed ranking for resource use. Encryption costs depend on the device's instruction set, algorithm implementation and data volume. Rule sets, DNS caches, concurrent connections and buffers also use memory. Testing only a browser through the system proxy generally creates a different load from routing multiple apps through TUN. Connection logs, traffic graphs and background health checks in the GUI can consume resources too. To isolate the cost, give both candidates the same rules and access mode, then test idle use, normal interaction and sustained transfer separately. Don't attribute a change in the GUI process to the proxy protocol without checking the rest of the setup.
When monitoring CPU usage, account for how long it takes to complete the same task. A download that uses slightly more CPU but finishes quickly may use less power than one that runs much longer at lower CPU usage. For memory, distinguish peaks during a burst of connections from the idle baseline afterward. Mobile operating systems may pause a proxy process under memory pressure or background-app policies; a reconnect in that case doesn't mean the remote server failed. If slowdowns occur only with a large rule set, hold the protocol constant and try a smaller, legitimate test configuration to check the cost of loading and matching rules. Don't use a protocol change to mask problems caused by rule volume or update frequency.
Test phones with the screen off and under weak signal
Mobile battery use isn't just about encryption. Waking the radio, sending probes, maintaining connections and retransmitting data all consume power. Small but frequent background checks can interrupt sleep more than one sustained transfer. When comparing two setups, keep signal conditions, screen state, foreground and background apps, and test duration as similar as possible. Check both screen-on activity and screen-off standby. The system battery panel is useful for spotting trends, but it may attribute some wireless activity to the system instead of the client. Short-term battery percentages are also too coarse, so repeat tests to rule out random variation.
If standby drain seems unusually high, first check for overly frequent proxy-group checks, subscription retries or keepalives, and repeated reconnects in weak-signal areas. For devices that don't need continuous calls or real-time push notifications, reducing background check frequency may be a better first step than switching protocols. For apps that must stay immediately available, also measure reconnect time. Either way, distinguish the path from your device to the endpoint from the path between the endpoint and the service. For more step-by-step checks, see Troubleshooting nodes, routes and local settings.
06 / Core capabilities and DNS resolution
Original Clash, Meta and mihomo
Identify the actual core, not just the app name
Original Clash established a configuration structure that many later clients still use: outbound nodes, proxy groups, ordered rules and local proxy ports. Clash.Meta extended that approach as a derivative core, and development continued under the name mihomo, adding more protocols and transport combinations as well as DNS, rule and traffic-interception capabilities. Similar structures mean that some common rules can be migrated, not that every file is compatible. An older core may reject protocols, DNS options or rule behavior introduced later—or fail to apply them as intended.
The names of the app, subscription and core don't always match. A client labeled Clash may actually run mihomo; a name containing Meta doesn't guarantee that it includes every capability added to mihomo later. For a new installation, check the available builds by platform in the download center, and consider Clash Plus if there's a build for your platform. After choosing an app, confirm the running component in its About page, core information or startup logs. A GUI client may also merge configuration before launch, so the file you edit may differ from what the core ultimately reads. When comparing two devices, record both the app and the actual core—not just the name shown in the interface.
Verify the local proxy with a minimal configuration
If you run into migration issues, save the following configuration in a separate directory as local-direct.yaml. It doesn't depend on a subscription or remote node: it exposes a local mixed proxy port and sends requests directly according to its rules. Before testing, make sure another client isn't already using that port, and don't overwrite your everyday configuration. If you have a standalone mihomo binary, have the core validate the file first, then start it using the commands for your current terminal environment. This lets you check configuration parsing and the local listener separately from remote protocols—an ideal first test after changing cores.
mixed-port: 7890
allow-lan: false
mode: rule
rules:
- MATCH,DIRECT
mihomo -t -f ./local-direct.yaml
mihomo -f ./local-direct.yaml
This assumes mihomo is available in your command path. Once it's running, explicitly set the local HTTP proxy in another terminal and send a request with curl --proxy http://127.0.0.1:7890 https://example.com/. A successful request confirms only that the local proxy and direct access work. It doesn't confirm that the system proxy is configured or that a remote subscription is compatible. Stop the standalone process when you're done, then enable your everyday configuration. If the test passes but your everyday setup fails, restore the node, proxy group and rules separately. Mismatched group references or an incorrect fallback rule often become clear this way.
Fake-IP: helps identify domains; it's not a proxy protocol
In cores that support it, Fake-IP returns a managed placeholder address to an app and stores its mapping to the domain. When the app's traffic later reaches the core, that mapping can be used to recover the destination domain and apply domain-based rules. Fake-IP doesn't change the remote node type or make arbitrary traffic enter TUN by itself. Apps that need a real address for local network discovery, validation or external communication may not work as expected with a placeholder response. Try a filter setting for the specific domain and use case before reconfiguring the entire DNS setup.
Check resolution for the node endpoint and destination domain separately. The proxy has to connect to its own server first; routing the DNS request needed to resolve that server through the same proxy connection can create a startup dependency. Handle destination domains according to your DNS and routing policies, and don't treat a DNS result as proof that the actual request works. After changing DNS modes, apps and the operating system may still have old results cached. Let them expire or clear them using the system's recommended method before testing. If only certain apps are affected, check whether they resolve names themselves, whether their traffic passes through the core and whether the rules match domains or IP addresses.
07 / Configuration files and import methods
Subscription formats and configuration compatibility
The same-looking URL doesn't guarantee the same response
A subscription link is just a way to retrieve content. It may return a complete Clash-style configuration, a YAML file containing only nodes, one share link per line or an encoded list of links. A full configuration usually includes proxy groups, rules, DNS and local settings; a node list doesn't define how traffic is routed on your device. Some providers return different formats based on request parameters or client identifiers, so a browser download may not match what the app retrieves. Use the format the provider specifies for your client or core; a file extension alone doesn't define its contents.
Checking the import method is more useful than trying different file extensions. A client's main configuration importer needs a structure it can load as a main configuration. Proxy providers are usually referenced from an existing main configuration, while a single-node share link needs an importer that recognizes its protocol. Even valid YAML may lack the references a main configuration requires. If the list is empty after an update, first check whether the response contains the expected format, a sign-in page or an error; then check the node fields and proxy-group references. A subscription marked as updated only confirms that some retrieval or save step succeeded—not that every node can connect.
During migration, separate delivery, parsing and runtime checks
At the delivery layer, check the link and update response. At the parsing layer, check the file structure, field names and types, and core support. Only at runtime should you check the server handshake and actual results. Mixing these stages makes it easy to refresh a subscription repeatedly after a timeout, or assume every parameter is present because node names appear in the list. A common issue is an importer preserving basic node details but failing to recognize a flow-control setting or UDP-forwarding field. The node may appear in the interface even though the resulting connection no longer uses the original combination. Without exposing credentials, compare the effective configuration's protocol, transport, security fields and policy references—not just node names.
Before moving to another client, back up your everyday settings separately from the subscription source. Import one known-good endpoint first and use a simple rule to open the same destination. Then restore your custom rules, proxy groups, DNS and traffic-interception settings. If the nodes test successfully but Rule mode behaves differently, check group names, rule order, the final fallback and any extra policies the client adds automatically. Copying an entire configuration can also bring device-specific network interfaces, file paths or control settings that won't work on another device. Keeping the shared node source separate from local overrides makes future troubleshooting easier.
Subscription updates and credential management
Treat subscription URLs and their responses as credentials. Don't share complete links when exporting; redact query parameters and node authentication fields in screenshots. If you need help troubleshooting, share only the protocol type, error category and configuration structure with sensitive values removed. Avoid sending a full link to an untrusted conversion service. If the source format really isn't compatible, ask the provider for the format you need. Conversion is worthwhile only if you can confirm it preserves the required fields and the environment is trusted. Be sure to check the most complex node again—not just a basic type that's already working.
Set update intervals based on how often the configuration changes and what you actually need; frequent downloads don't make the list more useful. Keep automatic updates separate from local edits, and find out whether a new file replaces the full configuration or only refreshes provider content. If a just-updated subscription stops working, switch back temporarily to the last known-good local copy and compare its structure and references. If both copies fail, check your network and the provider's status. For import steps, see Importing a subscription link. For configuration layers and backups across devices, see Clash Multi-Device Sync.
08 / Protocol selection checklist
Choosing a protocol and common questions
Meet compatibility requirements before choosing a primary endpoint
For desktop browsing, documents and messaging, start with an endpoint whose settings have a clear source and that stays reliable over several visits. If you already have a maintained SS endpoint or a Trojan setup with a valid certificate, use one as a baseline. If the provider offers only VMess or VLESS, keep its full transport and security combination intact; there's no need to change settings just to use a different protocol type. If your current route works well, the reason to switch should be a specific shortcoming—such as reducing repeated handshakes for interactive use or improving compatibility when replacing a device—not a lower number in a single probe.
For large file transfers over a high-latency connection, compare Hysteria2 and TUIC after confirming that UDP works, and keep your existing TCP endpoint as a baseline. Run a long enough transfer to see whether it stays stable toward the end, while checking for queuing during browsing or remote desktop use. For voice calls or games, first confirm that the app is intercepted and that the full path supports the required forwarding. Then judge the result by the actual call or interaction. A test URL in a browser measures just one request; it can't replace an app's real-world sensitivity to latency spikes and brief packet loss.
If your phone regularly switches between Wi-Fi and cellular, keep two tested endpoints: one that stays reliable on the networks you use most and another you can switch to manually if UDP becomes unreliable or a route fails. If you can't find a suitable option, narrow the test to one device, one destination and one access method. It's hard to diagnose causes while automatic speed tests, proxy groups and multiple overrides are all active. If several devices at home share the same connection, test again while everyone is using the network; the best result when one device has the bandwidth to itself may affect the others.
Keep a baseline configuration
After choosing a protocol, record the conditions needed to reproduce your result: which device and core you used, how traffic was intercepted, and which endpoint passed which test on which network. Don't save credentials. Keep this baseline separate from your everyday configuration. After updating a core or subscription, rerun a short test first, then a long transfer and standby test. If an upgrade adds a new protocol, you don't need to replace your rules and DNS at the same time. Keeping the old route makes it easier to tell whether the new capability actually helps—and to restore a proven setup when work depends on it.
Protocol selection FAQs
Can I change a node to a different protocol in the client?
Not by changing the type alone. You can create a node with a different protocol only if the server provides a separate endpoint and all the required settings. Even if the address and port are the same, that doesn't mean the authentication and handshake are. If your provider offers multiple endpoints, import and test each one separately. Keep at least one working route before changing the default proxy group.
Websites work, but voice calls don't. Should I switch protocols first?
First confirm that the voice app's traffic reaches the client, then check local access, the proxy group and UDP support at the remote endpoint. If only the system proxy is enabled, a browser working doesn't prove the voice app uses the same route. Once you've confirmed that, compare two known-good endpoints that support the app's requirements to determine whether the issue is local interception, the outer transport or the service itself.
I've chosen a protocol. Where do I go to install the client?
Start with the client selection guide to check that the client supports the protocol combination and features you need, then choose a client for your operating system in the download center. After installation, follow the user guide to import your configuration, choose a mode and verify the connection. If the basic setup works but a specific task still fails, return to the relevant protocol, core or subscription section on this page.