packwiz / packwiz-installer

An installer for packwiz modpacks, with automatic auto-updating and optional mods! Works well with MultiMC and on servers.
https://packwiz.infra.link/
MIT License
46 stars 21 forks source link

Allow for pack to be downloaded as a zip file #37

Open AnthonyFuller opened 1 year ago

AnthonyFuller commented 1 year ago

I have just found Packwiz and I think it's a great tool. But I've had one issue with putting this into production.

I have hosted the pack on my web server but as it's behind DDoS protection, the connection is being reset due to the amount of requests being sent when downloading the mod toml files.

To mitigate this you could add an option to download the pack as one zip blob.

comp500 commented 1 year ago

The current release does actually have code to handle modpacks in zip files! But it was only ever used when downloading Github zipballs (which never actually worked), and I decided to remove this code when rewriting it. I'm happy to add support for zip files again if there are sufficient use cases (Modrinth mrpack support is another one); though I want to add direct support for Git repositories which should avoid this issue - Git can create packfiles which significantly reduce the number of HTTP requests required.

I'm switching to Okio in the next release, which has connection pooling and might be better at not triggering the DDOS protection anyway. I'll be releasing this shortly, do let me know if it helps!

AnthonyFuller commented 1 year ago

Sounds great. I'll keep you posted when the release comes.

AnthonyFuller commented 1 year ago

Just tried the newest update, and from some preliminary testing, it seems all good now! Thank you for this.

I'm not entirely sure if you want this issue to be closed as you may still want to add zip support and this could serve as a reminder of sorts. I'll leave it up to you.

comp500 commented 1 year ago

Nice! I'll leave this issue open for now; if there are other use cases people find it'd be helpful to keep them in one place.