peterldowns / localias

custom local domain aliases for local dev servers
MIT License
583 stars 3 forks source link

.local / mDNS doesn't work when localias runs inside wsl2 #36

Open lumosminima opened 6 days ago

lumosminima commented 6 days ago

I'm using WSL2 and was previously just starting my dev servers with 0.0.0.0 and adding firewall allow rules to access the server on my phone using machine local IP: 192.168.1... but needed https for some app features and the readme here mentions mDNS magic which I don't know what it is but currently I can't access .local domains from phone, localias mentions mDNS: serving ui.local. On actual machine where I run the localias everything works I can resolve ui.local is there something extra needed for it to work also how will my android phone know that ui.local means that it is that specific machine with WSL2 it needs to connect to when it doesn't have any special DNS entry like how the main machine running the localias does?

peterldowns commented 4 days ago

On actual machine where I run the localias everything works I can resolve ui.local is there something extra needed for it to work also how will my android phone know that ui.local means that it is that specific machine with WSL2 it needs to connect to when it doesn't have any special DNS entry like how the main machine running the localias does?

Unfortunately, broadcasting mDNS rules from inside of a WSL2 container don't seem to "make it out" to other devices on the network. I haven't been able to figure out why this is or make it work myself. I will update the README to make this clear — I'm sorry that this confused you.

Some related reading that I've found:

peterldowns commented 4 days ago

I added a section to the documentation clarifying this problem, and I'll keep this issue open until someone figures out how to fix it.