Skip to content

Fails to connect to IPv6 addresses #52

@vpzomtrrfrt

Description

@vpzomtrrfrt
import { createProxyServer } from "http-proxy-3";

createProxyServer({target: "http://[2a01:4f9:3071:2c0f:1:1000:0:2]/"}).listen(8000);

Running this and attempting to connect to the proxy triggers a crash:

/home/colin/tmp/pt/node_modules/http-proxy-3/dist/lib/http-proxy/index.js:127
                throw err;
                ^

Error: getaddrinfo ENOTFOUND [2a01:4f9:3071:2c0f:1:1000:0:2]
    at GetAddrInfoReqWrap.onlookupall [as oncomplete] (node:dns:120:26) {
  errno: -3008,
  code: 'ENOTFOUND',
  syscall: 'getaddrinfo',
  hostname: '[2a01:4f9:3071:2c0f:1:1000:0:2]'
}

Node.js v22.13.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions