I think it's because /etc/environment sets the variables but doesn't export them, so sub-processes don't see them. If I manually export the proxy variables in the shell, then the proxy works fine.
Unfortunately /etc/environment is not a bash script. Haven't figured a way yet to let the interactive shell login (done by LXC-exec REST command) source /env.sh. At some point life was too short.
I think it's because /etc/environment sets the variables but doesn't export them, so sub-processes don't see them. If I manually export the proxy variables in the shell, then the proxy works fine.