I fear that currently only works via snapd-control … which in turn would force you into using a brand store (snapd-control is generally denied in the public store) to be able to call the right snap set commands …
I wonder if splitting out a separate interface that allows access to such settings to not require snapd-control wouldnt make sense here …
Now one more question: What is the best way to read these system proxy settings in a different snap?
I realized that by default the snaps do not have the environment variables from /etc/environment set. My experiments with the (still undocumented) “environment:” snapcraft.yaml section also weren’t successful.
As a workaround I do the following now in the wrapper script inside the snap which needs to read the proxy settings, but is there a better way?
for i in $(grep "proxy" /etc/environment); do export $i; done
@ogra how can I set the proxy inside my snap with snapd-control interface?
I used a snap set core proxy.http="http://foo:1234"commandline call in my snap in devmode which worked like a charm, but in strict mode I get always: /usr/bin/snap: Permission denied