Skip to content

Add support for ipv6 urls #795

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Add support for ipv6 urls #795

wants to merge 3 commits into from

Conversation

cressie176
Copy link
Collaborator

See #794

@cressie176 cressie176 requested a review from Copilot July 20, 2025 13:45
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for IPv6 URLs in AMQP connections by properly parsing IPv6 addresses in bracket notation (e.g., amqp://[::1]). The change ensures that IPv6 addresses wrapped in square brackets are correctly processed when establishing connections.

  • Strips square brackets from IPv6 addresses in URLs before passing to socket connection
  • Adds test coverage for IPv6 URL connection functionality

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
lib/connect.js Implements IPv6 URL parsing by removing bracket notation from hostnames
test/connect.js Adds test case to verify IPv6 URL connection functionality
Comments suppressed due to low confidence (1)

test/connect.js:133

  • The test only verifies that the connection doesn't throw an error, but doesn't validate that the IPv6 address is correctly parsed or that the connection actually uses the expected host. Consider adding assertions to verify the connection properties.
  test("ipv6", function(done) {

cressie176 and others added 2 commits July 20, 2025 14:46
@cressie176 cressie176 requested a review from kibertoad July 20, 2025 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant