Skip to content

Is Clash compatible with Surge? ​

Shared node protocols continue to work, while routing policies can be organized as mihomo YAML.

Surge uses its own profile format, with sections such as [General], [Proxy], [Proxy Group] and [Rule]. For migration, organize nodes and policy groups as mihomo YAML; Surge modules can be imported directly into Clash Modules.

Which Surge nodes can be reused? ​

Clash supports Snell and multiple protocols shared by both products, including:

  • HTTP and SOCKS;
  • Shadowsocks;
  • VMess and Trojan;
  • WireGuard;
  • Snell.

Snell is normally added through mihomo YAML, a compatible profile URL that returns mihomo YAML, or the node editor. Other nodes can be recreated from their server and protocol parameters.

How to migrate ​

  1. Prefer a provider profile URL that returns mihomo / Clash YAML.
  2. If only a Surge profile is available, recreate the required nodes from their parameters.
  3. Rewrite Surge policy groups and rules as mihomo YAML.
  4. Paste Surge module links into Add Module in Clash to import them directly.

How do Surge modules work in Clash? ​

Surge modules (.sgmodule) import directly into Clash Modules: paste the module link under Modules in the profile library. Rules, URL / header / body rewrites, local mappings, [MITM] hostnames, scripts, [Host], and panels take effect; [Proxy] and [Proxy Group] are skipped. DNS scripts, rule scripts, and certificate replacements are skipped, and Skipped in module details explains why. Parts that need HTTPS decryption take effect once the certificate is installed and trusted.

Modules are available on iPhone, iPad, and Mac (Clash for iOS and iPadOS 1.0.13 and macOS 1.0.15 or later); Apple TV does not support modules.

What to configure during migration ​

  • organize Surge nodes and policies as mihomo YAML;
  • express the original routing logic with Clash rules;
  • set app preferences to match your workflow.

The same server can be used directly once its protocol and parameters match.

Return to the compatibility overview.