I know Snapcraft will pass through the http_proxy
and https_proxy
environment variables to the build inside the LXD container. Snap builds on Launchpad rely on a proxy for Internet access, so this is fairly well tested.
If the problem is LXD’s attempts to download images, you might have luck calling systemctl set-environment https_proxy=...
before installing the LXD snap in your VM.