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

Implement easy mirroring solution #15

Open
mlugg opened this issue Sep 20, 2024 · 4 comments
Open

Implement easy mirroring solution #15

mlugg opened this issue Sep 20, 2024 · 4 comments

Comments

@mlugg
Copy link
Owner

mlugg commented Sep 20, 2024

Right now, the easiest way to set up a mirror is using Mach's Wrench. This works pretty well, but is written in Go and is part of a larger project. It'd be nice to have a more minimal solution.

So, we should make one! It should expose an HTTP server locally, take requests for files, and cache them in a given directory, with some reasonable eviction policy. SSL is out of scope for this project; a local web server can be used to rproxy to the mirror software instead.

I reckon this should be pretty easily doable in a couple of hundred lines of Zig.

@jiacai2050
Copy link
Contributor

Hi, I would like to give it a try, where do you think we can put this mirror? this repo or something else.

@nektro
Copy link

nektro commented Sep 25, 2024

new repo would definitely make the most sense

@nektro
Copy link

nektro commented Sep 25, 2024

i'd bet you could even do it in pure caddy or nginx config without any zig at all, but that exploration would be up to whoever decided to tackle this

@jiacai2050
Copy link
Contributor

https://github.com/jiacai2050/zms

This is my initial implementation, any feedback is welcome.

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

No branches or pull requests

3 participants