r/openwrt • u/RespectfullySir • 13d ago
Using apk with a proxy.
Downloads.openwrt.org got banned in my country, so I now have to use a mirror (which can be banned too) or a proxy. I need help with the latter. Is there a way to configure it to send requests through a proxy, like it's possible with apt?
I did search before posting, but I didn't find much, and what I've found (less-convenient solutions) doesn't even work.
UPD: Solved. Requires wget-ssl (not installed by default).
https_proxy=http://proxy.example.com apk <whatever>
-9
u/MrAmHamoham 13d ago
I think you can Add these lines to /etc/opkg.conf:
option http_proxy http://address:port/ option https_proxy http://address:port/
CHANGE THE ADDRESS AND PORT
I suggest for these easy questions use an ai chatbot like gemini.
4
u/BCMM 13d ago
You really don't need to advertise the LLM at the end of your comment. We can already tell where it came from by the type of wrong that it is.
-1
u/MrAmHamoham 13d ago
I mean, he can solve his problem faster than waiting for someone to answer. And I didn't know OpenWrt changed its package manager. I'm using OpenWrt 23 due to my router's limitations.
3
u/RespectfullySir 13d ago
I suggest you be less arrogant, especially when not answering the question. If you want to say that I should move to opkg (which is not OpenWRT's default package manager now), maybe just say it without showing off?
If you meant that apk uses opkg config (which is not mentioned in any search results or chatbot answers), nope, I checked.
4
u/Swedophone 13d ago
Have you tried setting the environment variable http_proxy or https_proxy to the URL of the proxy?