What is the problem?
When connecting locally it works fine, the camera image shows up on the controls page .
But when I'm connecting remotely trough tailscale(vpn), it does not work.
Long story short ,I have a separate raspberry that runs pihole, octopi and my ip phone camera is configured trought pihole (It has a local dns entry), in octopi the Stream URL is: http://pi.camera:8080/video
Very important , the phone camera is not introduced to the vpn tunnel (it does not have a vpn ip),so i can't access it trough vpn.
My question is that why does this occur, more exactly
I can access an octopi instance locally that can access the video stream.
But when I'm connecting to a octopi instance remotely, it does not see that stream anymore...
I know that stream URL does not exist for me (the vpn user), because it's not introduced to the vpn tunnel, but for octopi it still exists locally ,why can't it show it to me ?
This issue probably could be solved by introducing the camera to the vpn tunnel (make for the camera a vpn ip), but then I dont know how to automate switching between the streams (Use the local stream when connected to octopi localy and use the vpn stream when connected from a vpn user)
OctoPrint doesn't proxy the webcam stream through its own server, this would cause unnecessary resource usage. In your browser, the UI tries to embed the stream directly using the URL you give it. Since it's not connected to your VPN, it can't be embedded.
if you go the route of haproxy config like I said then there is no switching. you configure the webcam stream url as /webcam/... for example. doesn't matter how you access, because it's relative and because the pi running haproxy is in the network it will reverse proxy the ip camera to the front-end.
I'm pretty new to this whole thing - I got haproxy.cfg open in WinSCP, can @jneilliii or @czerjak22 detail exactly what I need to change in order to get my IP camera (also a phone) accessible through tailsacle?
after making the change did you restart haproxy (sudo service haproxy restart) or reboot the pi? I assume that you access your stream as http://192.168.1.84:8080/... basically replace the http://192.168.1.84:8080/ part of your URL with http://<ip of octoprint>/webcam/.