ServerPlugin
Plugin for WebFramework that adds a simple interface to manage the program and server in general.
The functionality is mainly directed for Linux servers with WF programs that use Wrapper.
All fully logged in users with AccessLevel=ushort.MaxValue (administrators) will have access to this plugin, nobody else can access it.
Changelog
Repository on GitHub
Main features
- Log viewing and clearing (requires Wrapper with LogFile=Wrapper.log)
- SSH management (requires Linux structure for key management, and ufw for port whitelisting)
- Interface to list, download and restore backups, API to automatically download backups
- Updating the program and requesting version rollbacks (requires Wrapper, rollbacks require CreateBackup=true)
- Restarting and exiting the program (requires Wrapper)
- Reloading the Wrapper configuration (requires Wrapper, obviously)
- Sending simple emails
- Restarting the mail server (shouldn't really ever be necessary)
- Calling the worker
- Showing how much time is left before the worker runs again
- Showing that the system needs to be rebooted after a system upgrade (requires Linux)
Installation
You can add this plugin to your WF project by installing the NuGet package: uwap.ServerPlugin
You can also download the source code and reference it in your project file.
Once installed, add the following things to your program start code:
- Add
using uwap.WebFramework.Plugins;
to the top, otherwise you have to prepend it toServerPlugin
- Create a new object of the plugin:
ServerPlugin serverPlugin = new();
- Map the plugin to a path of your choosing (like any/server):
PluginManager.Map("any/server", serverPlugin);
You can do all that with a single line of code before starting the WF server:PluginManager.Map("any/server", new uwap.WebFramework.Plugins.ServerPlugin());
Plans for the future
- Arranging the menu items in a nicer manner
- Adding stuff to test WebFramework
- Whitelisting/management for custom ports
- Utilizing the sidebar, somehow