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

html websocket is 127.0.0.1 when connecting from remote computer (RPI3) #8

Closed
MetallianFR68 opened this issue Jun 9, 2018 · 3 comments

Comments

@MetallianFR68
Copy link

I just installed cam2ip on my RPI B3+ and it works well.
My RPI has static IP 192.168.0.60
MJPEG works perfectly when I connect here : http://192.168.0.60:56000/mjpeg

But HTML doesn't work when connecting to http://192.168.0.60:56000/html
I'm connecting from a remote computer on the network
But the javascript code wants to open websocket 127.0.0.1
"WebSocket connection to 'ws://127.0.0.1:56000/socket' failed: Error in connection establishment:net::ERR_CONNECTION_REFUSED"

It should open ws://192.168.0.60:56000

Am I doing something wrong ?

@gen2brain
Copy link
Owner

If you want to bind to specific ip/port use the -bind option, if not given it will default to localhost.

@gen2brain
Copy link
Owner

Hmm, I tried to use 0.0.0.0 as default, if -bind-addr is not specified, but it doesn't work on all browsers.

@gen2brain
Copy link
Owner

Fixed in 4d73010 .

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

2 participants