Problem
The Zig build system's package manager does not respect the standard HTTP_PROXY / HTTPS_PROXY environment variables. When running inside the AWF firewall container, Zig's dependency downloads fail because they attempt direct connections instead of routing through the Squid proxy.
Details
Zig uses its own HTTP client implementation for package fetching (in build.zig.zon files), which bypasses the system proxy settings. This means:
zig build fails when it tries to fetch dependencies
- The iptables NAT rules redirect the traffic to Squid, but Zig's HTTP client doesn't send proper CONNECT requests
- The connection fails or times out
Possible Workarounds
- Transparent proxy mode: Configure Squid for transparent proxying of Zig traffic (may require SSL bump)
- Pre-fetch dependencies: Cache Zig packages in the container or use a local mirror
- Upstream fix: File an issue with Zig to support
HTTP_PROXY environment variables
Impact
Affects Zig projects that use build.zig.zon for dependency management (increasingly common in the Zig ecosystem).
Problem
The Zig build system's package manager does not respect the standard
HTTP_PROXY/HTTPS_PROXYenvironment variables. When running inside the AWF firewall container, Zig's dependency downloads fail because they attempt direct connections instead of routing through the Squid proxy.Details
Zig uses its own HTTP client implementation for package fetching (in
build.zig.zonfiles), which bypasses the system proxy settings. This means:zig buildfails when it tries to fetch dependenciesPossible Workarounds
HTTP_PROXYenvironment variablesImpact
Affects Zig projects that use
build.zig.zonfor dependency management (increasingly common in the Zig ecosystem).