`cf dev` with remote bindings ignores `HTTP_PROXY`/`HTTPS_PROXY`

Open
#16,959 1 comment 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
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
node.js, typescript, vite

Research direction

Start by tracing the default cf dev path through @cloudflare/vite-plugin and @cloudflare/remote-bindings, including the API calls that start a session and workerd's connection to the remote preview. Compare those paths with Wrangler's API requests, which already use the proxy. The issue is resolved when both session setup and remote preview traffic honor HTTP_PROXY/HTTPS_PROXY in the affected configurations.

Written by the indexing model from the issue text.

Description

feature:remote-bindings package:remote-bindings package:vite-plugin

Users behind a corporate proxy can't use cf dev with remote bindings, because its traffic to Cloudflare doesn't go through HTTP_PROXY/HTTPS_PROXY.

  • With the Vite plugin (the default), neither @cloudflare/vite-plugin nor @cloudflare/remote-bindings sends requests through a proxy. Both the API calls that start the remote-bindings session and the traffic to the remote preview go direct.
  • In projects that still use Wrangler, Wrangler's own API calls use the proxy, but workerd connects to the remote preview directly.

A system-wide proxy, such as TUN mode, works around it for now.

Originally requested for wrangler dev --remote in cloudflare/workers-sdk#5162.

Dominant language
TypeScript
Stars
4.7k
Forks
1.7k
Avg merge
1d 22h
Merged PRs (30d)
282

Getting set up

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 cloudflare/workers-sdk

All issues in cloudflare/workers-sdk

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.