AppImageCommunity / zsync2

Rewrite of https://github.com/AppImage/zsync-curl, using modern C++, providing both a library and standalone tools.
Other
132 stars 25 forks source link

.netrc support #72

Open lalten opened 5 months ago

lalten commented 5 months ago

zsync2 does not offer .netrc support.

As a workaround, you can pass credentials directly in the URL like

zsync2 \
  --url=https://$USER:$PASS@example.com/artifact.appimage \
  https://$USER:$PASS@example.com/artifact.appimage.zsync

Any plans to support this?

probonopd commented 5 months ago

What would you like to achieve? Can you describe your use case for this? Looking at the link, I see that .netrc is somehow related to automatic login (to FTP?) on GNU systems. It is not clear to me how this would relate to zsync2.

lalten commented 5 months ago

.netrc is a standard way to provide credentials and not only used for FTP. wget uses it automatically, and curl uses it when you supply -n/--netrc. My https://example.com/artifact.appimage will return 404 without the right credentials passed in the authorization header.

probonopd commented 5 months ago

Thanks for the clarification. I don't think this is a planned feature but if we'd get a pull request we'd definitely consider it. My only worry is that it might introduce additional complexity and/or security attack vectors, and hence increase maintenance burden.