You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Even when specifying wrangler dev --ip 0.0.0.0, the inspector only listens on 127.0.0.1 and there does not appear to be any additional flags to force the inspector to bind to any IP other than the loopback.
Expected behavior
There should be some way to for the inspector to bind to non-loopback addresses. This is important when running wrangler inside of a docker container, where port exposure works by forwarding the container's internal socket (e.g. 172.40.40.11:9223) to some host socket e.g. 192.168.1.77:1234. It's not possible to forward a container's loopback address.
In some sense, this is a regression caused by #4437
It's totally understandable for the inspector to listen only on loopback by default, but it's a bummer that there is now no way to have it listen on non-loopback addresses.
Steps to reproduce
Just run wrangler dev and observe that there is no way to have the inspector bind to anything other than loopback. Specifying --ip 0.0.0.0 does not seem to allow this, either.
Please provide a link to a minimal reproduction
No response
Please provide any relevant error logs
No response
The text was updated successfully, but these errors were encountered:
As a workaround, I'm currently using the sed command below in a postinstall script in package.json of any project that uses wrangler. It forces the inspector to bind to the wildcard address (0.0.0.0). Definitely not ideal though.
sed -i 's~port: props.inspectorPort$~port: props.inspectorPort, hostname: "0.0.0.0"~g' ./node_modules/wrangler/wrangler-dist/cli.js
penalosa
changed the title
🐛 BUG: It does not seem possible to have the inspector listen on non-localhost IP
Support customising the inspector IP
Jul 22, 2024
Which Cloudflare product(s) does this pertain to?
Workers Runtime, Wrangler core, Miniflare
What version(s) of the tool(s) are you using?
Wrangler 3.50.0
What version of Node are you using?
v20.11.1
What operating system and version are you using?
Debian Bookworm
Describe the Bug
Observed behavior
Even when specifying
wrangler dev --ip 0.0.0.0
, the inspector only listens on 127.0.0.1 and there does not appear to be any additional flags to force the inspector to bind to any IP other than the loopback.Expected behavior
There should be some way to for the inspector to bind to non-loopback addresses. This is important when running wrangler inside of a docker container, where port exposure works by forwarding the container's internal socket (e.g. 172.40.40.11:9223) to some host socket e.g. 192.168.1.77:1234. It's not possible to forward a container's loopback address.
In some sense, this is a regression caused by #4437
It's totally understandable for the inspector to listen only on loopback by default, but it's a bummer that there is now no way to have it listen on non-loopback addresses.
Steps to reproduce
Just run
wrangler dev
and observe that there is no way to have the inspector bind to anything other than loopback. Specifying--ip 0.0.0.0
does not seem to allow this, either.Please provide a link to a minimal reproduction
No response
Please provide any relevant error logs
No response
The text was updated successfully, but these errors were encountered: