Skip to content

Network mode support for docker environment#1799

Merged
alexgshaw merged 2 commits into
harbor-framework:mainfrom
xiaoxiangmoe:feat/docker-env-network-mode-support
Jun 23, 2026
Merged

Network mode support for docker environment#1799
alexgshaw merged 2 commits into
harbor-framework:mainfrom
xiaoxiangmoe:feat/docker-env-network-mode-support

Conversation

@xiaoxiangmoe

@xiaoxiangmoe xiaoxiangmoe commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

A transparent proxy for a Docker environment has been implemented to handle HTTP/HTTPS allowlisting.

@vercel

vercel Bot commented Jun 2, 2026

Copy link
Copy Markdown

@xiaoxiangmoe is attempting to deploy a commit to the Harbor Framework Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions

github-actions Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Enjoy a better diff viewing experience by clicking one of these URLs:

@xiaoxiangmoe xiaoxiangmoe force-pushed the feat/docker-env-network-mode-support branch 3 times, most recently from 17e3529 to d12f926 Compare June 2, 2026 13:37
@xiaoxiangmoe xiaoxiangmoe force-pushed the feat/docker-env-network-mode-support branch 2 times, most recently from 4772042 to 17fcc87 Compare June 2, 2026 17:00
@xiaoxiangmoe

xiaoxiangmoe commented Jun 2, 2026

Copy link
Copy Markdown
Contributor Author

This PR has some design limitations. In allowlist mode, it only enables support for HTTP/1/2 for IPv4 and IPv6, but not for HTTP/3, FTP, etc. More complex support might require more complex and difficult-to-read implementations, so I think it's okay to leave it like this for now.

This PR also added test cases for several scenarios:

  • Switching between different network modes for tasks in multiple steps
  • Test cases ensuring that --allow-agent-host works correctly

Here is a PoC which helps maintainers to review this PR. https://github.com/xiaoxiangmoe/gost-sidecar-egress-control-demo

@li-boxuan li-boxuan left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much! I think this approach looks very promising. I'll try to test this with TB2 oracle solutions this week.

@li-boxuan li-boxuan requested a review from alexgshaw June 3, 2026 04:09
@xiaoxiangmoe xiaoxiangmoe force-pushed the feat/docker-env-network-mode-support branch from 17fcc87 to 6ec46b0 Compare June 3, 2026 07:58
@alexgshaw

Copy link
Copy Markdown
Collaborator

@li-boxuan were you able to test it?

devin-ai-integration[bot]

This comment was marked as resolved.

@xiaoxiangmoe xiaoxiangmoe marked this pull request as draft June 4, 2026 08:52
@xiaoxiangmoe xiaoxiangmoe force-pushed the feat/docker-env-network-mode-support branch 2 times, most recently from 4ad169a to 70c9aa9 Compare June 4, 2026 11:11
@github-actions github-actions Bot removed the area:ci label Jun 4, 2026
@xiaoxiangmoe xiaoxiangmoe force-pushed the feat/docker-env-network-mode-support branch 5 times, most recently from c1b7eae to 7ba79ef Compare June 4, 2026 13:04
@xiaoxiangmoe xiaoxiangmoe marked this pull request as ready for review June 4, 2026 15:07
@xiaoxiangmoe xiaoxiangmoe force-pushed the feat/docker-env-network-mode-support branch from 7ba79ef to 577fbf7 Compare June 5, 2026 09:08
@li-boxuan

Copy link
Copy Markdown
Collaborator

@li-boxuan were you able to test it?

Yep I ran into some issues testing this against TB2 on my mac. I'll connect with @xiaoxiangmoe offline.

@xiaoxiangmoe xiaoxiangmoe force-pushed the feat/docker-env-network-mode-support branch 16 times, most recently from 1c150de to a4d8a9f Compare June 20, 2026 13:01

@li-boxuan li-boxuan left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking comment:

Is there any chance we could make it easier for developers/users to understand what domain access is attempted but blocked?

Currently, if we miss a domain, the agent log probably shows sth like ssl.SSLEOFError which is not very informative.

@xiaoxiangmoe xiaoxiangmoe force-pushed the feat/docker-env-network-mode-support branch from a4d8a9f to 600e6da Compare June 21, 2026 05:45

@li-boxuan li-boxuan left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested this achieves 100% on TB2.1 with allowlists.

@xiaoxiangmoe xiaoxiangmoe force-pushed the feat/docker-env-network-mode-support branch 6 times, most recently from aab15c7 to 228b6c8 Compare June 22, 2026 08:47
devin-ai-integration[bot]

This comment was marked as resolved.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 new potential issue.

Open in Devin Review

Comment thread src/harbor/environments/docker/docker.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants