Skip to content

feat(ext/fetch): Parse unix socket and vsock proxies from env var - #30377

Merged
bartlomieju merged 4 commits into
denoland:mainfrom
lrowe:fetch-proxy-unix-vsock-env
Sep 2, 2025
Merged

bartlomieju merged 4 commits into
denoland:mainfrom
lrowe:fetch-proxy-unix-vsock-env

Conversation

@lrowe

@lrowe lrowe commented Aug 11, 2025

Copy link
Copy Markdown
Contributor

Allows configuring a default unix/vsock proxy for upstream requests.

@lrowe
lrowe force-pushed the fetch-proxy-unix-vsock-env branch 3 times, most recently from 54b8347 to c0380f9 Compare August 11, 2025 22:26
@lrowe
lrowe force-pushed the fetch-proxy-unix-vsock-env branch from c0380f9 to 30657a6 Compare August 12, 2025 16:59
@bartlomieju

Copy link
Copy Markdown
Member

@lrowe can you give some context on this change?

@lrowe

lrowe commented Aug 22, 2025 •

Copy link
Copy Markdown
Contributor Author

Configuring a default upstream unix/vsock proxy is generally useful for cases where you are deploying deno behind a forward reverse proxy and you want to enable requests to sibling endpoints behind the same forward proxy and/or control or cache upstream requests. Having this option for the default HTTP client makes for a cleaner separation between developer and ops concerns.

This is particularly interesting for me because I want to run deno behind kvmserver for per-request isolation in which case making a new connection to a forward reverse proxy listening on a unix socket has much lower overhead than to a reverse forward proxy on a tcp socket which incurs additional overhead in terms of the network and the extra roundtrip for the CONNECT request.

@lrowe

lrowe commented Aug 29, 2025

Copy link
Copy Markdown
Contributor Author

Mixed up forward and reverse proxies in my explanation above. Edited to fix.

@bartlomieju bartlomieju left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks

@bartlomieju
bartlomieju enabled auto-merge (squash) September 2, 2025 18:20
@bartlomieju
bartlomieju merged commit 9c19768 into denoland:main Sep 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants