xat / castnow

commandline chromecast player
MIT License
3.81k stars 243 forks source link

castnow picks up wrong IP address #56

Open kim0 opened 9 years ago

kim0 commented 9 years ago

My machine has multiple IP addresses (I've got virtualization software installed). I noticed castnow picks up the wrong IP address, thus initially it was never working for me .. I noticed that if I pass the --myip parameter, it does work (and it's awesome)

castnow should automatically pick the IP address that falls within the network of the chromecast device.

xat commented 9 years ago

Very nice idea :) If someone has multiple network adapters in the same network as chromecast we would just choose randomly one of them I guess.

kim0 commented 9 years ago

Another (possibly simpler) solution, is to bind the webserver to ip 0.0.0.0 which corresponds to all known IP addresses .. Usually bad for security, but in this case, I guess the convenience beats being too pedantic on security .. Guess that would work no?

xat commented 9 years ago

Chromecast also needs to know your IP since it's fetching the video data from your computer.

kim0 commented 9 years ago

Agreed :+1:

kennyluk commented 8 years ago

I use vmware on OSX and castnow is still picking up the VM's interfaces, even though their ip's begin with 172.16 and my real machine's ip is 192.168

bugdanov commented 7 years ago

Hi there !

It's because internal-ip returns the last ip address instead ot the primary network interface address.

I fixed it with this: https://github.com/bugdanov/internal-ip/commit/0b9a350d5cd973693a3570380293adc6011e5d92

Could not test it on Windows or MacOS