跳到主要内容

TrustTunnel cross-client configuration research

This note records the official behavior used by Surgio's shared TrustTunnel node model.

Sources​

Shared model​

All three clients connect to a TrustTunnel endpoint with a username and password. Unlike MASQUE, no authentication-mode discriminator is required.

The shared transport switch is quic?: boolean:

  • Omitted or false selects HTTP/2 over TLS.
  • true selects HTTP/3 over QUIC in Stash and Mihomo.
  • Surge currently supports only HTTP/2/TCP. A QUIC node must be omitted from Surge output rather than silently downgraded.

An explicit ALPN override must contain h2 in HTTP/2 mode or h3 in QUIC mode. The upstream TrustTunnel protocol imposes the same transport-specific ALPN requirements.

Target mapping​

Surgio fieldSurgeStashMihomo
typetrust-tunneltrusttunneltrusttunnel
nodeNamepolicy namenamename
hostnamepositional hostserverserver
portpositional portportport
usernameusernameusernameusername
passwordpasswordpasswordpassword
quicunsupported when truequicquic
snisnisnisni
alpnalpnalpnalpn
skipCertVerifyskip-cert-verifysamesame
serverCertFingerprintSha256server-cert-fingerprint-sha256server-cert-fingerprintfingerprint
underlyingProxyunderlying-proxydialer-proxydialer-proxy
portHoppingunsupportedports, QUIC onlyunsupported
portHoppingIntervalunsupportedhop-interval, QUIC onlyunsupported
udpRelayunsupportedno switchudp
headersheadersunsupportedunsupported
maxStreamsmax-streamsunsupportedmax-streams
maxConnections / minStreamsunsupportedunsupportedsame names
healthCheckunsupportedunsupportedhealth-check
nameCertVerifyunsupportedunsupportedname-cert-verify
congestionController / bbrProfileunsupportedunsupportedsame names

Surge supports custom handshake headers separated by semicolons and a max-streams reuse limit. It does not support TrustTunnel UDP forwarding. Because its TrustTunnel transport is TCP-based, Surge may combine it with Shadow TLS.

Stash exposes QUIC port hopping through its common ports and hop-interval fields. dialer-proxy and interface-name are mutually exclusive in Stash.

Mihomo documents udp, health-check, QUIC congestion control, and connection reuse. max-streams conflicts with both max-connections and min-streams. The undocumented cwnd, ECH, and mTLS source fields are intentionally outside the initial public model.

Version floors​

  • Surge TrustTunnel: Mac 6.4.4+. Headers and max-streams: Mac 6.6.0+. Custom ALPN: Mac 6.7.0+. The official manual does not provide an iOS floor.
  • Stash TrustTunnel: iOS 3.4.0+ and macOS 4.2.0+. The official tvOS release notes do not provide a reliable floor.
  • Mihomo TrustTunnel: v1.19.21+. Connection reuse fields: v1.19.23+. bbr-profile: v1.19.24+.

These versions are documented rather than enforced because Surgio has no target-version setting for these clients.