-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
Closed
Labels
confirmed-bugIssues with confirmed bugs.Issues with confirmed bugs.httpsIssues or PRs related to the https subsystem.Issues or PRs related to the https subsystem.tlsIssues and PRs related to the tls subsystem.Issues and PRs related to the tls subsystem.
Description
- Version: 5.5
- Platform: Ubuntu 14.04.1
- Subsystem: http(s)
Seems like family
option does nothing with actual DNS resolve to ipv6.
Problem is internal server should only use ipv6. So, instead of
https.get({
hostname: 'cloud-api.yandex.net',
path: '/v1/disk/resources?path=/',
family: 6,
port: 443,
protocol: 'https:'
}, (res) => {
console.log(res);
}).on('error', (e) => {
console.log(`Got error: ${e.message}`); // Got error: connect EHOSTUNREACH 213.180.204.127:443
});
i should write
dns.lookup('cloud-api.yandex.net', { family: 6 }, (err, addr, family) => {
https.get({
hostname: addr,
path: '/v1/disk/resources?path=/',
port: 443,
protocol: 'https:',
headers: { host: 'cloud-api.yandex.net' }
}, (res) => {
console.log(res);
}).on('error', (e) => {
console.log(`Got error: ${e.message}`);
});
});
mightyaleksey, dzlk, Nodge and rifler
Metadata
Metadata
Assignees
Labels
confirmed-bugIssues with confirmed bugs.Issues with confirmed bugs.httpsIssues or PRs related to the https subsystem.Issues or PRs related to the https subsystem.tlsIssues and PRs related to the tls subsystem.Issues and PRs related to the tls subsystem.