This guide is for users who already have their own connection details and need to check Trojan settings in Shadowrocket. Check the Address, Port, Password, SNI, and certificate verification in order to distinguish network reachability issues from TLS handshake and authentication failures. Then use Global Routing to verify whether requests actually use the selected connection. The example domains and addresses illustrate syntax only and cannot be used to connect.
1. What TLS and the password do in a Trojan connection
Trojan typically establishes TLS over a TCP connection, then sends authentication information and proxy requests through the protected connection. TLS protects data in transit and verifies the server's identity; the Trojan password lets the server identify an authorized client. These are separate checks: a correct password cannot fix a certificate name mismatch, and a valid certificate does not mean the password is correct.
A connection can be broken down into several stages: resolve the server's domain and establish a network connection, complete the TLS handshake, authenticate with Trojan, and finally connect to the destination website. Troubleshoot in that order. If you cannot reach the server port, repeatedly changing the password is unlikely to help. If you see a certificate error, first check the hostname, device time, and certificate chain.
2. Check each Add Server setting
On Home, tap the “+” in the upper-right corner to open Add Server. Set Type to Trojan, then enter the details as provided. Do not assume a connection is Trojan just because it uses port 443. Shadowsocks, VMess, VLESS, and Trojan use different authentication methods and fields; changing the protocol name does not convert one into another.
| Setting | What to enter | Common mistake |
|---|---|---|
| Address | The server domain or IP address in your connection details, such as edge.example.com | Including https://, a path, or the full share link |
| Port | The port the server actually listens on, such as 443 if specified in your details | Changing another port to 443 just because a tutorial uses it |
| Password | The original Trojan authentication password, entered exactly as provided | Extra spaces or line breaks, or using a website login password instead of the connection password |
| SNI | The TLS name required by the server, usually a domain name | Entering a URL or port number, or choosing an unrelated website domain |
| TLS certificate verification | Keep server certificate verification enabled. Check the name, validity period, and chain of trust. | Leaving verification disabled to avoid an error |
Password is usually case-sensitive. When copying it manually, watch for characters like 0 and O, 1 and l, and invisible whitespace at the end. Do not hash or encode the original password yourself. If your share link contains percent-encoded values, use the import feature to parse it rather than entering an encoded segment as the raw password.
If your connection details specify WebSocket, a path, or Host, configure the corresponding transport options as instructed. Host is a request field for the transport layer, while SNI is sent during the TLS handshake. They may be the same or differ, depending on the deployment. If none of these are specified, do not enable extra transport settings just to fill in more fields.
3. How Address, SNI, and the certificate name relate
Address tells the client where to connect. SNI is the server name sent in the TLS ClientHello, helping the server select the right site and certificate when multiple sites share an address. Certificate verification also checks whether the certificate is valid for the expected server name. SNI is not a password or website URL, and it is not an arbitrary note to use in place of the connection address.
- Address is a domain: For example,
edge.example.com. If your connection details specify the same domain for SNI, use it there too. A resolvable address does not guarantee a valid certificate. - Address is an IP: For example, the documentation-only address
192.0.2.10. If the certificate is issued foredge.example.com, use the SNI specified in your connection details instead of using the IP as the certificate name. - SNI is blank: The client may use a default based on the address. Do not assume this behavior applies to every deployment. If your connection details specify an SNI, check it explicitly.
- Certificate error: Check the device date, time, and time zone, then verify the certificate name, validity period, and full certificate chain. The server administrator must fix certificate deployment issues.
For illustration of how the fields relate only; not a usable connection:
Type: Trojan
Address: 192.0.2.10
Port: 443
SNI: edge.example.com
Certificate name must cover: edge.example.com
Password: Use your own original authentication password
Do not enter https://edge.example.com:443/path in SNI. Enter only the hostname edge.example.com, without the protocol prefix, port, or path. If the connection reports a name mismatch, check these fields against your original details instead of trying other public domains.
4. From saving settings to testing requests
These steps follow the Home and Add Server workflow. Field order may vary by platform, but the settings to check are the same. Note the original settings before making changes, and adjust one item at a time so you can identify what affected the result.
-
Gather your details
Have your Address, Port, Password, SNI, and any transport requirements ready. If the details omit the port or authentication password, confirm them with the original provider instead of guessing from an example.
-
Choose the protocol
Go to Home → “+” → Add Server → Type and select Trojan. Make sure this is not another protocol before entering the server settings.
-
Enter authentication details
Enter the Address, Port, and Password separately. Do not include a URL path in the address; use the port in your details; preserve the password's capitalization and exact characters.
-
Check TLS
Enter the SNI specified in your connection details and keep certificate verification enabled. If other transport settings are required, check Host and the path too; do not enter them in the SNI field.
-
Save and test
After saving, return to Home and select the connection you just added. Turn on the connection and complete the system connection authorization, then test with an actual web request. Do not rely only on the latency number in the list.
-
Restore routing
If you temporarily switched to Home → Global Routing → Proxy for troubleshooting, restore your previous routing selection when testing is complete. Also confirm that Config is using the configuration you expect.
A latency test shows only the result of that test; it does not prove that a target website can be reached through Trojan. A responding port does not mean the password authenticated successfully, and an enabled connection switch does not mean every request uses the selected server. Check actual request results and connection logs together.
5. Use Global Routing to distinguish settings issues from rule issues
The same Trojan configuration can behave differently under different Global Routing modes. To troubleshoot settings, you can temporarily reduce interference from rules, but do not treat a test mode as a way to fix incorrect settings. This section compares routing choices within Shadowrocket only; it does not assess service quality.
Config
RecommendedRequests are routed according to the rules in the current configuration. Only requests that match a proxy policy can test the corresponding Trojan connection. A request matched to DIRECT does not verify that the proxy settings work.
Best for: everyday rule-based routing after checking your rules
Proxy
Route requests covered by proxy handling through the selected proxy to temporarily rule out interference from standard routing rules. Traffic excluded at the system level or not intercepted must be checked separately.
Best for: briefly checking whether the selected Trojan connection can handle a target request
Direct
Requests are handled as direct connections and do not test the Trojan password or TLS settings. A webpage opening in this mode does not prove that the Trojan settings are correct.
Best for: checking whether the target is reachable directly over your local network
Scene in Global Routing organizes routing behavior by scenario; it is not an additional Trojan authentication method. If Scene is enabled, check which scene is active so routing does not change during testing. Also check rule order under Config. For example, a request matching DOMAIN-SUFFIX,example.com,DIRECT will not be routed through the proxy by a later FINAL,PROXY rule. The PROXY policy must also refer to a valid policy in your configuration.
- If a request works under Proxy but fails under Config, check the matching rule, policy target, and DNS handling before re-entering the password.
- If TLS errors persist under Proxy, recheck SNI, device time, and the certificate. Do not try to hide the issue by changing DOMAIN-SUFFIX or FINAL rules.
- To monitor the connection switch reliably, first note your existing Settings → On Demand configuration. On Demand controls when connections start based on conditions; it does not fix server authentication settings.
6. Common Trojan settings questions and troubleshooting
Why can’t I connect even though I copied the password?
First make sure Add Server → Type is set to Trojan, then check Address and Port. If the TLS handshake has not completed, the password is not the first thing to troubleshoot. If the connection reaches authentication, check Password character by character, remove any accidental line breaks, and confirm the server still accepts those credentials.
I get a certificate name mismatch. What should I enter for SNI?
Enter the TLS domain specified in your connection details, and confirm that the server certificate covers that name. This is especially important when Address is an IP. Do not use the destination website's domain as the server SNI. If your details do not specify one, confirm the server configuration first.
Why does the connection time out on port 443?
Port 443 is common, but that does not guarantee the server is listening on it or that your current network allows access. Check address resolution, the port in your connection details, and your local network, then try another network you can use. A timeout alone does not mean the password is wrong.
Why did my manual changes disappear after updating a subscription?
An entry managed by a subscription may be overwritten with source data during an update. Reopen the entry and check SNI and transport settings after updating. For troubleshooting, you can create a separate manual test entry and keep the original details. A successful subscription update does not mean every connection has authenticated successfully.
The latency shows a number, but webpages still won't load. What should I do?
Return to Home and confirm that the entry being tested is selected. Temporarily use Global Routing → Proxy to make an actual request. If it still fails, check for DNS, TLS, authentication, or remote access errors. If only Config fails, check the rules and policy targets.
When reporting an issue, note the stage where it occurred, the exact error, the routing mode, and the network type. Before sharing a screenshot, hide your Password, subscription token, and full connection link. Do not change the address, SNI, password, and rules all at once; even if the connection recovers, you will not know what fixed it.
Get Shadowrocket and read the setup guides
The iPhone / iPad app is a one-time $2.99 purchase on the App Store. The Mac (Apple silicon and Intel), Windows, Android, and Linux versions are free. See this site's download page for platform-specific access. For iPhone / iPad system requirements, check the App Store listing. The seller is Shadow Launch Technology Limited; the app ID is 932747118.
The app purchase is separate from any service plan. Prepare your own connection details, then follow the guides to import them, authorize the system connection, and check Global Routing.