Topic guides
Trojan to Clash Converter
Convert trojan:// links into Clash or Mihomo proxy snippets while preserving TLS, SNI, port, and node names.
On this page
When to use it
- You have
trojan://share links but your Clash or Mihomo client needs YAML. - You want to turn multiple Trojan nodes into a copyable
proxiesblock. - You need to verify TLS, SNI, port, password, and node names after conversion.
Tip
Paste one or more Trojan links and keep the default Clash target. After conversion, verify server, port, password, and sni before merging the output into your config.
Separate the server address from the TLS name
Paste this fictional URI into the converter and choose Mihomo. The documentation IP and credentials do not provide a working service.
trojan://demo%[email protected]:443?security=tls&sni=proxy.example.com#Trojan-Demo
The important node fields should be preserved as follows. This is an extract, not a complete client configuration:
proxies:
- name: Trojan-Demo
type: trojan
server: 192.0.2.20
port: 443
password: demo@password
sni: proxy.example.com
skip-cert-verify: false
The connection goes to 192.0.2.20:443, while TLS checks the name proxy.example.com. Those values can differ, but SNI must agree with the server and certificate. The encoded password becomes demo@password, not a literal %40 string.
Check the transport separately
This example uses TCP. A WebSocket source also needs its transport, path and Host preserved; a gRPC source needs its service name. Removing these settings does not change what the remote server accepts.
Inspect a basic output before applying templates. A missing routing target in a full configuration is a group-reference problem, not a Trojan password error. Support depends on the installed core, not merely a client application's use of the word Clash.
Diagnose certificate errors without hiding them
For a certificate-name error, confirm SNI, the certificate and the device clock with the provider. Adding SNI alone does not make a self-signed certificate trusted. Do not turn on skip-cert-verify by default. Private certificates need a trust or certificate-pinning method supported by the chosen client.
After importing, test this node alone and distinguish connection, TLS and proxy-authentication errors. Include client/core versions in a report, while removing passwords and complete subscription URLs.