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

panamax serve on IPv4 network only #99

Closed panzerballett closed 1 year ago

panzerballett commented 1 year ago

i tried to start

$ panamax serve /path/to/mirror

on a machine behind a VPN (which only supports IPv4) where i have completely disabled the IPv6 stack (as there is no use for that). panamax wants to bind to [::]:8080 and therefore crashes on this machine.

is there a flag or something that lets me just bind to 127.0.0.1:8080 and ignore IPv6?

thanks in advance!

k3d3 commented 1 year ago

There's a --listen option you can pass to on the serve command: https://github.com/panamax-rs/panamax/blob/master/src/main.rs#L61

Does it work if you use panamax serve --listen 127.0.0.1 /path/to/mirror?

panzerballett commented 1 year ago

thanks a lot! that works!