panamax-rs / panamax

Mirror rustup and crates.io repositories, for offline Rust and cargo usage.
Apache License 2.0
443 stars 46 forks source link

how to masquerade as crates.io #120

Open tomjohns opened 10 months ago

tomjohns commented 10 months ago

Firstly, thanks for creating panamax, its AWESOME!!

I was wondering if you might be able to provide some insight into what would need to happen in order for the default .cargo/config.toml to resolve to the panamax mirror. my offline setup has a dns server that i would like to put entries in for crates.io, github.com and let dns resolve to the host running panamax

I unsuccessfully tried modifying the mirror.rs code to run on port 80 and serve.rs to serve the index path from github.com/rust-lang/crates.io-index

Any advice whatsoever would be much appreciated, thanks again!

k3d3 commented 4 months ago

Unfortunately, I'm not sure how best to answer this. I don't think it's possible (at least in its current state) to make panamax pretend to be crates.io and github, even with DNS entries pointing to it.

That would be an interesting use case though, so I'm not against a PR that implements some sort of "masquerade mode".