Skip to content
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

Support multicast DNS (mdns) via MulticastLock #536

Open
max-mapper opened this issue Jan 11, 2018 · 3 comments
Open

Support multicast DNS (mdns) via MulticastLock #536

max-mapper opened this issue Jan 11, 2018 · 3 comments

Comments

@max-mapper
Copy link

Hi, I am trying to use Termux to share files between my android and laptop, but I can't get any code that uses multicast DNS to work. I believe it is because Termux needs to request a MulticastLock: https://stackoverflow.com/questions/13221736/android-device-not-receiving-multicast-package/13223018#13223018

To test if it's working, do pkg install node and then npm install multicast-dns and then run node example.js with this example: https://github.com/mafintosh/multicast-dns/blob/master/example.js. You should see multicast traffic from your network, including your own query.

@max-mapper max-mapper changed the title Support multicast DNS via MulticastLock Support multicast DNS (mdns) via MulticastLock Jul 24, 2018
@mrvik
Copy link

mrvik commented Dec 11, 2020

I have created a mdns relay (respond DNS queries for .local using mDNS). mDNS resolver is apparently working but utils like ping can't resolve them, I think functions resolving names, getaddrinfo iirc, aren't using mDNS.

Project is here: https://gitlab.com/mrvik/mdns-proxy
On cmd/resolve/ there is a mDNS client to test the mdns package.
image

@daiaji
Copy link

daiaji commented Oct 17, 2021

@mrvik As there seems to be no progress in the transplantation of Avahi, and Android itself seems to have not implemented the function of MDNS server, so it is impossible to use MDNS to access Android devices, I hope you can add the function of MDNS in this program.

@Vinfall
Copy link

Vinfall commented Jul 6, 2022

Not sure if related, as I came across mDNS-stuff just two days ago.

Android 12 made an adjustment to the DNS Resolver that makes you access .local via apps like Chrome, no longer limited to specific API.

Also, the default Android hostname is localhost which is useless, and from this discussion, I guess it's only possible to change the hostname w/ root?

Lastly, avahi is now available in Termux, see termux/packages#65.

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

No branches or pull requests

4 participants