feat(server): support accessing sandbox endpoints via server proxy#172
feat(server): support accessing sandbox endpoints via server proxy#172Pangjiping merged 5 commits intoalibaba:mainfrom
Conversation
|
Great addition! However, I'm not clear on one thing: are you using Kubernetes resource objects to create sandbox, or are you using Docker service with DinD (Docker in Docker)? Your current implementation might not be compatible with the WebSocket protocol. Regarding Kubernetes ingress-gateway, you might want to check out #164 as well. |
|
@Pangjiping We plan to build an in-house AI infra platform based on the OpenSandbox project, with all sandboxes running on Virtual Kubelet deployed on ACK. For R&D who don’t have |
|
LGTM. It provides a direct solution for systems that cannot leverage ingress-gateway for service discovery. However, there are a couple of things to consider:
Additionally, please ask @ninan-nn to review the python SDK changes. |
how to test
because the client can not reach the private IP address of the sandbox pod, then the demo code will fail with error message like
|
hittyt
left a comment
There was a problem hiding this comment.
This PR includes unrelated formatting changes mixed with functional changes. Could you revert the formatting-only changes to keep the diff focused? This makes review easier and keeps git history clean.
Check if your IDE is auto-formatting on save - you may want to disable it or align with the project's style config.
fbdf35b to
ae1f9cf
Compare
|
@hittyt has been done. PTAL |
Signed-off-by: fengxusong <7008971+fengxsong@users.noreply.github.com>
…ter headers be forwarded
ae1f9cf to
010a3c2
Compare
|
LGTM. Please @ninan-nn review sdk changes. |
ninan-nn
left a comment
There was a problem hiding this comment.
Plz add sync implementation as well for python sdk : >
|
@ninan-nn do you mean the JS/Kotlin SDKs? I'm not quite familiar with these two programming languages. Maybe we can add a todo list? |
|
This will be released with server/v0.1.1 |
@fengxsong Sorry for the confusion. I was referring to the Python sync client, not other language SDKs. Please check the sync implementation under |
…sync/async sandboxadapter
|
This feature will be available in the next SDK release. |
Summary
what's changed.
use_server_proxyoption in SDK connection configuration; automatically rewrite endpoint URLs when enabledhttpx[socks]dependency to support proxy functionality, and configure uv index sourcewhy
When the server is deployed in Kubernetes and exposed via a gateway, while local clients cannot connect directly to the sandboxes created by the controller, we can have the server forward proxy requests to the execd process of the sandbox pods.
Testing
Breaking Changes
Checklist