A technical guide to Clash protocols and the mihomo core
New to Clash? Start with the three steps in the Getting Started guide: download a client, import a subscription, and enable the system proxy. Already connected and wondering which protocol to use, or why the same subscription behaves differently on two devices? Use the sections below to find the answer.
Comparing protocol speed and resource use
Separate the protocol, transport, and traffic-routing method
The protocol shown in a node’s details determines how the client authenticates with the server and encapsulates requests. The transport determines how that data travels—for example, directly over TCP or over WebSocket. Security layers such as TLS protect the connection or verify the server’s identity. These layers can be combined, but node cards often emphasize only the protocol. Two nodes with the same label may use very different connection setups. When comparing them, note the transport, security layer, and server entry point as well.
System proxy and TUN settings determine which traffic reaches the client. Applications typically need to honor the system proxy; TUN uses a virtual network interface and routing rules to capture traffic. If a browser works but another app cannot connect, first check whether both requests take the same route, then look at the protocol. Use the client’s connections page to see which rule and policy handled a request. If the request never appears, start by checking the traffic-capture scope. Changing protocols cannot fix a request that never reached the client.
Use time to first byte for short requests and sustained throughput for long transfers
A speed-test button often requests a tiny probe URL. Its result may include DNS lookup, handshake, and server response time—or reuse an existing connection. Clients use different implementations and test endpoints, so their numbers are not necessarily comparable. For workloads with many short requests, compare the first page load with subsequent loads. For large downloads, check whether speed holds steady after the initial burst. For calls, pay closer attention to brief freezes, dropouts, and recovery time: adequate average bandwidth does not guarantee stable audio.
For a fair comparison, use the same device, network, and destination, and choose endpoints in similar locations where possible. Alternate between test runs instead of testing one option in the morning and another at peak time. Record new and reused connections separately, and keep browser cache and download concurrency settings consistent. Server bandwidth, queueing, and congestion vary over time. If candidate nodes use different data centers, report which route works better for that task—not a conclusion about the protocol as a whole.
| What to measure | How to compare | Factors that can skew results |
|---|---|---|
| Cold start | Reconnect, request the same destination, and record how long it takes to become usable. | DNS cache, session resumption, distance to the entry point |
| Sustained throughput | Transfer the same large file and compare steady-state speed and interruptions. | Server-side limits, download concurrency, Wi-Fi signal |
| Packet loss and jitter | Run the same task on the same network and note noticeable freezes and recovery. | Crowded access point, uplink and downlink queueing, network handoffs |
| Device load | Compare CPU, memory, and background wakeups under the same workload. | Rule sets, GUI, speed-test frequency |
Only compare overhead under the same workload
Encryption, handshakes, connection scheduling, and packet processing all use CPU. Memory is also needed for connection buffers, rules, and DNS caches. To measure usage, note the idle baseline, then hold the number of requests or amount of data constant and check both steady-state use and short peaks. A single process-list reading can mistake a temporary spike while loading rules for ongoing overhead. On lower-end devices, repeat the test with the same rules: rule sets and connection buffers compete with foreground apps for memory.
Shadowsocks and VMess: different design trade-offs
Shadowsocks: a compact configuration with fewer layers
Often abbreviated to SS, Shadowsocks began as a lightweight encrypted proxy. An app sends a request to the local proxy; the client encapsulates the destination and data according to the protocol, and the server makes the onward connection. A common direct setup does not add another WebSocket or TLS layer, making it a useful baseline for measuring a straightforward route. “Lightweight” here means fewer layers in the connection—not zero overhead. Plugins, higher concurrency, and a slower processor can all change the result.
After importing a node, check the encryption method—not just the address. Legacy stream ciphers, common AEAD methods, and the newer AEAD-2022 family are different; support for one does not guarantee support for another. Some methods also require a specific key format and length. When importing a server-provided config, keep its values unchanged. If you change only the client’s encryption setting, the two ends will process the same data differently. If the node specifies a plugin, its parameters must come along too. Some importers read the SS details but skip an unrecognized plugin field, leaving a visible node that cannot connect.
Check UDP traffic from apps separately. If you can browse over SS, that only confirms the relevant TCP request path works. For an app’s UDP traffic to pass, the local capture method, client implementation, server forwarding, and network must all support the path. First confirm that the client is capturing the app, then test in that app; a browser speed test is no substitute for voice or game traffic. When moving an old config to a new device, it is easy to overlook the traffic-capture settings from the original device.
VMess: protocol identity and transport are separate choices
VMess comes from the V2Ray ecosystem. Its design incorporates user authentication and proxy-data encapsulation into the protocol. Common configs use a UUID to identify the user, along with an underlying transport. When connecting to an existing server, check the transport type as well as the address and port. With WebSocket, the reverse proxy path and host field may affect routing; with TLS, the server name must match the certificate setup. Two nodes labeled with the same protocol do not necessarily share paths or security parameters.
If a node works on one device but not another, first check whether automatic date and time are enabled. Clock skew can affect VMess authentication and make a certificate appear not yet valid or expired. Next, check whether the subscription carried legacy fields into the new client, such as alterId in older configs. Modern AEAD configs typically use a zero value. If the server depends on an older mechanism, verify what it supports instead of trying random values while switching clients.
Choose an option your existing server fully supports
If you already have a stable SS server, it often has fewer fields and a more straightforward setup to troubleshoot. If you have an established VMess deployment with a reverse proxy, keeping its existing transport settings is usually easier than rebuilding the server to remove a layer. When comparing overhead, check whether you are testing direct SS against VMess over WebSocket and TLS. The results reflect two deployment setups—not just the protocol headers. Multiple short connections can also behave differently from one sustained download.
Keep one working node, then duplicate its config and test changes on the copy. If parsing fails, check field names and types. If parsing succeeds but the connection fails, check the entry point, authentication, and transport. If only certain sites fail, look at rules and DNS. Record these symptoms separately. Change one layer at a time so you know what to undo, and avoid experimenting with a subscription that is still in use.
Trojan and VLESS: transport and security layers
Trojan: establish TLS before handling proxy requests
The classic Trojan design carries authentication and proxy data inside a TLS connection, using a mature TLS implementation to protect traffic. The password in the config authenticates to the proxy; the certificate and server name confirm that the connection reached the expected server. These checks serve different purposes: a correct password cannot fix a certificate error, and a valid certificate does not prove the password is right. If TLS negotiation fails, check the server name, certificate chain, and system clock first, then check whether the proxy accepts the credentials.
The most common mix-up is the entry-point address versus the TLS server name. The entry-point address is the actual dial target; the server name is used during the handshake and usually for certificate validation. If the service explicitly allows connecting to one address while requiring a different name, enter each value in the correct field. For certificate errors, check whether the domain changed, the server renewed its certificate, or the device clock is accurate. Disabling certificate validation hides identity problems. Keep validation enabled while troubleshooting, and ask the provider to confirm the correct name and certificate chain.
Besides the traditional direct TLS setup, some clients support Trojan nodes with other transports. If you see a path, host field, or application-protocol negotiation setting, check which fields the selected transport requires; do not copy them blindly from another node. A web page appearing when you visit the entry point only confirms that the page request got a response. It does not prove the proxy route or authentication works. Test through the current client and check the core logs to see where the connection fails.
VLESS: proxy encapsulation and connection security have separate roles
VLESS evolved in the V2Ray and Xray ecosystems. Compared with VMess, its design focuses on lighter proxy encapsulation and transport combinations. The common setting encryption: none applies at the VLESS layer; it does not, by itself, tell you whether the full connection is encrypted. Check the outer security mechanism as well. When importing a subscription, review the protocol, transport, security layer, and flow-control fields together. Copying only the address, port, and user ID from a share link can leave out the settings that determine whether the handshake succeeds.
For example, if a node specifies TLS, REALITY, or a flow-control setting, the client’s core must support that combination—not merely list VLESS as an option. Flow-control settings must match the server; they are not generic speed boosters. When switching clients, check the active core and import result to make sure those parameters remain intact. If the node is selectable but disconnects immediately, note when the error occurs and narrow it down to the handshake, authentication, or transport layer. If the logs show only a timeout, also check whether the basic network can reach the entry point.
Evaluate handshake overhead in the context of your workload
Connection setup and handshake time can dominate small requests. Sustained transfers depend more on link quality, server capacity, and data-processing speed. Trojan and VLESS may use similar reliable transports and security layers in some deployments—or very different combinations in others. Protocol names alone do not predict a fixed speed ranking. Whether session resumption helps depends on the client and server configuration and whether the entry point changes. If connections seem to be re-established frequently, first check whether the app is closing them; do not assume the protocol is responsible.
Hysteria2 and TUIC: two QUIC-based options
Shared requirement: a working UDP path to the server
Both Hysteria2 and TUIC are built on QUIC over UDP. QUIC combines handshaking, encryption, and stream management in one transport. If packet loss delays retransmission on one stream, other independent streams may still progress. They still share the connection’s congestion control and available bandwidth, so packet loss can cause pauses and retransmissions. UDP here refers first to the outer path from client to server; it is separate from whether the app itself sends UDP. Even ordinary web browsing in a browser may rely on a UDP-based entry point underneath.
The same network can handle different transports very differently. If a node connects over a phone hotspot but times out on office Wi-Fi, test a known-working TCP entry point on both networks, then check the QUIC service’s port, address, and status. One timeout is not enough to conclude that UDP is blocked; a bad certificate, incorrect credentials, or wrong address can cause the same symptom. First establish whether the issue is limited to one network, then whether it affects only one transport setup.
Hysteria2: consider throughput goals alongside the actual connection
Hysteria2 is designed with performance over high-latency, lossy links in mind. End-to-end implementations may support congestion-control approaches that set a sending target based on bandwidth information, or use other approaches depending on the config and server policy. Interpret the client’s upload and download bandwidth hints from the client’s perspective: upload is data sent to the server, download is data received from it. An access line’s advertised rate describes only one segment. End-to-end throughput also depends on the server and the links in between, so do not copy the advertised rate straight into the config.
An overly aggressive bandwidth target can make a download start quickly while queueing slows other apps and busy periods cause more retransmissions. Start with the service’s recommendations, then use reliably achievable speeds as a reference and test both idle and concurrent workloads. If both ends have adjustable settings, return one end to a known-working setup first so throughput issues do not get mixed up with compatibility problems. Do not treat older nodes labeled Hysteria as Hysteria2; confirm the exact protocol type in the subscription.
TUIC: check the implementation generation and forwarding method
TUIC also uses QUIC and is designed to support both reliable proxy streams and forwarding for app UDP traffic. The forwarding methods available depend on the implementations at both ends and the protocol generation. Seeing a node with the same name in the import screen does not prove the client preserved its authentication fields or UDP forwarding settings. For migration, first check which combinations the core supports, then use the original server config to test a short request. Finally, test with an app that uses datagrams. Some use cases need low jitter; others are more sensitive to data loss. Choose what to measure based on the workload.
QUIC handshake resumption and connection migration have prerequisites. If a device switches from Wi-Fi to cellular, whether the proxy session survives depends on how the client handles network changes, whether the server supports migration, and how much interruption the app tolerates. Do not choose a mobile setup based on a single stationary download. Where network switching is allowed, record how long it takes to become usable again and compare it with a reliable TCP setup. Prioritize networks you use every day; treat one-off peak speeds as secondary.
Original Clash, Clash Meta, and mihomo
The client provides the interface; the core runs the config
Original Clash established the familiar structure of ports, proxy groups, and rules. Clash Meta extended that config family, and the project was later renamed mihomo. Subscription pages, config filenames, and client labels may still use “Meta.” When you see the old name, check whether it refers to a config format, a core project, or a client. Changing themes or switching to a similar-looking client is not the same as changing the core that actually loads the config.
To check feature support, start with the client’s core details and runtime logs, then consult the documentation for that core. Distinguish what comes with the installer, what the client lets you switch to, and what is running right now. Common protocols and basic rules from the original Clash config family are still usable in many configs. For VLESS, Hysteria2, TUIC, and specific transport extensions, confirm support in the active core. A subscription advertised as “for the latest version” is too vague; look for an import option intended for a specific client or core.
Migration order: syntax, references, then real traffic
Keep a copy of the original config and a record of the client settings that work. In the YAML, start with listener ports, external control, rules, and proxy groups. If the GUI merges or overrides settings during load, check the final effective config as well. If another instance already occupies a port, resolve the conflict before assuming the old node is broken. Every policy group named in a rule, every node referenced by a proxy group, and every rule-set name must exist in the corresponding place. A subscription update that only renames a group can still break references.
Next, check DNS, TUN, and rule sets. A change in DNS mode affects how domains are resolved and which domain information the core can see when matching rules. TUN involves system routes and permissions; a config that parses does not mean the system allows traffic capture. During migration, start with a minimal system-proxy test, then restore the features you need one at a time. For legacy rule-set fields, check the core’s supported behavior, file format, and cache path. The concepts may be similar while the field details differ.
Verify local listeners with a minimal config
This YAML only forwards traffic directly. Use it to confirm that the core can read the config and provide local HTTP and SOCKS listeners. It contains no real nodes. Save it as config.yaml, then run mihomo -t -f config.yaml in a terminal where mihomo is available to check the config. If it passes, start it with mihomo -f config.yaml. If an existing client is using the ports, close that instance or choose free ports. Stop the process when the test is done, then return to your original config.
mixed-port: 7890
allow-lan: false
mode: rule
rules:
- MATCH,DIRECT
A passing test only means the config check found no blocking issues; it says nothing about whether a remote node works. After startup, verify the actual listening address and ports. When migrating a real subscription, first get one known app working, then restore proxy groups, rule sets, and traffic capture step by step. For where each section goes, see A breakdown of the Clash YAML config structure. To trace where the extensions came from, see mihomo vs. the original Clash core.
Subscription formats, field mapping, and updates
First identify what kind of data you received
“Subscription” means a client can fetch data from a URL; it does not specify the format of that data. A full Clash YAML often includes proxy nodes, groups, and rules. A provider’s node-provider file may contain only a list of nodes for a config to reference. Another type of subscription returns one share link per line, or Base64-encodes the whole list. A single share link describes connection details for one node; it does not include a complete set of routing rules. A client that accepts one input format may not accept another.
Import screens usually put full configs under “Config” or “Subscription”; some clients have a separate option for importing a single node. A node-provider file is meant for proxy groups in an existing config. Importing it alone will not recreate the original traffic routing. After seeing an “Update successful” message, check whether the active config changed, whether the groups contain entries, and which node is selected in the current group. Sometimes the new file downloads but the client still uses the old config—or rules send the target app through a direct route—making the update appear to have failed.
Format conversion is most likely to lose combination-specific settings
Two tools recognizing the same node type does not mean they support the same transport options. Names, entry-point addresses, and ports usually migrate easily. Paths, certificate names, UDP toggles, flow control, and plugin fields may be lost if the target format has no mapping for them. If the result fails for only one type of node, compare that node field by field before and after conversion, and confirm the core supports the combination. Repeatedly converting between formats only makes the source of the problem harder to track.
Subscription URLs may contain access credentials; treat them as private. If you need to convert a subscription, first check whether the provider offers a direct option for your current core. If you must inspect the original data, do so locally—never post the full URL publicly. When asking for help with logs, keep the protocol name, failure stage, and traffic-capture method, but redact access parameters in the URL, node credentials, and any entry points you do not want to disclose. Check the address bar, QR codes, and clipboard previews in screenshots too.
Troubleshoot in four stages: download, parse, load, connect
For the download stage, check the status and response type. An authorization error may mean you need to ask the provider about the subscription’s validity. Some URLs open in a browser but return a login or error page to the client, which then reports a YAML parse failure. For parsing, inspect indentation, list markers, and field values near the reported line, and confirm that the client received the expected output. For loading, check the active config and its references. Test the connection last, distinguishing a problem with an entire protocol group from one node or one destination.
Set automatic updates around your day-to-day needs. If manual updates work but scheduled updates fail only while the device is locked, check system background restrictions and the client’s update history first. Do not delete a working cached config as soon as an update fails. Keep a usable copy, fetch manually, and check parsing and group references before switching. For more troubleshooting steps, see Subscription update failures and auto-refresh intervals. If the main symptom is a DNS issue, use How Fake-IP address mapping works to investigate instead of changing nodes right away.
Mobile battery use: protocol, traffic capture, and background activity
Separate standby drain from transfer-related drain
A mobile proxy uses CPU and wireless resources while transferring data; after the screen locks, background wakeups may account for more of the drain. Speed tests, subscription updates, reconnects, and keepalives can all keep the device busy. Cellular radios also stay active for a while after small packets are sent, so even low data use can increase standby drain. Looking only at the protocol’s encryption algorithm misses these costs. First determine whether the battery drops quickly during active use or while the phone is idle.
For a standby test, choose periods with similar signal strength and time of day, and keep screen state, power-saving settings, node count, and speed-test settings consistent. Note the battery level before and after, then check the system battery page for background activity. If the client provides logs, check for probe or disconnection counts too. For sustained tasks, keep the transfer size or duration fixed and change one condition at a time. System reports may attribute some network processing to system services. App battery rankings can offer clues, but a percentage is not a direct measure of protocol power use.
Reduce unnecessary testing and traffic capture first
A group of nodes checked frequently for connectivity can repeatedly wake the network with small requests. Hide groups you do not need for everyday use, increase the probe interval, or use on-demand checks if the client supports them. Before making changes, note which groups use regular probes for failover; slowing them down may also delay detection of a bad route. Devices that rarely move may need fewer probes. For devices that need automatic recovery, check that the slower interval still works well enough.
Next, check whether TUN is necessary for your workload. Many mobile clients capture traffic through the system VPN interface; even if the UI does not say TUN, it may use a similar mechanism. If the system and client support per-app routing, capture only the apps that need it. On desktop, use the system proxy as a comparison; on mobile, choose based on OS and app support. Broad traffic capture can route background sync and app lookups through the core too, and more connections mean more overhead. After narrowing the scope, verify that each frequently used app still follows the intended policy.
Check network changes and background restrictions separately
Weak signal and frequent network changes can trigger repeated handshakes with either transport. UDP-based options also depend on how the new network handles that path. Rather than guessing that a protocol is inherently more battery-efficient, run one test at a fixed access point and another during your usual commute. Record connection failures, time to recover automatically, and repeated probes while idle. If dropouts happen only in low-signal areas, prioritize a route that recovers more reliably there. If they happen only in the background, check system restrictions on the process first.
On Android, check each app’s battery use and background-running options; menu names vary by manufacturer. Relax the relevant restriction only if you need the connection to stay up while the screen is locked and the system keeps pausing the client. Then check the standby curve again. On iOS, manage connections through the client and the system VPN settings, and check auto-reconnect or on-demand options where available. For more troubleshooting steps, see Mobile battery drain and Android background settings. Change one setting at a time, then observe it through a normal usage cycle before keeping the change.
Choose a protocol for your device, network, and workload
First setup: match the platform to the subscription
Check which import formats and protocols the subscription explicitly supports, then choose an app for your OS on the client downloads page. On platforms with Clash Plus, consider it as the recommended option and confirm that the current platform build supports your subscription setup. For desktop, compare the platform builds for Clash Verge Rev or FlClash; on Android, consider Clash Meta for Android or FlClash. An app with the same name on another device may use a different core, system networking interface, or feature set. Check older OS requirements before choosing a node.
For your first working setup, choose a node the provider explicitly recommends for your client, and keep its default transport and security settings. After importing, select the config, use rule mode with an app you know, and check the connections page to see which rule matched the request. If the destination is meant to connect directly, a faster node will not make that traffic faster. Conversely, if global mode works but rule mode does not, check rule order, DNS, or proxy-group selection before changing protocols.
Narrow your options to one primary and one backup for each workload
Office web apps and remote collaboration rely on a few short requests as well as long-lived sessions. If you already have a stable SS, VMess, Trojan, or VLESS setup, choose one that connects reliably on your usual networks and has clear authentication settings. Record how quickly it opens pages the first time and recovers after sitting idle. For large downloads over high-latency or lossy links, consider Hysteria2 or TUIC and compare them with your existing transport at the same time of day. If your network changes often, keep a backup on a different transport.
| Use case | What to check first | How to choose |
|---|---|---|
| Office work and web browsing | Short requests, session recovery, and rule matching | Repeat visits work and sessions recover after idling |
| Real-time calls | Whether the app is captured and needs UDP forwarding | Prioritize dropouts and jitter over peak speed |
| Sustained downloads | Steady throughput, peak-time queueing, and concurrent load | Transfers remain stable while other apps still work |
| Mobile work | Recovery after network changes, screen-locked activity, retry frequency | Stable on frequently used networks with moderate background wakeups |
Separate failures into install, import, and usage
If the client will not open or start its core, check the OS version, CPU architecture, and port conflicts first. If you cannot select a config, check its format and field support. If the config is selected but traffic does not work, check whether the request reaches the client and which rule it matches; only then investigate the node handshake. This order can save you from switching apps repeatedly. For example, if a speed test succeeds and a browser opens pages but a meeting app never appears in the connections list, check that app’s proxy or traffic-capture settings. If the request appears but keeps timing out, then check the policy and transport path.
Shared devices and always-on machines also bring maintenance costs. Keep config inputs to a single source where possible, put custom rules in a trackable override layer, and record the active core and main protocol combinations. Before upgrading, export a rollback-ready config. After upgrading, run the same minimal test you used before, then restore scheduled tasks. If only one new node fails, return to the previously working group and investigate that node separately. Do not switch clients, change DNS, and delete the old subscription all at once. For common issues, search the FAQ by symptom. If you need a reminder on importing a subscription or enabling the proxy, return to the Getting Started guide.