Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added WireGuard configuration page #29

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

SamLX
Copy link

@SamLX SamLX commented Feb 19, 2025

Summary

This PR introduces a WireGuard configuration page, allowing users to view, edit, and reload WireGuard settings via the web interface.

Changes

  • Added ext-wireguard.cgi

    • Displays /etc/network/interfaces.d/wg0, /etc/rc.local, and /etc/wireguard.conf.
    • Provides "Edit" buttons for modifying these files.
    • Implements a "Reload WireGuard configuration" button using wg setconf wg0 /etc/wireguard.conf.
  • Updated p/header.cgi

    • Added a menu entry for WireGuard.

Testing

  • Open the WireGuard page and verify file content display.
  • Use "Edit" buttons to confirm correct redirection.
  • Click "Reload WireGuard configuration" and check for success messages.

@SamLX SamLX closed this Feb 19, 2025
@SamLX
Copy link
Author

SamLX commented Feb 19, 2025

Set executable permission for ext-wireguard.cgi

@SamLX SamLX reopened this Feb 19, 2025
Copy link
Member

@flyrouter flyrouter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good day
Thank you for your offer, however, most likely this page will be reworked later with the aim of creating a full-fledged service with input fields for all parameters and not just editing files.

@SamLX
Copy link
Author

SamLX commented Feb 25, 2025

Hello.
That would be really great!
This solution could save users some time, considering that now you have to use a terminal to configure WireGuard.
Configuring WireGuard
Not everyone is a fan of the terminal. :D

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.

2 participants