systemd-resolved synthetic DNS records not being respected
- Dominant language
- TypeScript
- Stars
- 40k
- Forks
- 2.4k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 61
Description
### Expected Behavior
Service documentation: https://www.freedesktop.org/software/systemd/man/systemd-resolved.service.html
I'm running a few apps which use the format of "{app name}.localhost", which is a normal synthetic record resolved by systemd-resolved.service. This format of URL is used for convenience as I run a lot of localhost apps at the same time and this is a nicer alternative than having each app run on a different port.
I'm unable to reach these applications through insomnia without manually adding records for the specific app to my localhost.
This is the same issue as https://github.com/Kong/insomnia/issues/4445 except I'm not using MacOS so I can't be sure if the cause is the same. I don't even know if MacOS uses systemd-resolved. If this should be one issue then please close this and add the details I've found about the problem to that ticket.
### Actual Behavior
Error: Couldn't resolve host name
### Reproduction Steps
- On a linux machine using systemd-resolved, which is almost every modern distribution. Host a simple nginx hello world app.
- Access it through your browser to test it's working "http://anythingyoulike.localhost"
- Run a GET request against "http://whateveryouwant.localhost" and observe the "Error: Couldn't resolve host name"
### Is there an existing issue for this?
- [X] I have searched the [issue tracker](https://www.github.com/Kong/insomnia/issues) for this problem.
### Additional Information
_No response_
### Insomnia Version
2022.3.0
### What operating system are you using?
Ubuntu
### Operating System Version
20.04.4 LTS x86_64
### Installation method
apt
### Last Known Working Insomnia version
_No response_
Contributor guide
Research direction
Start by reproducing the request on Ubuntu 20.04 with systemd-resolved, comparing Insomnia's handling of an address such as anythingyoulike.localhost with browser behavior. Trace the request and hostname-resolution entry points; done means synthetic .localhost records work without manually adding hosts entries, with regression coverage if the existing test structure supports it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux, typescript
- Domain
- desktop, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100