aykevl / plaincast

Server that acts like a lightweight/headless Chromecast that only includes YouTube (for the time being)
BSD 2-Clause "Simplified" License
127 stars 19 forks source link

mDNS Support #5

Closed KeizerDev closed 7 years ago

KeizerDev commented 7 years ago

@aykevl Maybe we could implement a library like this: https://github.com/hashicorp/mdns in plaincast.

If you go to other projects who search for Chromecasts on the like network using mDNS we can get a pretty good insight on the way it works; https://github.com/johnf/chromecast-discover-node/blob/master/src/index.js#L28

Maybe we could work on this on a separate branch.

Please let me know your thoughts about this!

aykevl commented 7 years ago

TL;DR: sadly it probably won't work but feel free to try

I have looked into this before. There are two Chromecast APIs for apps, v1 and v2. v1 uses the DIAL protocol, and v2 uses mDNS and a protobuf channel over TLS on port 8009, which is locked down.

The only thing I can imagine that might work (as described in the link above), is that if there is a Chromecast device in the network, we can do a replay attack. But after 48 hours, this will stop working.

Additionally, once we manage to implement mDNS support (and the whole protobuf-based protocol after it), we need to actually use it. The YouTube app doesn't need it (it uses SSDP), and that's the only app that's currently implemented. But if it works, it will probably make it possible to cast YouTube videos from the Chrome browser. So if it is possible, it'll be a lot of work.

I am currently working on other things, this project doesn't really have priority for me (I'll fix bugs if they turn up and will test pull requests, but not much more than that). But I'm really happy if you want to try to get it to work.

More information:

aykevl commented 7 years ago

Closing this as it appears impossible (right now).