A Windows PowerShell GUI controller for sing-box. It provides a lightweight system tray application to start/stop the service, manage configurations, update the core, and handle log rotation.
- 🖥️ System Tray GUI: Easily manage Sing-box from your system tray.
- 🔄 Core Updater: Download the latest version of
sing-box.exewith a single click. - 🌐 Remote Config Import: Import configurations from a URL.
- 📝 Automatic Log Rotation: Keeps log files manageable with size and count limits.
- 📂 Easy Configuration Switching: Swap between different local config files effortlessly.
First, clone this GitHub repository to your local machine:
git clone https://github.com/bI4ckb34rd/singbox_controller.gitNavigate into the newly created directory (cd singbox_controller).
Place your sing-box.exe binary into the core directory.
Alternatively, you can run the script and use the "Update sing-box Core" button in the GUI to automatically download the latest version.
Execute the main PowerShell script:
.\sing-box.ps1A new icon will appear in your system tray. Right-click it to access the control menu.
This script automatically downloads and configures the MetaCubeXd dashboard when you import a configuration from a URL.
The very first time you access the dashboard, you need to connect it to the sing-box API.
- Open your web browser and navigate to http://127.0.0.1:9090.
- You will see a setup screen with an "Endpoint URL" field.
- Enter
http://127.0.0.1:9090into the Endpoint URL field. - Click the "Add" button.
The dashboard will now load and is ready to use. You will not need to repeat this step again.
After the one-time setup, you can access your dashboard directly by visiting:
| Main Window | Tray Menu |
|---|---|
![]() |
![]() |
Key settings are configurable at the top of the sing-box.ps1 script:
| Setting | Default | Description |
|---|---|---|
SingPath |
core\sing-box.exe |
Path to the Sing-box core executable. |
SingConfigDir |
config |
Directory where your Sing-box JSON configs are stored. |
LogDir |
logs |
Directory for controller and Sing-box logs. |
MaxLogSize |
5MB |
Maximum log file size before rotation. |
MaxLogFiles |
5 |
Number of rotated log files to keep. |
LogRotationCheck |
60000 |
Log rotation check interval in milliseconds (ms). |
singbox_controller/
├── sing-box.ps1 # Main script (GUI controller)
├── core/
│ └── sing-box.exe # Sing-box core binary
├── config/ # Your Sing-box JSON configuration files
└── logs/ # Rotated logs (sing-box.log, controller.log)
Logs provide valuable information for debugging and monitoring:
- Controller Logs:
logs\controller.log(Logs related to the GUI and its operations) - Sing-box Logs:
logs\sing-box.log(Logs generated by the Sing-box core itself)
Log rotation runs automatically based on the limits defined in the configuration.
- Windows PowerShell 5.1 or PowerShell Core 7+
- .NET Framework (typically built-in on modern Windows systems)
This project is licensed under the GNU General Public License v3.0. See the LICENSE file for more details.
Note: The Sing-box core is distributed under its own separate license.
Contributions are welcome! Feel free to open an issue to report bugs or suggest features. If you'd like to contribute code, please open a pull request.
If you find this tool helpful, consider supporting it with a donation!

