Skip to content

feat(wireguard): export AmneziaWG profiles from native cores - #1271

Open
Intteger157 wants to merge 2 commits into
PasarGuard:devfrom
Intteger157:codex/amneziawg
Open

Intteger157 wants to merge 2 commits into
PasarGuard:devfrom
Intteger157:codex/amneziawg

Conversation

@Intteger157

@Intteger157 Intteger157 commented Nov 25, 2026 •

Copy link
Copy Markdown

Summary

Generate AmneziaWG profiles directly from an Amnezia-enabled native WireGuard core. The WireGuard ZIP puts the parameters in the [Interface] section of each .conf. Clash Meta subscriptions emit the same profile in Mihomo's amnezia-wg-option format, with version: 3. Mihomo can receive the profile through the existing user-agent rule or the explicit /clash_meta subscription URL.

Both exports use the user's WireGuard credentials and the server's public key. The native core is the source of the AmneziaWG settings shared by the peers. This PR complements #932 and #976. Enable amnezia on a Node build that includes PasarGuard/node#139.

Testing

  • Tested the WireGuard archive renderer with and without an AmneziaWG core, including key encoding, switches, zero values, and multiline input rejection.
  • Tested both Clash Meta subscription routes and verified classic Clash compatibility for ordinary WireGuard. The subscription regression suite had 417 passes and 1 skip on Python 3.14.
  • Validated the generated YAML with Mihomo 1.19.34. In five isolated WSL runs, Mihomo downloaded the API-generated YAML over HTTP as a proxy provider and received an HTTP response through the AmneziaWG 3.1 tunnel.

@coderabbitai

coderabbitai Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 79b73e66-6b54-4015-a8ea-5c9186af92c2

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant