Skip to content

fix(xray): do not fail SyncUser over an empty WireGuard message - #118

Merged
T3ST3ST3R0N merged 2 commits into
devfrom
fix/syncuser-skip-unusable-wireguard
Oct 22, 2026
Merged

T3ST3ST3R0N merged 2 commits into
devfrom
fix/syncuser-skip-unusable-wireguard

Conversation

@T3ST3ST3R0N

Copy link
Copy Markdown
Collaborator

Panels send an empty proxies.wireguard message for every user without WireGuard keys. SyncUser rejected those users with wireguard public_key is required before applying any inbound, so with bridge 0.9.1 (which syncs batches under 1000 users one user at a time) users could not be added, changed or removed; disabled and deleted users kept access.

  • A WireGuard message without a public key now means "no WireGuard account", as full sync and UpdateUsers already treat it: the user is applied to its other inbounds and removed from WireGuard inbounds.

  • Invalid WireGuard settings that carry a key still keep the live peer and return an error, but no longer block the user's other inbounds or a removal.

  • Start no longer logs wireguard public_key is required for every keyless user listed on a WireGuard inbound.

Note: a user whose stored WireGuard public key is present but malformed still gets an error from SyncUser (the #64 semantics). Bridge 0.9.1 requeues such a batch (gRPC) or that user (REST); 0.9.4 uses UpdateUsers and is unaffected.

Tests: the exact wire bytes the bridge sends, add and removal through SyncUser, valid keys unchanged, invalid keys applied to the other inbounds. Full suite with -race green.

Panels send an empty WireGuard message for every user without WireGuard
keys. SyncUser rejected those users with "wireguard public_key is
required" before touching any inbound, so with bridges that sync users
one at a time (0.9.1) users could not be added, changed or removed.

A WireGuard message without a public key now means no WireGuard account,
as full sync and UpdateUsers already treat it: the user is applied to its
other inbounds and removed from WireGuard inbounds. Invalid WireGuard
settings that carry a key still keep the live peer and return an error,
but no longer block the user's other inbounds or a removal.
…n error

Start logged "wireguard public_key is required" for every user without WireGuard keys listed on a WireGuard inbound. Skip them quietly, the same rule SyncUser now uses.
@coderabbitai

coderabbitai Bot commented Oct 22, 2026

Copy link
Copy Markdown

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: e0028591-6442-4827-8f86-228f0a60b13f

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

Comment @coderabbitai help to get the list of available commands.

@T3ST3ST3R0N
T3ST3ST3R0N merged commit bd745b5 into dev Oct 22, 2026
2 checks passed
@T3ST3ST3R0N
T3ST3ST3R0N deleted the fix/syncuser-skip-unusable-wireguard branch October 22, 2026 17:45
Free-Guy-IR added a commit to Free-Guy-IR/node that referenced this pull request Nov 3, 2026
d309483 (PasarGuard#115) is now ported by c2e15f2 and its waiver goes.
47857d4 (the v0.5.5 version bump) is not applicable: the fork keeps
its own NodeVersion line. bb40094 (PasarGuard#111) is superseded while the fork
pins Xray v26.3.27 and checks the geo files by sha256. d359a8f (PasarGuard#117)
is not applicable without StartOrAttach. bd745b5 (PasarGuard#118) is not
applicable until PasarGuard#64 brings Xray WireGuard accounts and goes with it.
1549c96 (PasarGuard#116) and 8ad52fe (PasarGuard#112) stay pending to 2026-11-08 under
NODE-LEAD, each with its exact remaining work.
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