All checks were successful
/ build (push) Successful in 8m32s
Signed-off-by: Minecon724 <minecon724@noreply.git.m724.eu>
34 lines
No EOL
1.6 KiB
Markdown
34 lines
No EOL
1.6 KiB
Markdown
Killswitch immediately stops (kills) the server.
|
|
|
|
### Warning
|
|
This terminates the server process (not the OS), meaning it's **like you pulled the power cable.** \
|
|
You lose some progress (since the last auto save), or in the worst case, **data gets corrupted.**
|
|
|
|
Terminal froze after kill? Do `reset`
|
|
|
|
### By command
|
|
No key is required. \
|
|
`/servkill` is the command. Permission: `tweaks724.servkill`. \
|
|
**You must grant the permission manually** with a permission plugin—it's not automatically assigned, not even to OPs.
|
|
|
|
### Over the internet
|
|
**HTTP is insecure.** The secret key travels in plain text, meaning whoever oversees the path[^1] to your server *could*[^2] intercept your request to the server and get your key. \
|
|
I recommend putting this behind a controlled[^3] VPN, or an HTTPS proxy with good access control. \
|
|
Or regenerate the key every use.
|
|
|
|
Make a GET request to `/kill/<secret key>`:
|
|
```
|
|
GET http://127.0.0.1:57932/kill/lNwANMSZhLiTWhNxSoqQ5Q==
|
|
|_ endpoint _| |_ secret key _|
|
|
```
|
|
|
|
There is no response; the connection is closed immediately, no matter what.[^4]
|
|
|
|
The key is in `plugins/Tweaks724/killswitch secret key.txt`. You can provide your own key. The key should be plaintext (not bytes).
|
|
|
|
The ratelimit is one request per 2 minutes. **Do not send requests when blocked, it resets the timer!**
|
|
|
|
[^1]: Typically you, then it's your ISP, maybe its upstream, then the internet backbone (various entities), then your hosting, and finally your server. That's how the Internet works!
|
|
[^2]: Though unlikely
|
|
[^3]: Direct to the server, think WireGuard. Not a commercial offering!
|
|
[^4]: *Stealth*. You will notice that the server has stopped. |