162 Commits

Author SHA1 Message Date
timvisee
901fb62f25
Use future tokio supported sync types throughout server handling logic 2021-11-15 14:41:01 +01:00
timvisee
dabeabeff4
Increase server monitoring timeouts to 20 seconds
Should improve polling reliability for overloaded servers.
2021-11-15 13:59:51 +01:00
timvisee
96d7fc9dec
Grab exclusive lock for RCON invocations to server 2021-11-15 13:57:41 +01:00
timvisee
5ffc6ee911
Add RCON cooldown, do not require active PID to stop server
This hopefully improves server stopping reliability.
2021-11-15 13:42:58 +01:00
timvisee
b71d0d1013
Add delay between RCON commands, hopefully improve reliablity
The Minecraft RCON implementation is very broken/brittle. With this we
hope to improve reliablity.
2021-11-15 13:21:12 +01:00
timvisee
88fc5892a3
Simplify waiting for server logic even further 2021-11-14 16:37:09 +01:00
timvisee
38d90681c7
Improve waiting for server when holding client
Instead of constantly polling the server state until it is ready, this
now subscribes to server state changes and uses a proper timeout.
2021-11-14 16:21:54 +01:00
timvisee
69c2d580d5
Only disable prevent-proxy-connections if server is on non-loopback IP 2021-11-14 12:18:56 +01:00
timvisee
69812f5b55
Make server sleeping errors a bit more descriptive 2021-11-14 12:09:26 +01:00
timvisee
f172587fd5
Add server quit cooldown period 2021-11-14 12:00:03 +01:00
timvisee
e6021502d9
Add TODO file, minor fixes 2021-11-12 13:12:17 +01:00
timvisee
72d132ae8b
Rewrite enable-status and prevent-proxy-connections in server.properties 2021-11-12 12:24:41 +01:00
timvisee
8c5f4832a4
Resolve some TODOs 2021-11-11 13:45:37 +01:00
timvisee
51ab0c610b
Resolve clippy suggestions 2021-11-11 13:37:06 +01:00
timvisee
2f3ea381b8
Tweak tokio worker pool, only start with main server 2021-11-11 12:08:10 +01:00
timvisee
2c5a76f92a
Spawn new task for relayed clients that were held 2021-11-11 11:53:19 +01:00
timvisee
4d51113bd9
Add option to use Minecraft server MOTD 2021-11-11 11:37:08 +01:00
timvisee
5df8c65b44
Move server start/stop timeout settings into time section 2021-11-11 11:14:16 +01:00
timvisee
7b4a90bb34
Add option to restart after a crash 2021-11-11 00:11:17 +01:00
timvisee
69b964b603
Fix compilation error on Windows 2021-11-10 23:56:07 +01:00
timvisee
99af0c6437
Fix process force kill logic on Windows 2021-11-10 23:53:09 +01:00
timvisee
18fdf4c5f9
Add server start/stop timeout to force kill server if it gets stuck 2021-11-10 23:43:47 +01:00
timvisee
2026b6c846
Add ping as fall back method for server status monitor 2021-11-10 23:07:19 +01:00
timvisee
01b4a9ab6e
Use more efficient sync types for server state 2021-11-10 22:42:49 +01:00
timvisee
cbe35e5585
Add client holding feature
Don't disconnect client when server starts, hold them for a while, and
relay when the server is ready. This makes the start-and-connect process
much more transparent.
2021-11-10 20:50:49 +01:00
timvisee
d3baebb536
Log what user woke up the server 2021-11-09 15:20:12 +01:00
timvisee
e7741f4ece
Set config defaults, comment out defaults in base config file 2021-11-09 15:13:50 +01:00
timvisee
bbecb43639
Add option for protocol version hints, clean up configuration 2021-11-09 14:57:58 +01:00
timvisee
86c88d85f2
Clean up internal server state handling, various fixes 2021-11-09 14:31:31 +01:00
timvisee
6821cf850e
Sending save-all is not required 2021-11-09 12:40:03 +01:00
timvisee
d109b2bf32
Add RCON server management support, adds Windows support 2021-11-09 01:12:46 +01:00
timvisee
ba2100f015
Restructure SIGTERM signalling logic for Unix 2021-11-09 01:11:22 +01:00
timvisee
438e6e208c
Only set default log level if not set already 2021-11-09 01:06:41 +01:00
timvisee
bf84d04cf6
Various fixes and improvements 2021-11-08 20:28:10 +01:00
timvisee
62422f2ef0
Server should never sleep if players are connected 2021-11-08 20:27:57 +01:00
timvisee
a7a182fbcb
Add option to automatically rewrite server.properties file
This tries to fiend the server.properties file of the Minecraft server,
and sets the correct IP and port as configured within lazymc. This is
enabled by default.
2021-11-08 19:10:50 +01:00
timvisee
a5fbdc8d30
Make server directory option optional 2021-11-08 19:10:21 +01:00
timvisee
db0552f2e5
Rename sleep_on_start to wake_on_start 2021-11-08 18:10:36 +01:00
timvisee
9874c9dd30
Implement minimum_online_time option 2021-11-08 18:07:32 +01:00
timvisee
e115bba827
Add sleep_on_start option 2021-11-08 17:41:02 +01:00
timvisee
a1b64a2b24
Tweak logging 2021-11-08 17:20:21 +01:00
timvisee
a8375534ed
Organize, refactor project structure 2021-11-08 17:06:17 +01:00
timvisee
66faac396a
Add CLI handling, add command to generate/test configuration 2021-11-08 16:49:45 +01:00
timvisee
0c3685c37c
Add configuration 2021-11-08 15:26:36 +01:00
timvisee
fed541c893
Add basic server idle checking, sleep server if idle for specified time 2021-11-08 14:19:52 +01:00
timvisee
049fce78b7
Use server protocol version/player max once known for status responses 2021-11-08 13:07:49 +01:00
timvisee
d4c0b4c146
Switch to server status polling rather than pinging 2021-11-08 12:44:43 +01:00
timvisee
824c728e09
Fix protocol var-int reading for numbers bigger than 1 byte 2021-11-08 12:09:50 +01:00
timvisee
6ed72b7adb
Clean up 2021-11-07 23:40:32 +01:00
timvisee
1de68e7335
Add proper logging 2021-11-07 23:16:56 +01:00