usebruno / bruno

Opensource IDE For Exploring and Testing Api's (lightweight alternative to postman/insomnia)
https://www.usebruno.com/
MIT License
25.43k stars 1.16k forks source link

Compatibility with urls containing IPv6 IP addresses #2338

Open answerquest opened 4 months ago

answerquest commented 4 months ago

I have checked the following:

Describe the feature you want to add

I have a server on an IPv6 address, and it has deployed an api on a port. There is a GET api endpoint active on it. The following api url works fine from browser as well as Postman:

http://[some:ip:v6:ip:address]:8000/api

But the same url in Bruno when hit as a GET api, returns this error:

Error invoking remote method 'send-http-request': Error: getaddrinfo ENOTFOUND [some:ip:v6:ip:address]

Desired outcome: the api on the IPv6 address should work properly in Bruno same way it works from web browser or Postman.

Note: My actual IPv6 address is not revealed as it's a work thing and I'm not at liberty to publicly expose it.

PS: enclosing the IPv6 IP address within square brackets [] is the standard practice right now. I'm even able to connect to this server from FileZilla (SFTP) by giving the host enclosed in []

Mockups or Images of the feature

Screenshot from 2024-05-18 21-10-22
screenshot of the IPv6 api call working successfully in Postman

gemiusz commented 3 months ago

Bruno: 1.18.1 System: Windows 11

TL;DR; Can't reproduce this bug.

@answerquest I have try to reproduce this bug but it's failed and in my opinion it's something with resolving DNS/IP on your side. You must provide reproducable steps to confirm this bug.

Steps what I use to try to reproduce:

Accept: [application/json, text/plain, /] request-start-time: [1717703506094] User-Agent: [axios/1.7.2] Accept-Encoding: [gzip, compress, deflate, br] Host: [[::1]:8080] Connection: [close]

Matched response definition: { "status" : 200, "body" : "{\"status\":\"GOOD\",\"fruits\":[{\"name\":\"Apple\",\"details\":{\"size\":500}},{\"name\":\"Cherry\",\"details\":{\"size\":100}}]}", "headers" : { "Content-Type" : "application/json" } }

Response: HTTP/1.1 200 Content-Type: [application/json] Matched-Stub-Id: [dc057c5e-ab26-4e64-9c45-48b1e2728924]



- make call by Link-local IPv6 Address - interface 1:
![image](https://github.com/usebruno/bruno/assets/30750006/ce3602fc-7989-41d2-81a5-f9c0c6f50186)
![image](https://github.com/usebruno/bruno/assets/30750006/90ed23ba-09ce-45fb-abc4-30d5c918a449)

- make call by Link-local IPv6 Address - interface 2:
![image](https://github.com/usebruno/bruno/assets/30750006/3f9a1a34-df3a-456d-a980-79fc336f1caf)
![image](https://github.com/usebruno/bruno/assets/30750006/18b34ea6-5890-460d-b24a-adbb991118c8)

- make call by Link-local IPv6 Address - interface 3:
![image](https://github.com/usebruno/bruno/assets/30750006/5dd532f0-7e17-4b1e-8d43-8023c88c3d83)
![image](https://github.com/usebruno/bruno/assets/30750006/77c67e85-3d6f-483b-a988-2efb3d163994)
kinuax commented 3 months ago

I can reproduce the same Error invoking remote method 'send-http-request': Error: getaddrinfo ENOTFOUND [ipv6] with Bruno 1.17.0 and 1.18.0 on Linux. Besides, corresponding browser, curl and httpx requests work correctly.

answerquest commented 3 months ago

@gemiusz Hi I should have shared my OS details, maybe this is happening by the way Bruno interacts with the OS?

OS where bug is happening: Linux Mint 21.1

VERSION_CODENAME=vera UBUNTU_CODENAME=jammy

CPU architecture: x86_64 / amd64

Everything else on the system is able to hit IPv6 addresses just fine, including Postman for linux.

Also my system's own IP address as assigned by internet service provider (not a fixed one) is an IPv6 one : 2401:4900:1c17:a73b:aae4:xxxx:xxxx:xxxx (masking last parts)