curable-online · GitHub

Required information

  • Distribution: Arch
  • Distribution version: Current
  • The output of incus info: Attached:
    incus-info.txt

Issue description

Downloading images fails without any proxy and VPN here. Which is natural due to my own internet limitation. Downloading images using OpenVPN works well, as expected. But when using environment variables, incus simply doesn't root the traffic through the defined proxy addresses.

I wasn't sure. But after a good deal of experimentation, I concluded that incus doesn't really consider proxy variables. Both shell variables and systemd variables.

The proxy environment variables which I'm talking about are:

https_proxy HTTPS_PROXY http_proxy HTTP_PROXY ftp_proxy all_proxy FTP_PROXY ALL_PROXY no_proxy NO_PROXY

I set all of them to be sure.

Steps to reproduce

  1. Run incus launch images:alpine/3.19 first.
    Fails with the following error:
Error: Failed instance creation: Get "https://sgp1lxdmirror01.do.letsbuildthe.cloud/images/alpine/edge/amd64/default/20240303_13:00/incus.tar.xz": Unable to connect to: sgp1lxdmirror01.do.letsbuildthe.cloud:443 ([dial tcp 167.71.218.48:443: i/o timeout dial tcp [2400:6180:0:d0::10f8:6001]:443: connect: network is unreachable])
  1. Set your shell's *_proxy and *_PROXY variables.
  2. Import them to systemd environment with sudo systemctl import-environment and systemctl --user import-environment
    Fails with the same error:
Error: Failed instance creation: Get "https://sgp1lxdmirror01.do.letsbuildthe.cloud/images/alpine/edge/amd64/default/20240303_13:00/incus.tar.xz": Unable to connect to: sgp1lxdmirror01.do.letsbuildthe.cloud:443 ([dial tcp 167.71.218.48:443: i/o timeout dial tcp [2400:6180:0:d0::10f8:6001]:443: connect: network is unreachable])
  1. Use a VPN that uses TUN instead of proxy to tunnel your traffic to the server. (OpenVPN, for example)
    Downloads and creates the container successfully.

Information to attach

Read the original on github.com ↗