WebBridge
Support Discord:
https://discord.gg/7pxB73VHkp
Overview
WebBridge is a modern replacement for old web-sender plugins. It provides a rock-solid, encrypted link between your website (PHP, Node.js, etc.) and your Minecraft server. Whether you want to execute commands or fetch live stats, WebBridge does it with top-tier security.
Supported Versions: 1.12.2 - 1.21.x (and beyond)
Key Features
[Military-Grade Security: AES-256 encryption and HMAC-SHA256 signing.] Anti-Replay Protection: Requests are timestamped to prevent old data from being reused.
[Live Stats: Instantly fetch Online Players and Server TPS averages.] IP Whitelisting: Strict control over who can talk to your server.
- Lightweight: Minimal impact on server performance.
Installation
- Drop the WebBridge.jar into your plugins folder.
- Restart the server to generate the configuration.
- Set your secretKey in config.json (minimum 32+ characters).
- Use the provided PHP client to connect.
Plugin Configuration
Code (json (Unknown Language)):
{
/**
[LIST]
[*]WEBBRIDGE SERVER CONFIGURATION
[*]serverPort: The port for the internal HTTP server.
[*]secretKey: Strong symmetric key for encryption (must match web client).
[*]allowedIps: Whitelisted IP addresses allowed to send requests.
*/
"serverPort": 8765,
"secretKey": "YOUR_SUPER_SECRET_64_CHAR_KEY_HERE",
"rateLimitPerSecond": 50,
"debugMode": false,
"allowedIps": [
"127.0.0.1",
"YOUR_WEB_SERVER_IP"
]
}
PHP Client Integration (index.php)
Code (PHP):
<?php
/**
* WEBBRIDGE INTEGRATION EXAMPLE
*/
require_once
'WebBridgeClient.php'
;
use WattBreak\WebBridge\WebBridgeClient
;
$client
=
new WebBridgeClient
(
'127.0.0.1'
,
8765
,
'YOUR_SUPER_SECRET_64_CHAR_KEY_HERE'
)
;
try
{
/**
* Example: Fetching Server Stats
*/
$stats
=
$client
->
fetchStats
(
)
;
echo
"Online Players: "
.
$stats
[
'data'
]
[
'online'
]
;
echo
"TPS: "
.
$stats
[
'data'
]
[
'tps'
]
[
0
]
;
/**
* Example: Executing a Command
*/
// $client->executeCommand('say Hello from the Website!');
} catch
(Exception
$e
)
{
echo
"Error: "
.
$e
->
getMessage
(
)
;
}
Upcoming Updates
Note: Full BungeeCord & Velocity and Velocity support will be officially added in the next update.