Matthew Penner
4ba5fe2866
events: don't explode when destroying a bus
...
Only attempt to close channels once, rather than per topic
they are subscribed to.
2022-01-20 09:48:18 -07:00
Matthew Penner
a6b77a31dc
fix send on closed channel for logging; closes #3895
2022-01-20 07:00:00 -07:00
Matthew Penner
bb7ee24087
router: support the Access-Control-Request-Private-Network
header ( #117 )
2022-01-19 09:27:13 -07:00
Matthew Penner
649dc9663e
Server Event Optimizations ( #116 )
2022-01-17 20:23:29 -07:00
TacticalCatto
521cc2aef2
Don't turn SSL into lowercase ( #114 )
2022-01-17 20:22:13 -07:00
Matthew Penner
04b9ef69a1
run gofumpt
2021-11-15 10:37:56 -07:00
Dane Everitt
32d6594476
fix incorrect error handling logic when a JWT is created wrongly; closes pterodactyl/panel#3295
...
Prior to this logic not only was the error response incorrect for events, but we registered event listeners before the authentication event; so if auth failed we flooded the socket with tons of output that was never going to be sent anyways.
This change now waits to register listeners until the socket is fully authenticated and we're guaranteed to have a token present.
2021-10-25 21:23:45 -07:00
Dane Everitt
023d7ec1ec
Close websocket connections and allow the client to re-connect on send errors; ref pterodactyl/panel#3596
2021-10-24 16:14:00 -07:00
Dane Everitt
09e1ba6f34
Use the request context for cancelation, not a background context
...
This also fixes an improperly written server deletion listener to look at the correct context cancelation.
Theoretically this should help address the issues in pterodactyl/panel#3596 but I'm not really sure how that happens, and theres no steps for reproduction.
2021-09-12 11:14:00 -07:00
Dane Everitt
ee91224eb6
add context timeouts to avoid hanging wings boot process if docker has a hiccup; closes pterodactyl/panel#3358
2021-09-11 14:13:19 -07:00
Dane Everitt
3b5e042ccc
Simplify logic when creating a new installer; no longer requires an entire server object be passed.
2021-08-29 14:08:01 -07:00
Dane Everitt
5764894a5e
Cleanup server sync logic to work in a single consistent format ( #101 )
...
* Cleanup server sync logic to work in a single consistent format
Previously we had a mess of a function trying to update server details from a patch request. This change just centralizes everything to a single Sync() call when a server needs to update itself.
We can also eventually update the panel (in V2) to not hit the patch endpoint, rather it can just be a generic endpoint that is hit after a server is updated on the Panel that tells Wings to re-sync the data to get the environment changes on the fly.
The changes I made to the patch function currently act like that, with a slightly fragile 2 second wait to let the panel persist the changes since I don't want this to be a breaking change on that end.
* Remove legacy server patch endpoint; replace with simpler sync endpoint
2021-08-29 13:37:18 -07:00
Dane Everitt
ec57f43dd4
Add deprecation flag on the directory, don't remove it entirely
2021-08-02 20:15:25 -07:00
Matthew Penner
2a370a8776
downloader: fix internal range check
2021-08-02 15:16:38 -06:00
Matthew Penner
3c54c1f840
break everything
...
- upgrade dependencies
- run gofmt and goimports to organize code
- fix typos
- other small tweaks
2021-08-02 15:07:00 -06:00
Matthew Penner
73570c7144
installer: support 'start_on_completion' ( #96 )
2021-07-04 15:08:05 -07:00
Dane Everitt
fb0e769306
fix error when out of disk space; closes pterodactyl/panel#3273
2021-04-18 14:48:42 -07:00
Dane Everitt
4b244e96fb
Fix .rar file decompression; closes pterodactyl/panel#3267
2021-04-17 13:13:37 -07:00
Dane Everitt
16b0ca3a8e
Use io#LimitReader to avoid panic when reading files with active writes; closes pterodactyl/panel#3131
2021-04-04 10:42:03 -07:00
Dane Everitt
f57c24002e
More API response fixing
2021-04-04 10:20:27 -07:00
Dane Everitt
2e0496c1f9
Add note about handling of UTF-8 sequences in properties files.
2021-04-03 14:02:37 -07:00
Dane Everitt
d4b63bef39
Fix details fetching for a single server instance
2021-04-03 13:15:11 -07:00
Dane Everitt
b448310a33
Correctly return servers installed on wings and their resource usage
2021-04-03 11:08:26 -07:00
antony1060
b691b8f06f
Fixed /api/servers
2021-04-02 21:32:30 +02:00
Matthew Penner
471886dd34
internally mark if a server is restoring to restrict actions
2021-03-12 16:19:35 -07:00
Matthew Penner
0e3778ac47
transfers: use backup archiver
2021-03-07 11:04:15 -07:00
Dane Everitt
fb2dc39a47
Remove some forgotten debug
2021-03-03 21:00:58 -08:00
Dane Everitt
0919fb2da6
Improve error handling and reporting for server installation & process boot
2021-03-03 20:56:18 -08:00
Dane Everitt
2eb721bbe7
Merge branch 'dane/api-cleanup' into develop
2021-02-23 21:25:10 -08:00
Daniel Barton
4ed0bf522b
Quote and escape Content-Disposition header
2021-02-21 15:05:43 +08:00
Matthew Penner
00195b4a5b
downloader: properly detect and handle integer IPs
2021-02-12 16:35:51 -07:00
Dane Everitt
bfff094216
Get wings booting properly
2021-02-01 21:32:34 -08:00
Dane Everitt
98c68142cd
Remove all of the remaining API logic and port it all to the remote.Client type
2021-02-01 21:28:46 -08:00
Dane Everitt
4bd18f7dd8
Send restoration status information to the console
2021-01-30 18:49:07 -08:00
Dane Everitt
adc0732af3
Better error handling and logging for restorations
2021-01-30 18:43:35 -08:00
Dane Everitt
13541524c3
Use server context
2021-01-26 19:36:35 -08:00
Dane Everitt
4411493006
Merge branch 'develop' into dane/backup-restore
2021-01-25 20:32:32 -08:00
Dane Everitt
f3a6ee7a45
re-refactor code
2021-01-25 20:28:24 -08:00
Dane Everitt
ab86fb703a
Merge branch 'develop' into schrej/refactor
2021-01-25 19:31:16 -08:00
Dane Everitt
981071cda8
Merge branch 'develop' into dane/backup-restore
2021-01-25 19:17:14 -08:00
Dane Everitt
56af6fc1f8
Correctly abort on file missing without panic
2021-01-21 20:58:40 -08:00
Dane Everitt
3f84ee694b
Get backups restoring kinda
2021-01-20 20:03:14 -08:00
Dane Everitt
6ef0bd7496
Get general concept for backup resotration using a unified interface implemented
2021-01-18 21:20:58 -08:00
Dane Everitt
66b6f40b61
Fix import cycle issue
2021-01-17 21:05:51 -08:00
Dane Everitt
7dd0acebc0
Initial untested pass at restoring from local backups
2021-01-16 18:06:22 -08:00
Dane Everitt
6a286fb444
unnecessary link
2021-01-16 17:06:50 -08:00
Dane Everitt
464f26a2c9
Include the request ID in the request logs
2021-01-16 12:07:31 -08:00
Dane Everitt
2968ea3498
Modify stat to embed os.FileInfo differently and update file content reader
2021-01-16 12:03:55 -08:00
Dane Everitt
67ecbd667a
Minor improvements to logic around decompression
2021-01-16 11:48:30 -08:00
Dane Everitt
b17cf5b93d
More middleware cleanup and movement
2021-01-16 11:19:33 -08:00