podman-desktop
podman-desktop copied to clipboard
Podman Desktop wrongfully escapes commas in NO_PROXY, rendering it useless
Bug description
Given:
I am a user behind a corporate proxy. To be able to access public registries, I need to go through the corporate proxy. I also have some internal registries that cannot be accessed through the proxy. Instead, they must be accesed directly.
When:
I set my proxy settings in Podman Desktop with the correct HTTP Proxy, HTTPS Proxy and No Proxy values (NO_PROXY containing more than one value as a comma-separated list).
Then
Expected Result: I can pull images from public registries and from my internal registry
Actual result: I can pull images from public registries, but not from my internal registry.
When updating the Proxy settings in the Podman Machine, Podman Desktop escapes the commas in the NO_PROXY
setting in /etc/systemd/system.conf.d/default-env.conf
with a backslash. This renders the NO_PROXY
setting useless, causing Podman to use the Proxy for all requests - including the ones to the internal registry that should not go through the proxy.
Manually removing the \ and restarting the Podman machine will have everything working as expected - Podman being able to access public and internal registries. However, when updating the proxy settings in Podman Desktop, it will recreate the file with backslashes escaping the commas again, breaking access to the internal registry.
Operating system
Windows 10 Enterprise 22H2 19045.4529
Installation Method
Installer from website/GitHub releases
Version
1.11.1
Steps to reproduce
- Setup a proxy
- Setup a registry that is not accessable through the proxy, only directly
- Setup your Proxy settings in Podman Desktop, with NO_PROXY containing multiple entries as a comma-separated list
- Apply the Proxy settings in Podman Desktop
- Restart the Podman machine
- Try to pull an image from your internal registry
Relevant log output
default-env-conf
that Podman Desktop currently creates:
[Manager]
DefaultEnvironment=http_proxy=http://proxy.mydomain.com:8080
DefaultEnvironment=https_proxy=http://proxy.mydomain.com:8080
DefaultEnvironment=no_proxy=127.0.0.0/24\,registry.mydomain.com
DefaultEnvironment=HTTP_PROXY=http://proxy.mydomain.com:8080
DefaultEnvironment=HTTPS_PROXY=http://proxy.mydomain.com:8080
DefaultEnvironment=NO_PROXY=127.0.0.0/24\,registry.mydomain.com
default.env.conf
that Podman Desktop should create:
[Manager]
DefaultEnvironment=http_proxy=http://proxy.mydomain.com:8080
DefaultEnvironment=https_proxy=http://proxy.mydomain.com:8080
DefaultEnvironment=no_proxy=127.0.0.0/24,registry.mydomain.com
DefaultEnvironment=HTTP_PROXY=http://proxy.mydomain.com:8080
DefaultEnvironment=HTTPS_PROXY=http://proxy.mydomain.com:8080
DefaultEnvironment=NO_PROXY=127.0.0.0/24,registry.mydomain.com
Additional context
No response