-
Notifications
You must be signed in to change notification settings - Fork 564
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change default ip for dev server from 0.0.0.0
to *
#4307
Conversation
🦋 Changeset detectedLatest commit: aa53ab4 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
1bab0a7
to
4ba4cdb
Compare
Codecov Report
@@ Coverage Diff @@
## main cloudflare/workers-sdk#4307 +/- ##
==========================================
+ Coverage 75.28% 75.46% +0.18%
==========================================
Files 223 225 +2
Lines 12357 12449 +92
Branches 3198 3227 +29
==========================================
+ Hits 9303 9395 +92
Misses 3054 3054
|
A wrangler prerelease is available for testing. You can install this latest build in your project with: npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/6814508044/npm-package-wrangler-4307 You can reference the automatically updated head of this PR with: npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/6814508044/npm-package-wrangler-4307 Or you can use npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/6814508044/npm-package-wrangler-4307 dev path/to/script.js Additional artifacts:npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/6814508044/npm-package-miniflare-4307 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/6814508044/npm-package-cloudflare-pages-shared-4307 Note that these links will no longer work once the GitHub Actions artifact expires.
| Please ensure constraints are pinned, and |
Testing this, I get the following output on my windows system now:
That's a lot of visual output - is there perhaps a better way to present this if there's going to be that many bind addresses to print moving forward? |
@Cherry This was discussed with the team previously when adding similar functionality to miniflare. We decided that showing all of them once initially would be helpful but if reviewers feel differently now we can discuss |
@Cherry After discussing with the team we thought it would be best to remove the ipv6 addresses from the printout That will require a change in miniflare so this PR is blocked until that is released |
4ba4cdb
to
f211c07
Compare
df134ba
to
c90b660
Compare
for (const accessibleHost of accessibleHosts) { | ||
logger.log(`- ${localProtocol}://${accessibleHost}:${usedPort}`); | ||
} | ||
}); | ||
proxy.server.listen(port, ip); | ||
|
||
proxy.server.listen(port, ip === "*" ? "::" : ip); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does ::
always work? Can a user configure their computer to prevent IPV6?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not 100% sure, looks like you can disable ipv6 on a computer so I'll test manually and see what happens
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After testing with
sysctl -w net.ipv6.conf.all.disable_ipv6=1
sysctl -w net.ipv6.conf.default.disable_ipv6=1
on linux it seems to still be able to listen on ipv4 addresses
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM assuming that listening on ::
always works on all machines.
Also support ipv6 for dev server
c90b660
to
4247b4f
Compare
4247b4f
to
aa53ab4
Compare
This provides support for ipv6 with
wrangler dev
Fixes #3732
Author has addressed the following:
Note for PR author:
We want to celebrate and highlight awesome PR review! If you think this PR received a particularly high-caliber review, please assign it the label
highlight pr review
so future reviewers can take inspiration and learn from it.