Skip to content

feat(wireguard): add global WireGuard disable option#444

Merged
x0sina merged 3 commits intodevfrom
optional-wireguard
May 6, 2026
Merged

feat(wireguard): add global WireGuard disable option#444
x0sina merged 3 commits intodevfrom
optional-wireguard

Conversation

@x0sina
Copy link
Copy Markdown
Collaborator

@x0sina x0sina commented May 6, 2026

Summary

  • add a general setting to enable or disable WireGuard globally
  • when disabled, skip WireGuard peer IP allocation, validation, bulk reallocation, and subscription output
  • keep WireGuard key generation/public-key normalization active because it is cheap
  • add a dashboard General Settings switch and hide WireGuard peer/key fields when disabled

Performance

Disabling WireGuard avoids the expensive peer IP allocation path, which scans existing users, reads JSON proxy settings, parses peer IP networks, checks overlaps/reserved ranges, and allocates from the global pool.

x0sina added 2 commits May 6, 2026 14:50
…date subscription logic

- Introduced `wireguard_enabled` boolean in the General settings model to control WireGuard functionality.
- Updated subscription operations to check the `wireguard_enabled` flag before processing WireGuard requests.
- Enhanced user interface to include a toggle for enabling/disabling WireGuard in the settings dashboard.
- Adjusted localization files to support new WireGuard settings descriptions.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 6, 2026

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

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 185d9067-d429-4b2f-ae6c-65e12fab7c69

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
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch optional-wireguard

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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 and usage tips.

- Add WIREGUARD_ENABLED config setting
- Remove persisted wireguard_enabled general setting
- Remove dashboard WireGuard enable toggle and related API state
- Gate WireGuard allocation and subscription output from env config
@x0sina x0sina merged commit 4ab9ea0 into dev May 6, 2026
22 checks passed
@ImMohammad20000 ImMohammad20000 deleted the optional-wireguard branch May 6, 2026 20:46
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