Commit Graph

1213 Commits

Author SHA1 Message Date
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
Matthew Penner
d4a8f25cc6
parser: bug fixes (#102)
* parser: remove unnecessary type convertions
* parser: properly pass number and boolean values
* parser: set values if they don't exist
2021-08-24 17:05:02 -06:00
Matthew Penner
a0a54749d7
upgrade to go1.17 2021-08-24 13:28:17 -06:00
Dane Everitt
88caafa3f5
Update README.md 2021-08-15 18:32:54 -07:00
Johannes
4ee7f367e7
Expose 8080 so that reverse-proxies like jwilder/nginx-proxy can pick… (#97)
* Expose 8080 so that reverse-proxies like jwilder/nginx-proxy can pick up on it.

* Now actually patching the right image....

Co-authored-by: Dane Everitt <dane@daneeveritt.com>
2021-08-15 18:31:11 -07:00
Dane Everitt
c279d28c5d Correctly set the egg values to avoid allowing blocked files to be edited; closes pterodactyl/panel#3536 2021-08-15 17:53:54 -07:00
Dane Everitt
f7c8571f46 Fix race condition when setting app name in console output 2021-08-15 16:46:55 -07:00
Dane Everitt
a2a02906ea
Update CHANGELOG.md 2021-08-03 20:04:00 -07:00
Matthew Penner
e926754724 Merge branch 'develop' of github.com:pterodactyl/wings into develop 2021-08-03 20:59:52 -06:00
Matthew Penner
ca25ba5fab
sftp: deny access if server is suspended (#100) 2021-08-03 19:56:02 -07:00
Matthew Penner
25f3cb60cb server: actually use StartOnCompletion and CrashDetectionEnabled 2021-08-03 16:26:25 -06:00
Dane Everitt
930abfb4a7 Update CHANGELOG.md 2021-08-02 20:17:02 -07:00
Dane Everitt
ec57f43dd4 Add deprecation flag on the directory, don't remove it entirely 2021-08-02 20:15:25 -07:00
Dane Everitt
a33ac304ca Perhaps don't break _everything_ on people. 2021-08-02 20:02:27 -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
4a5e0bb86f docker: fix build 2021-07-17 10:40:14 -06:00
Matthew Penner
e09ee449d1 docker: change final image from busybox to distroless
This should resolve any issues with missing ca-certificates or tzdata.

Fixes https://github.com/pterodactyl/panel/issues/3442
2021-07-17 10:34:31 -06:00
Matthew Penner
7a24e976ef feat(logrotate): fix config with bad user
fixes https://github.com/pterodactyl/panel/issues/3452
2021-07-17 10:25:33 -06:00
Matthew Penner
31ff3f8b56 server(fs): keep file mode when extracting archive 2021-07-15 15:37:38 -06:00
Matthew Penner
f422081695 change minimum go version to 1.16, add multiplatform docker image 2021-07-12 11:06:22 -06:00
Matthew Penner
29b2d6826a archive: fix socket files aborting backups 2021-07-12 10:17:56 -06:00
Matthew Penner
73570c7144
installer: support 'start_on_completion' (#96) 2021-07-04 15:08:05 -07:00
kaziu687
c0a487c47e
Fix environment variables with the same prefix being skipped unintentionally (#98)
If you have two env variables (for example ONE_VARIABLE and ONE_VARIABLE_NAME) ONE_VARIABLE_NAME has prefix ONE_VARIABLE and will be skipped.

Co-authored-by: Jakob <dev@schrej.net>
2021-07-04 15:07:46 -07:00
Dane Everitt
1c8efa2fd0 Update codeql-analysis.yml 2021-07-04 15:03:39 -07:00
Dane Everitt
b618ec8877 Bump PID limit to 512 by default 2021-06-28 17:52:42 -07:00
Dane Everitt
08a7ccd175 Update CHANGELOG.md 2021-06-20 18:07:20 -07:00
Dane Everitt
8336f6ff29 Apply container limits to install containers, defaulting to minimums if the server's resources are set too low 2021-06-20 17:21:51 -07:00
Dane Everitt
e0078eee0a [security] enforce process limits at a per-container level to avoid abusive clients impacting other instances 2021-06-20 16:54:00 -07:00
Dane Everitt
c0063d2c61 Update CHANGELOG.md 2021-06-05 08:50:26 -07:00
Dane Everitt
f74a74cd5e
Merge pull request #93 from JulienTant/develop
Add decompress tests
2021-06-05 08:46:14 -07:00
Dane Everitt
8055d1355d Update CHANGELOG.md 2021-05-02 15:52:34 -07:00
Dane Everitt
c1ff32ad32 Update test based on corrected error response logic 2021-05-02 15:43:22 -07:00
Dane Everitt
49dd1f7bde Better support for retrying failed requests with the API
Also implements more logic error returns from the Get/Post functions in the client, rather than making the developer call r.Error() on responses.
2021-05-02 15:41:02 -07:00
Dane Everitt
3f47bfd292 Add backoff retries to API calls from Wings 2021-05-02 15:16:30 -07:00
Dane Everitt
ddfd6d9cce Modify backup process to utilize contexts and exponential backoffs
If a request to upload a file part to S3 fails for any 5xx reason it will begin using an exponential backoff to keep re-trying the upload until we've reached a minute of trying to access the endpoint.

This should resolve temporary resolution issues with URLs and certain S3 compatiable systems such as B2 that sometimes return a 5xx error and just need a retry to be successful.

Also supports using the server context to ensure backups are terminated when a server is deleted, and removes the http call without a timeout, replacing it with a 2 hour timeout to account for connections as slow as 10Mbps on a huge file upload.
2021-05-02 12:28:36 -07:00
Dane Everitt
da74ac8291 Trim "~" from container prefix; closes pterodactyl/panel#3310 2021-05-02 11:00:10 -07:00
Dane Everitt
3fda548541 Update CHANGELOG.md 2021-04-27 19:07:31 -07:00
Julien Tant
35b2c420ec add decompress tests 2021-04-25 16:44:54 -07:00
Dane Everitt
daaef5044e Correctly determine name for archive files when decompressing; closes pterodactyl/panel#3296 2021-04-25 15:36:00 -07:00
Dane Everitt
35ba6d7524 Update CHANGELOG.md 2021-04-24 16:52:19 -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
0676a82a21 Add better error handling for filesystem 2021-04-17 13:29:18 -07:00
Dane Everitt
a0ae5fd131 Merge branch 'develop' of github.com:pterodactyl/wings into develop 2021-04-17 13:13:40 -07:00
Dane Everitt
4b244e96fb Fix .rar file decompression; closes pterodactyl/panel#3267 2021-04-17 13:13:37 -07:00
Dane Everitt
488884fdee
Merge pull request #92 from parkervcp/fix_docker_build
Fixes ghcr build
2021-04-13 08:18:30 -07:00
Michael Parker
cfa338108f Fixes ghcr build
Removes version pins so packages install properly.
2021-04-12 19:38:16 -04: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
8dfd494eaf Better explain what is happening in this file 2021-04-03 14:16:00 -07:00