-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
Bug: Can't bind to IPv6 localAddress while using https.request() #4139
Comments
Here's some working code using
_HTTPS |
Possibly related to #3625 |
@nodejs/crypto |
The EINVAL error most likely means that you need to specify the interface to bind to, e.g. |
@bnoordhuis, thanks for the suggestion. Didn't know you could do that. However, I can confirm that on node
|
@jaggedsoft Can you post the output of (I assume you're using Linux because the interface is eth0.) |
Hi @bnoordhuis,
Running Node v6.2.0 and Debian: Thank you for helping to look into this. Here is the output when I use
|
Okay, can you try |
@bnoordhuis Good luck with this, and thank you again for your help: Edit: I also tried |
Excellent! Been wondering about this for 7 months, and @bnoordhuis comes to the rescue and solves the problem in a day. Thank you!! 👍 |
Respect the `{ family: 6 }` address family property when connecting to a remote peer over TLS. Fixes: nodejs#4139 Fixes: nodejs#6440 PR-URL: nodejs#6654 Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
I can bind to
localAddress
just fine when using HTTP, but as soon as I switch to HTTPS I get an error:bind EINVAL
. Please consider this code:Here's the error while running node v5.0.0:
The only difference between the working and the failing code is setting♥️
localAddress
and ironically, the last example binds to the correct IP address, but won't let you do it usinglocalAddress
. The problem here is I have to make a request from a completely separate IPv6 address under my use case, and it works fine with HTTP but I need this to work for HTTPS requests. Currently I can only make this work while using cURL. Could you please provide some insight here? Please help!The text was updated successfully, but these errors were encountered: