Closed sindastra closed 5 years ago
Have the same issue while using acme.sh on OpenWRT
# uname -a
Linux OpenWrt 4.9.120 #0 Thu Aug 16 07:51:15 2018 mips GNU/Linux
# ll /bin/wget
lrwxrwxrwx 1 root root 13 Aug 16 10:51 /bin/wget -> uclient-fetch*
Any idea how to work around it?
@slytomcat You could install either full wget as replacement, or install curl as alternative.
I recommend opkg update && opkg install curl
Cheers
Full wget reports some other errors. But curl helped to get cerficate, thanks!
I created a PR to uclient-fetch to add header https://gitlab.com/openwrt/project/uclient/-/merge_requests/1
The full list of wget options used by acme.sh and their availability in uclient-fetch:
--spider
. Interesting that uclient-fetch has a short option -s
which GNU wget not have-S
"-S, --server-response print server response" prints status and headers-O
output--user-agent
has also a short option -U
--no-check-certificate
--ca-certificate=
--ca-directory=
--method
--post-data=
--body-data=
--read-timeout=3.0
--tries=2
--content-on-error
not required: acme.sh checks that wget has the option-d
(needed only when debugging)--max-redirect 0
-q
--timeout=$t
Interesting that BusyBox wget has support of -S
, --header
, -U
and --no-check-certificate
. There is also some patches to add --post-data
so maybe in near future it may be possible to compile OpenWrt with bb wget and it will work with acme.sh
uclient-fetch is a "Tiny wget replacement using libuclient" See: https://openwrt.org/packages/pkgdata_lede17_1/uclient-fetch
It makes sense to add support for uclient-fetch as it's much smaller than the full wget, and allows acme.sh to run on routers with limited storage space more easily (or at all).
When trying to run acme.sh to issue a cert with uclient-fetch, wget (uclient-fetch) does not recognize the "header" option:
wget: unrecognized option: header
Here are the options for uclient-fetch (tiny wget replacement):
Note: In this case wget is a symlink
/bin/wget -> uclient-fetch