Egress allowlist sidecar breaks agent calls behind an HTTP(S)_PROXY

Open
#4,155 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
52/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
docker, python

Research direction

Start by tracing how the allowlist sidecar handles the agent’s CONNECT request and reads proxy environment variables; the issue names no files or tests, so locate those entry points in the repository first. Compare the sidecar path with the reported plain-container behavior using the same proxy configuration. Done when agent calls work through the configured upstream proxy, or the sidecar fails promptly with an error naming that proxy.

Written by the indexing model from the issue text.

Description

Egress allowlist breaks every agent call when the host reaches the internet only through an HTTP proxy

Harbor v0.24.0, Docker env, claude-code agent (CLI 2.1.319), Bedrock backend.

The host has no direct egress; Docker injects HTTPS_PROXY=http://<corp-proxy>:912 into containers from ~/.docker/config.json. With --allow-agent-host (allowlist sidecar), the agent's CONNECT to the proxy is accepted by the sidecar but never completes. Every model call ends in api_retry "unknown error", then AgentTimeoutError.

Repro, same task and image:

  • allowlist mode: 7/7 calls unknown, trial times out;
  • [environment] network_mode = "public", no --allow-agent-host: 0 retries, trial OK.
  • A plain container (no sidecar) with the same proxy env reaches Bedrock.

Expected: the sidecar either forwards CONNECT to the upstream proxy from HTTPS_PROXY, or fails fast with an error naming the proxy. Workaround today: public mode, which drops the egress restriction.

Related: #3029, #3503 (other sidecar issues).

Dominant language
Python
Stars
5.6k
Forks
1.9k
Avg merge
1d 17h
Merged PRs (30d)
156

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from harbor-framework/harbor

All issues in harbor-framework/harbor

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.