问题
I'm working on setting up an OPKG repository to be used by embedded linux devices. We'd like to secure the server so that only our devices have access to the packages. I couldn't find any information on how to do this other than some references to http proxy username and passwords. Is there a way this can be achieved? I believe opkg repositories use the same system as ipkg.
回答1:
You don't really need to modify the sources - compiling OPKG with libcurl
will enable http basic auth: ./configure --enable-curl
before running make
In opkg.conf just add option http_auth user:pass
and it works.
I remember seeing this change was added some time ago - don't recall when or which version but it works with the latest.
回答2:
Maybe OPKG changed in time but now I was able to secure repo with basic auth like here HTTP Basic Authentication credentials passed in URL and encryption)
So /etc/opkg/customfeeds.conf contain something like this:
src/gz closed_repo http://login:password@example.com/path/to/repo
Just to be clear: I use lede project build.
来源:https://stackoverflow.com/questions/27867769/securing-an-opkg-repository