Shadowrocket Protocol Guide
Check the server-side protocol first, then review transport, authentication, and routing. Compare stability, speed, and battery use only when you have multiple working configurations.
- Protocol typedetermines which settings to enter
- Connection settingsdetermine whether the handshake succeeds
- Routing rulesdetermine whether requests use this connection
If you’re new to Shadowrocket, start with the quick-start guide and follow the steps to import, connect, and verify. If you already have a configuration, use this guide to check protocol fields, transport requirements, and troubleshooting boundaries. Examples use the iPhone and iPad interface. Get subscription links from your provider; for a server you manage yourself, use your own configuration details.
Check the protocol type before entering settings
Identify the Type from your existing details
In Shadowrocket’s Add Server screen, Type refers to the protocol actually used by the server—not a speed tier or security level. An address and port alone do not make a complete configuration. The same domain can offer different services on different ports, or route traffic by transport or name through a single entry point. Find the protocol explicitly listed in your server details, then check the address, port, authentication method, and any separate transport or encryption settings. If you already have a subscription, check that the imported entry’s type matches the provider’s details; there’s no need to enter every item manually. Remarks are local labels for identifying entries—changing one does not change the protocol.
You can choose between protocols only when your provider or self-managed server offers multiple working configurations. For an organization’s work tunnel, first check which peer configuration and network ranges the administrator provided. For an existing web-forwarding service, confirm that it actually offers an HTTP proxy. To compare performance on cellular, make sure each candidate entry can be tested on the same network. If you have only one configuration, establishing a baseline with it is more useful than trying to fill in six other protocols. If details are incomplete, get the original information rather than combining similar-looking entries into a new configuration.
Keep four types of information separate
| Layer | What to check | What it cannot replace |
|---|---|---|
| Endpoint | Hostname, address, and port used for the connection | A port does not determine the protocol |
| Authentication | Password, UUID, or peer public key | Credentials are not interchangeable between protocols |
| Transport | Network type, Path, and TLS-related fields | A transport name is not a Type |
| Routing | Rules, policies, or tunnel destination ranges | A successful handshake does not mean requests will use this connection |
The address is where the client connects. The certificate name is used to verify the peer’s identity. An application transport may also carry a separate host field for server-side routing. These values are often the same, but they serve different purposes. If the server lists them separately, enter each in its corresponding field. Don’t paste authentication data into unrelated fields, and don’t store a full subscription link in your notes. When comparing configurations or asking for help, record which fields are present, the network type, and the error category. Redact private addresses, credentials, and internal domain names.
When organizing entries manually, keep a backup of the original configuration and give test entries clear remarks. That way, if an import merges entries with the same name, you can tell which one is selected in Home. Saving an entry only confirms that it passed local input checks. If any fields were filled with default values, verify that those values match the server’s requirements. Make sure the selected entry is the one you intend to test before checking rules on another screen. Otherwise, you might see new settings on the import screen but get test results from a different, older connection.
Shadowsocks, HTTP, and SOCKS5
Shadowsocks: always check the encryption method
Shadowsocks was designed as a lightweight proxy relay that adds symmetric encryption between the client and server. Unlike a basic proxy address, it requires both ends to use the same encryption method and credentials. For an existing entry, check the host, port, encryption method, and password. The method name specifies more than the cipher; it may also determine the protocol format and key requirements. Use the full method name provided by the server. Choosing a similar-looking option or reusing a password from another configuration does not guarantee compatibility.
Some services specify additional transport requirements beyond the basic settings. Enter them only when the server details explicitly include them and the entry supports them; don’t apply the same extra setting to every Shadowsocks entry. After importing a single link, open the entry and check its type and method. If you copied it from a chat, check for trailing punctuation or a truncated link. A webpage loading successfully confirms only that ordinary web access works. If your use case requires UDP, verify that the server and intermediate networks allow the necessary forwarding, then test with an application that actually uses UDP. A successful page load is not a substitute.
HTTP and SOCKS5: purpose, encryption, and authentication are separate
HTTP proxies were designed to forward web requests and can use CONNECT to establish a tunnel when the server supports it. SOCKS5 is designed for more general-purpose connection forwarding and defines authentication negotiation and UDP association. Neither protocol encrypts the entire connection just because of its name. When accessing an HTTPS site through an HTTP proxy, the site’s TLS connection and the connection from your device to the proxy are separate security questions. A SOCKS5 username and password authenticate you; they do not encrypt the forwarded traffic. On an organization’s network, first confirm the permitted use and trust boundaries with the administrator.
Knowing the proxy host and port is not enough. Confirm whether a username and password are required, and which connection method the HTTP endpoint expects. Don’t change the proxy type just because the destination URL starts with HTTPS. If an organization offers both HTTP and SOCKS5, choose based on the application’s needs and the endpoint’s capabilities. To access websites through the organization’s web proxy, start by testing HTTP. For non-web connections, check whether the SOCKS5 endpoint allows the destination. If authentication fails, check the authentication method, the endpoint associated with the account, and whether the full credentials were entered. Don’t cycle through types or ports at random.
Separate proxy reachability from destination reachability
A forwarded connection has at least two stages: client to proxy, then proxy to destination. If some destinations work and others don’t, note whether the issue occurs with particular domains or ports. The proxy’s destination access, destination-side DNS resolution, and the server’s outbound status can all affect the second stage. Whether a domain is resolved locally or sent to the proxy depends on the client and its configuration. Rules and resolution paths may also differ when an app uses an address instead of a domain. On corporate networks, a local proxy may be reachable only over a specific Wi-Fi network. If it fails on cellular, that alone doesn’t mean the credentials are invalid.
On iOS, compare the first and repeat visits to the same test page approved by your organization, then check the first new request after switching networks. A basic proxy may require little local processing, but a congested exit or frequent reconnects can still mean longer waits and more time with the wireless radio active. Conversely, an encrypted connection may complete a task faster if its endpoint is more stable. Choose a configuration that meets your authentication, encryption, and reachability requirements, then evaluate it with your actual workload. One webpage timing is not an overall performance ranking for every forwarding method.
VMess: UUID, alterId, and transport settings
Check identity and compatibility settings
VMess combines user authentication and proxy data handling in one protocol and can use different transport methods. Seeing VMess does not tell you which transport it uses or whether TLS is configured separately. First check the UUID provided by the server. It identifies the client to the server; it is not an entry remark and should not be replaced with a UUID generated on the client. Copy all characters and hyphens, removing any accidental spaces. Even if multiple entries use the same hostname, verify the identity and port for each one. Don’t enter credentials from a working entry into a different endpoint.
alterId is a compatibility field associated with older authentication configurations. It does not indicate the number of nodes, concurrency, or speed. When using older details, don’t increase the value based on an unfamiliar example or assume that different client formats will negotiate automatically. Check the server’s current settings and the imported entry. If the field is missing from the details, confirm the authentication configuration used by the current endpoint rather than copying an arbitrary value from an old screenshot. If the server confirms the settings but the device suddenly fails identity checks, also check that the iOS date and time are correct. An inaccurate clock can make authentication failures look like a password problem.
Check transport and TLS separately
If the server uses WebSocket, it often requires a specific Path in addition to the address and port. It may also require a Host for HTTP routing. Path is not a freely replaceable remark or an address for the destination website; it must match the path accepted by the endpoint. Don’t add a trailing slash or paste a full URL into the path field unless the server details specify it. If the server uses another transport, enter the corresponding type from its details instead of reusing the same Path and Host. A TCP connection can succeed while a later transport negotiation fails.
For configurations using TLS, check the name the client uses to verify the certificate and confirm that the server’s certificate matches it. SNI indicates the service name during the TLS handshake; it is not the same as the WebSocket Host, which is sent in the application-layer request. If there is a certificate issue, correct the device time, name, or server certificate rather than disabling verification as a troubleshooting shortcut. If TLS completes but the transport does not respond, check Path and Host. If the transport succeeds but authentication fails, recheck the UUID, time, and compatibility settings.
Change one field at a time and keep a comparison
When comparing two VMess configurations on iOS, first confirm whether they point to the same server endpoint. If the endpoint, transport, and exit all change, a faster connection doesn’t show that a particular encryption setting made the difference. Keep the original entry for comparison. In a temporary entry, change one field to a value explicitly provided by the server, then record the results for a new connection and repeated requests. If only the first request after a long idle period fails, check whether the network or endpoint closed the connection early. If repeated requests are also unstable, compare against a known working entry on the same network to distinguish network conditions from configuration issues.
When using entries from a subscription, first restore a reproducible imported state. Manual edits may affect only the current entry, and the provider’s settings may return at the next update. If a test spans a subscription update, the results may actually come from two sets of settings. Record the selected remark and protocol type before and after testing, and make sure the endpoint did not change. Don’t record the identity value itself. If the issue occurs on only one device, compare its time, current network, and Global Routing settings. For field differences, see VMess and VLESS settings explained.
VLESS, Trojan, and TLS settings
VLESS: identity fields are not a security layer
VLESS separates proxy identity from external transport security; the base protocol does not encrypt data. Both VLESS and VMess may use a UUID, but the same-looking field does not make them interchangeable. For VLESS, check the identity, transport type, and associated security settings against the server details. If Flow is specified, match it as well. Flow describes a connection-handling requirement, not a speed tier. Don’t add it just because the interface offers an option if the server doesn’t require it. Likewise, don’t copy a VMess alterId into VLESS as a substitute for a missing authentication setting.
Some VLESS details include a value that determines how the base protocol is handled; other fields specify external transport security. A default or empty value in one field does not mean the entire connection is unencrypted. Likewise, seeing TLS listed somewhere is no reason to skip certificate verification. Check the two layers separately: whether the protocol entry’s identity and settings match, and whether the outer connection is established and the peer verified as specified. If the details include a feature that is unavailable in the current interface, don’t substitute an unrelated field. First confirm that the configuration format is compatible with the features available on the device.
Trojan: password authentication over a secure connection
Trojan is typically designed to authenticate and forward proxy traffic over a TLS connection. The server’s password and the name used to verify the TLS certificate are separate requirements. The password may still be correct even if a server migration changed the endpoint’s certificate name; changing the password won’t fix the handshake. TLS may also work while authentication fails afterward; repeatedly changing the server name in that case only adds another variable. If the provider lists transport settings beyond the typical setup, follow the details for that endpoint rather than copying fields from another protocol type.
If the connection address is an IP but the server lists a separate TLS name, enter each as specified. Connecting directly to an IP does not mean the peer’s certificate includes that IP. Conversely, don’t replace the hostname with an alias you assume is equivalent; certificate coverage, server-name routing, and DNS results may differ. Handle expired certificates, an incorrect device clock, and a missing trust chain as separate issues. Changing a policy group, adjusting rules, and changing certificate verification address different layers; don’t change them all at once and then attribute success to any one change.
Compare maintainability, not the number of fields
If the server offers both VLESS and Trojan, start with the configuration whose details clearly distinguish the endpoint, peer name, and authentication fields, and that works reliably on the networks you use. Comparing protocol performance is meaningful only when certificate, path, and exit conditions are largely the same. In practice, a distant endpoint, a busy exit, or frequent reconnects are more likely to slow the first request and keep the wireless radio active than having a few extra settings. For a configuration you’ll use long term, keep the source of the original details, the field categories last verified, and a restorable entry. Don’t store real credentials in shared notes.
If the issue occurs only when an app returns to the foreground, first compare the first new request with subsequent requests, then consider whether an idle connection needs to be re-established. If only one Wi-Fi network fails, confirm that its access authentication is complete. A captive portal can make the issue look like a certificate or server problem, but verify the cause by testing another network with the same endpoint. If both protocol types fail on the same network but work on cellular, check network conditions and endpoint resolution first. That alone does not mean a protocol is unsuitable for iOS.
WireGuard: peers, network ranges, and tunnel routing
Tunnels carry network-layer traffic
WireGuard is designed to create a relatively lightweight network-layer tunnel. It identifies peers with keys, encapsulates network-layer traffic over UDP, and handles network ranges according to its configuration. This differs from an HTTP proxy, which forwards web connections. If you have a peer configuration from an administrator, preserve each field’s role. The private key identifies the local device; it is not the peer’s public key and should not be shared. The peer public key identifies the remote side. A preshared key may also be required if both sides have been configured to use one. Similar-looking strings are not interchangeable.
Endpoint is the address and port used to reach the peer over the current physical network. The local tunnel address is used inside the tunnel. Don’t enter the device’s assigned tunnel address as the remote Endpoint, or use the server’s public address as the local tunnel address. If a configuration is assigned to one device, don’t copy the same private key and tunnel address to multiple devices for simultaneous use. The peer may then switch between devices, causing the connection to come up and drop unexpectedly. For multiple devices, ask the administrator to assign each one its own identity and address.
AllowedIPs and Shadowrocket rules operate at different layers
AllowedIPs defines the address ranges associated with a peer. In common configurations, it helps determine which destinations are sent to that peer and restricts which source addresses are accepted from it. Individual ranges and the default range have different meanings; don’t arbitrarily widen the organization’s assigned ranges just to “get connected.” If you only need access to the organization’s internal addresses, follow its assigned ranges and DNS settings. Shadowrocket’s Global Routing and Config, on the other hand, determine whether app traffic is sent to a particular policy. Even if a rule selects the tunnel, the peer won’t automatically handle destinations outside the configured ranges.
If the tunnel handshakes but internal sites don’t open, first check whether the destination is within the expected range, whether the client sends the request through the tunnel, and whether the remote side has a return route. If an administrator-provided test address is reachable but a hostname is not, focus on internal DNS and the network used for resolution rather than changing keys right away. When testing HTTPS by IP address in a browser, the certificate name may not match; that doesn’t mean the tunnel is down. If the issue occurs on home Wi-Fi but not cellular, check whether the local network overlaps with a destination range in the tunnel.
Keepalives and MTU have specific use cases
PersistentKeepalive periodically sends traffic to prevent address-translation mappings from expiring too soon on some networks. It does not make every connection faster. During long periods of standby, periodic traffic may wake the wireless radio more often. Whether to use it, and at what interval, depends on the peer’s requirements and testing. If the tunnel takes time to recover after switching between Wi-Fi and cellular, first check that the physical network is ready, then check the peer mapping and handshake. Shortening the keepalive interval is not a fix for every network-switching issue.
MTU limits the size of individual packets sent over an interface, and the outer encapsulation also needs room. If handshakes and short requests work but large responses or file transfers stall repeatedly on the same network, consider the path’s packet size as one possible cause. Congestion at the exit, application timeouts, and destination access controls can cause similar symptoms. First compare the settings with the administrator’s details and test the same destination on two networks before deciding whether to adjust anything. If you don’t need to reach a particular address range and only need an existing web proxy, using the provided forwarding endpoint may be a better fit and make it easier to verify the request’s path.
Hysteria2: QUIC, UDP, and congestion control
First confirm that your usual network can reach the UDP endpoint
Hysteria2 is designed for networks with changing latency, packet loss, and bandwidth. It uses QUIC over UDP. QUIC can carry multiple streams on one connection, so packet loss on one stream need not block delivery on every stream as it can with a shared TCP byte stream. However, streams still share the same path, congestion state, and available capacity. Weak wireless signal, physical-layer retransmissions, and queue buildup can still affect performance. The first question when evaluating Hysteria2 on a device is whether the networks you use can reliably send UDP traffic to the specified server—not the protocol’s advertised throughput.
Check the endpoint host, port, and certificate name against the server details separately. The port number may match another configuration that uses TCP, but a successful TCP connection does not prove that UDP is reachable on the same port. Conversely, repeated handshake timeouts on one Wi-Fi network don’t prove the password is wrong. Retest the same entry and destination on another known working network, and make sure Wi-Fi access is complete. If cellular works but the same Wi-Fi repeatedly fails to connect, ask the network administrator about the conditions for using UDP.
Authentication, certificates, and bandwidth settings are not interchangeable
Authentication details identify the client. TLS-related names are used to verify the server. If the server details list additional transport settings, enter the values specified for that endpoint. A correct name cannot make up for missing authentication, and valid credentials cannot fix a certificate issue. Check each field after importing; don’t borrow values from an entry with a similar name. If the details and interface use different terms, first confirm what each server setting is for, then find the corresponding field. For example, don’t turn a connection identifier into a server address or use a password as an additional transport setting.
If the server specifies upload and download bandwidth settings, confirm the units, direction, and whether they need to be entered at all. These values are not a speed guarantee from your carrier and cannot change the physical capacity of the connection. On a shared network, setting them too high may increase queueing and latency variation; setting them too low may limit throughput. Some configurations do not require a user-specified bandwidth value, so follow the original details. First test the imported defaults, then adjust one justified setting in a restorable copy and repeat comparable tasks. A peak-speed comparison alone may favor a configuration that makes web browsing sluggish during uploads.
Test throughput, network switching, and standby separately
If you regularly download large files, compare the time to complete the same task and record interruptions or failures. For messaging and light web browsing, the first request after switching networks, variation in short requests, and recovery in the background may matter more than peak speed. QUIC is designed with path changes in mind, but whether an existing connection survives a switch between Wi-Fi and cellular depends on the device, the path, and actual server support. Don’t assume every switch will be seamless. Use the same test page, confirm it works on each network, then test switching between them.
On iOS, sustained transfers keep the wireless radio active longer; weak signal and repeated handshakes can also increase power use. When comparing Hysteria2 with another working configuration, distinguish the energy used to download the same content from standby energy. If both networks connect but everyday use is intermittently sluggish, check whether failures coincide with upload activity, a network switch, or changes in signal. Separating these factors helps you decide whether to keep the configuration, retain another as a fallback, or address an unstable physical network first.
Global Routing and rule verification
Use three modes to answer three different questions
When checking Global Routing in Home, note the current mode first. Config, Proxy, and Direct are the three modes. Temporarily switching modes can help distinguish whether the protocol itself works or a rule is matching, but restore the intended setting afterward. Compare a new request to the same destination, with the same selected entry, on the same network. Existing connections may continue using their previous path. After switching modes, test with a genuinely new request and reconnect normally if needed. Respect access requirements; don’t test business traffic that must use an organization’s proxy by switching it to Direct.
| Interface term | Mode | Troubleshooting use |
|---|---|---|
| Config | Config | See which rule selects a policy for the request. |
| Proxy | Proxy | Check whether the test request works through the current proxy. |
| Direct | Direct | Compare basic network behavior for a test destination that is allowed to connect directly. |
If Proxy works but Config doesn’t, don’t switch protocols first. Confirm that the intended configuration file is enabled, then check which rule and policy match the request, including the entry actually selected by any policy group. If Proxy also fails but Direct works, revisit the endpoint, transport, and authentication. If a destination that allows direct access fails in both modes, first check that the destination is up, the current network can reach it, and DNS returns the expected result. A single comparison is not conclusive because network conditions can change at the same time. Repeating the same steps helps reduce the effect of transient conditions.
Check rule order against the actual request in Config
This snippet demonstrates rule order only; it is not a complete configuration. It sends example.com and its subdomains to PROXY, and unmatched requests to DIRECT. Before using it for comparison, keep a copy of the original configuration and make sure you edit only a test copy. Put rules in the appropriate section of the configuration. If that section already has a FINAL rule, don’t add another fallback at the end; decide on the intended default policy and keep just one. The example domain is for illustration and does not represent a real service.
[Rule]
DOMAIN-SUFFIX,example.com,PROXY
FINAL,DIRECT
DOMAIN matches an exact hostname. Use DOMAIN-SUFFIX when you need to include both a domain and its subdomains. DOMAIN-KEYWORD matches by keyword and has a wider scope, so it can capture unrelated requests with similar names. In general, put more specific, higher-priority rules first and the fallback last. To match by address, IP-CIDR and IP-CIDR6 apply to their respective address ranges. GEOIP relies on IP geolocation data and is not a substitute for checking the actual domain. New requests to the same service may use different domains and match different policies.
A page often makes separate requests for its API, images, and static resources. If the main page loads but some content doesn’t, start with the failed subrequest rather than broadening the rule. Check whether the subrequest uses a hostname or address, and whether it matches a specific rule or the fallback. Then decide whether to add a precise rule. REJECT blocks matching requests; it does not mean the server is offline. If the log shows this policy, first check whether the block was intentional. For examples, see how to proxy only selected websites.
After saving changes, test one request that should match the intended policy, then use a request expected to follow the default policy as a negative control. Testing only the first request may not reveal an overly broad rule; testing only the second won’t show that the new rule is active. Before applying a change to your main configuration, record the original rule order and expected behavior so you can restore exceptions if needed. For more keyword definitions, see the glossary.
iOS speed, battery use, and troubleshooting
Break speed down into connection setup, responsiveness, and sustained transfers
When choosing a configuration, start by noting your main task: returning from standby to a messaging app, loading pages on the move, or transferring files for a long time. Each task has different measures. A cold connection involves DNS resolution, connection setup, protocol handshake, and destination response. Repeat requests may reuse some steps after a connection is established. Sustained transfers depend more on wireless conditions, server capacity, congestion control, and destination limits. Connectivity Test results reflect only the conditions at the time and the behavior relevant to that test; they can’t guarantee that web traffic, UDP traffic, or background recovery will work as expected.
When comparing two verified configurations, use the same device, access network, and destination if possible. Note the test period, any upload activity, the selected policy, and whether you switched networks. First test the initial request after connecting, then repeated requests, and finally a Wi-Fi-to-cellular switch or brief background recovery if relevant. If the configurations use different servers, make clear that you’re comparing two complete services you can actually choose between, not just protocol algorithms. Consistency across multiple runs matters more than the best single result. If the same step fails in several consecutive runs, that’s useful evidence in itself.
Monitor battery use without blaming a protocol for a single drain
A short speed test rarely reveals the power cost of different connection methods. Compare active use and standby separately, keeping screen brightness, signal quality, and test duration similar. Some high-throughput connections finish the same task sooner; others keep the wireless radio active longer because of retransmissions or network recovery. During long standby periods, keepalive intervals, background activity from other apps, and On Demand triggers can all affect total power use. If repeated reconnects occur only after switching networks, record the time and access network, then investigate connection recovery instead of immediately blaming an authentication or encryption field.
On Demand controls when to attempt a connection automatically; it does not select a different protocol or change routing. If a manual connection works but the client doesn’t reconnect automatically after leaving a Wi-Fi network, check the trigger conditions first. If manual connection also fails on the new network, check whether that network can reach the endpoint. After testing, restore your everyday On Demand and Global Routing settings so temporary diagnostic changes aren’t left in place. For triggers based on the access network, see the On Demand settings guide.
Choose the next step based on where the failure occurs
- Entry is empty or won’t save: Check that the server details are complete and the import format is correct. Confirm that the selected entry is the one you’re testing.
- Endpoint handshake fails: Check the current network and the TCP or UDP requirements for the endpoint and protocol, then verify the certificate name and authentication fields.
- Connected, but the service doesn’t work: Check the test request’s policy and affected destinations first, then distinguish between name resolution, tunnel ranges, and server-side outbound issues.
For intermittent failures, record the last successful action before the first error. For example, if an old connection times out after switching from Wi-Fi to cellular but a new connection works, focus on connection recovery. If both old and new connections fail and other network activity on the phone is also affected, check cellular access first. If the issue occurs only in Config, record the rule that matched and the expected policy. If latency tests work but webpages don’t, use the DNS resolution troubleshooting checklist to distinguish local resolution, proxy-side connections, and destination responses. Don’t overwrite your existing DNS settings right away.
If you need help from your provider or administrator, prepare a reproducible test sequence: the current Type, network, point of failure, modes compared for the same destination, and whether temporary changes have been reverted. Don’t include the original subscription link, private keys, or passwords. This lets someone else locate the issue in the client rules, server identity, or network path between the two, even if they aren’t on the same network.