Multipass ignores global snapd proxy settings
Description
When Multipass runs behind a proxy, configuring the global snapd proxy is not sufficient:
sudo snap set system proxy.http=http://<proxy>:3128
sudo snap set system proxy.https=http://<proxy>:3128Other snap applications can use the proxy, but the systemd-launched Multipass daemon does not. This causes downloads such as GitHub blueprints and Ubuntu images to fail.
Reproduction
Configure an intentionally invalid proxy:
sudo snap set system proxy.http=http://127.0.0.1:9
sudo snap set system proxy.https=http://127.0.0.1:9
sudo snap restart multipassThe proxy values are written to environment:
http_proxy=http://127.0.0.1:9
https_proxy=http://127.0.0.1:9An interactive snap shell receives them:
sudo snap run --shell multipass.multipassd -c \
'env | grep -i proxy'Output:
http_proxy=http://127.0.0.1:9
https_proxy=http://127.0.0.1:9However, the systemd-launched daemon contains empty values:
pid=$(pidof multipassd)
sudo tr '\0' '\n' < /proc/$pid/environ | grep -i proxyOutput:
http_proxy=
https_proxy=Consequently multipass find --force-update does not use the configured proxy.
Observed behavior
The Multipass snap launcher contains logic equivalent to:
http_proxy="$(snapctl get proxy.http)"
https_proxy="$(snapctl get proxy.https)"snapctl get reads Multipass-specific snap configuration, not the global snapd configuration. When the Multipass-specific values are unset, the launcher overwrites the inherited lowercase proxy variables with empty values.
Uppercase variables survive:
HTTP_PROXY=http://127.0.0.1:9
HTTPS_PROXY=http://127.0.0.1:9
http_proxy=
https_proxy=With uppercase proxy variables present, Multipass attempts to connect through the proxy and fails with the expected Proxy connection refused error. This confirms that the problem is proxy environment propagation, not inability to use a proxy.
Expected behavior
Multipass should honor the global snapd proxy settings when Multipass-specific proxy settings are not configured.
Suggested precedence:
multipass.proxy.http/multipass.proxy.https- inherited
http_proxy/https_proxyfrom the globalsnapdconfiguration - unset
A possible launcher fix is to only override inherited variables when the Multipass-specific value is non-empty.
Current workaround
sudo snap set multipass proxy.http=http://<proxy>:3128
sudo snap set multipass proxy.https=http://<proxy>:3128
sudo snap restart multipassEnvironment
OS: Ubuntu Core 26
Series: 16
Architecture: amd64
Kernel: 7.0.0-31-generic
snapd: 2.75.2
Multipass: 1.16.4
Multipass revision: 18737
multipass get local.driver: qemu
Source: canonical/multipass