Skip to content

Commit 3bb2e32

Browse files
choovin曾巧文shawnrushefskyCopilot
authored
1.13.4 feat(proxy): Add proxy support with EnvHttpProxyAgent, stabilize webhooks in Kubernetes, and bump to v1.13.4 (#104)
* feat(proxy): add EnvHttpProxyAgent support and inject dispatcher across fetch calls; docs: add Kubernetes Deployment snippet for HTTP_PROXY/HTTPS_PROXY/NO_PROXY; fix: align undici Response types in HTTP storage provider; chore: bump version to 1.13.4 * remove unused import Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: 曾巧文 <89863@runjian.com> Co-authored-by: Shawn Rushefsky <shawn.rushefsky@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 169c460 commit 3bb2e32

10 files changed

Lines changed: 282 additions & 140 deletions

File tree

README.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -822,6 +822,55 @@ If you are using the azure blob storage functionality, make sure to set all of t
822822
| WEBHOOK_SECRET | (empty string) | If set, the server will sign webhook_v2 requests with this secret. |
823823
| WORKFLOW_DIR | "/workflows" | Directory for workflow files |
824824

825+
#### Kubernetes Deployment: Proxy Environment Variables
826+
827+
To enable outbound requests (e.g., webhook delivery) to use a corporate proxy in Kubernetes, configure the standard proxy environment variables. The server uses undici's EnvHttpProxyAgent, which reads `HTTP_PROXY`, `HTTPS_PROXY`, and `NO_PROXY` and routes requests accordingly.
828+
829+
- Recommended `NO_PROXY`: include localhost and common Kubernetes internal addresses so local and in-cluster services do not go through the proxy.
830+
- Set only one set of variables (prefer uppercase). If both lowercase and uppercase are set, the lowercase variables take precedence and the uppercase ones are ignored.
831+
832+
Example Deployment snippet:
833+
834+
```yaml
835+
apiVersion: apps/v1
836+
kind: Deployment
837+
metadata:
838+
name: comfyui-api
839+
spec:
840+
replicas: 1
841+
selector:
842+
matchLabels:
843+
app: comfyui-api
844+
template:
845+
metadata:
846+
labels:
847+
app: comfyui-api
848+
spec:
849+
containers:
850+
- name: comfyui-api
851+
image: your.registry/comfyui-api:latest
852+
env:
853+
# Recommended: set only uppercase vars
854+
- name: HTTP_PROXY
855+
value: "http://your-http-proxy:3128"
856+
- name: HTTPS_PROXY
857+
value: "http://your-https-proxy:3129"
858+
- name: NO_PROXY
859+
value: "localhost,127.0.0.1,::1,.svc,.svc.cluster.local,169.254.169.254"
860+
ports:
861+
- name: http
862+
containerPort: 3000
863+
```
864+
865+
Notes:
866+
- If your proxy requires authentication, include credentials in the proxy URL (e.g., `http://user:pass@proxy.company:3128`).
867+
- `NO_PROXY="*"` bypasses the proxy for all requests.
868+
- When only `HTTP_PROXY` is set, it is used for both HTTP and HTTPS.
869+
- Suggested `NO_PROXY` entries:
870+
- `localhost,127.0.0.1,::1` for in-container loopback
871+
- `.svc,.svc.cluster.local` for Kubernetes service DNS
872+
- `169.254.169.254` for cloud/container metadata service
873+
825874
### Configuration Details
826875

827876
1. **ComfyUI Settings**:

0 commit comments

Comments
 (0)