AUC: Attended Sysupgrade does not use proxy, LuCi ASU does use it

Hi,

my layout is as follows:

WAN-Router = AP-1 (Gateway, NAT) = LAN = AP-2 (Dumb AP)

I've installed the "luci-attended-sysupgrade" and "auc" packages. AP-1 provides tinyproxy to AP-2 which is used and works correctly regarding other use cases like curl, ...

AP-2 has the necessary ENV vars set to tell what the proxy is.

env
(...)
http_proxy=http://(IP-of-AP-1):8080/
(...)

When I go to AP-2 web interface and run attended sysupgrade, the proxy on AP-1 is used like expected.

If I use "curl https://sysupgrade.openwrt.org" on AP1, I get a response, and tinyproxy logs the request as successfully served.

Running "auc" tells me - unexpectedly not using the proxy:

auc
auc/0.3.2-1
Server:    https://sysupgrade.openwrt.org
Running:   SNAPSHOT r23900-7f54d9ba1a on qualcommax/ipq807x (xiaomi,ax3600)
Connection error: Connection failed
No data available (61)

Why doesn't "auc" use the proxy as configured?

UPDATE: I've discovered that the LuCi-ASU works differently. It directly contacts "sysupgrade.openwrt.org" using the client browser. This can be seen in Chrome to confirm it.

So: How can I tell the "auc" package to respect the already set "http_proxy" ENV var to connect to "sysupgrade.openwrt.org" ?

Thanks for your help!

Kind regards,

Catfriend1

Not a solution, but a workaround, use https://firmware-selector.openwrt.org/ and paste all the extra packages you need into the package window, to get a sysupgrade image containing all the extras.

Thanks, but then I also can use luci asu which works by using the client browser env. I'm more looking for a way to do upgrades on the router via bash+cron. :slightly_smiling_face:

I'm not sure how this would try to bypass the proxy, but maybe you can?

1 Like

I think something like get-proxy is needed here.
https://lxr.openwrt.org/source/uclient/uclient-fetch.c#L730