Skip to content

[Feature]Feature Request: Add support for AmneziaWG (amnezia-wg-option) in WireGuard proxy #395

Description

@nikolalek

功能描述/Feature description

Is your feature request related to a problem? Please describe.

Yes. I am trying to use Cloudflare WARP with AmneziaWG obfuscation to bypass DPI-based WireGuard blocking in my region. The configuration works perfectly in FLClash (which uses a patched Mihomo core), but fails in Clash MI with the following error:

[TCP] dial GLOBAL ... error: setup wireguard: IPC error -22: invalid i1: empty input: UkVHSVNURVI...

使用场景/Use case

Is your feature request related to a problem? Please describe.

Yes. I am trying to use Cloudflare WARP with AmneziaWG obfuscation to bypass DPI-based WireGuard blocking in my region. The configuration works perfectly in FLClash (which uses a patched Mihomo core), but fails in Clash MI with the following error:

[TCP] dial GLOBAL ... error: setup wireguard: IPC error -22: invalid i1: empty input: UkVHSVNURVI...

Describe the solution you'd like

Please add support for the amnezia-wg-option parameter in the WireGuard proxy configuration, as already implemented in the official Mihomo repository:
🔗 https://github.com/MetaCubeX/mihomo/blob/main/adapter/outbound/wireguard.go#L45-L65

Expected configuration format:

proxies:
  - name: WarpAmnezia
    type: wireguard
    server: engage.cloudflareclient.com
    port: 955
    ip: 172.16.0.2
    private-key: <your-private-key>
    public-key: bmXOC+F1FxEMF9dyiK2H5/1SUtzH0JuVo51h2wPfgyo=
    udp: true
    mtu: 1280
    reserved: [0, 0, 0]
    amnezia-wg-option:
      jc: 4
      jmin: 40
      jmax: 70
      s1: 0
      s2: 0
      h1: 1
      h2: 2
      h3: 3
      h4: 4
      i1: "<base64-encoded-payload>"
      i2: "<base64-encoded-payload>"
      i3: "<base64-encoded-payload>"
      i4: "<base64-encoded-payload>"
      i5: "<base64-encoded-payload>"

Describe alternatives you've considered

  1. Using FLClash: Works flawlessly, but I prefer Clash MI's UI/UX and ecosystem integration. I would like to consolidate on a single client.
  2. Removing amnezia-wg-option: Standard WireGuard connects, but traffic is easily detected and blocked by ISP DPI systems in my region.
  3. Manual kernel update: No option exists in Clash MI settings to swap or update the Mihomo core independently.

Additional context

  • Clash MI version: 1.0.21.700
  • Core version: mihomo 1.19.23
  • Platform: macOS / iOS (tested on both)
  • Working client: FLClash (identical config, same core family)

Why this matters:

  • Many ISPs in RU/CN/IR actively block standard WireGuard handshakes at the DPI level.
  • AmneziaWG obfuscation is a proven, open-source method to bypass such blocking.
  • The feature already exists in upstream mihomo — it only needs to be compiled/enabled in Clash MI builds.

References

Thank you

Thank you for maintaining Clash MI! It's an excellent client, and adding AmneziaWG support would make it significantly more powerful for users operating in restrictive network environments. 🙏

适用系统/Target OS

  • iOS
  • macOS
  • Apple tvOS
  • Android
  • Windows
  • Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions