Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP Auto Download (Server + Client) #169

Merged
merged 6 commits into from Mar 21, 2024
Merged

HTTP Auto Download (Server + Client) #169

merged 6 commits into from Mar 21, 2024

Conversation

taysta
Copy link
Owner

@taysta taysta commented Mar 7, 2024

HTTP Auto Downloads

Ported from JK2MV, uses mongoose to run a lightweight http webserver on a separate thread alongside the dedicated server for fast auto-download of pk3's currently referenced by supporting servers, or alternatively an external web-server address can be set.

Server must have

sv_allowDownload 1 and sv_httpdownloads 1

Client must have

cl_allowDownload 1

By default webserver runs on port 18200, but can be changed with sv_httpserverport, can also enter external webserver address into this cvar for external webserver, pk3s must be in a matching folder hierarchy to the server.

(Dependent on #52 / JACoders#1185)
The reflists can be used to control file referencing when sv_allowDownload is enabled. For instance to only offer selected files (ref_whitelist.txt), block specific files (ref_blocklist.txt) and to offer files that wouldn't automatically be picked up by the download system (ref_forcelist.txt).

Credits to the jk2mv devs that contributed to the http downloads in jk2mv to make this possible (@aufau, @Daggolin, @ouned)

@taysta taysta force-pushed the autodl-mongoose branch 10 times, most recently from 79e7c56 to 2c97c6d Compare March 13, 2024 13:32
@taysta taysta force-pushed the autodl-mongoose branch 5 times, most recently from 969560c to bfb3772 Compare March 20, 2024 14:19
@taysta taysta merged commit 2a5ea5d into master Mar 21, 2024
17 checks passed
@taysta taysta deleted the autodl-mongoose branch March 21, 2024 13:46
taysta added a commit that referenced this pull request Mar 24, 2024
* [HTTP-AutoDL] Libmongoose 7 port from jk2mv

* [HTTP-AutoDL] Fix potential oob read (919b048)

* [HTTP-AutoDL] HTTP Server safeguards: connections limit, connection timeout, request size limit (719e1c6)

* [HTTP-AutoDL] HTTP Server: set mime-type header to application/octet-stream (d353e7d)

* [HTTP-AutoDL] Only IPs of connected clients are allowed to use builtin HTTP server (2a6b024)

* [HTTP-AutoDL] Rename introduced mv_ prefixed cvars to sv_ prefix

(cherry picked from commit 2a5ea5d)
taysta added a commit that referenced this pull request Mar 24, 2024
* [HTTP-AutoDL] Libmongoose 7 port from jk2mv

* [HTTP-AutoDL] Fix potential oob read (919b048)

* [HTTP-AutoDL] HTTP Server safeguards: connections limit, connection timeout, request size limit (719e1c6)

* [HTTP-AutoDL] HTTP Server: set mime-type header to application/octet-stream (d353e7d)

* [HTTP-AutoDL] Only IPs of connected clients are allowed to use builtin HTTP server (2a6b024)

* [HTTP-AutoDL] Rename introduced mv_ prefixed cvars to sv_ prefix

(cherry picked from commit 2a5ea5d)
taysta added a commit that referenced this pull request Mar 24, 2024
* [HTTP-AutoDL] Libmongoose 7 port from jk2mv

* [HTTP-AutoDL] Fix potential oob read (919b048)

* [HTTP-AutoDL] HTTP Server safeguards: connections limit, connection timeout, request size limit (719e1c6)

* [HTTP-AutoDL] HTTP Server: set mime-type header to application/octet-stream (d353e7d)

* [HTTP-AutoDL] Only IPs of connected clients are allowed to use builtin HTTP server (2a6b024)

* [HTTP-AutoDL] Rename introduced mv_ prefixed cvars to sv_ prefix

(cherry picked from commit 2a5ea5d)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant