IP webcam [Phone](pihole tailscale) incorporate

Camera model
Samsung a20e

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:

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.

1 Like

you could potentially configure your haproxy in octopi pi to redirect the /webcam/ folder to that ip camera to load through it and then you should be able to access over the tailscale network.

Thank you for your quick and reinforcing response!
That is what I tought , so I need to add my ip cameras to my vpn as well , but there still remains the automatic switch problem between views....

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.

1 Like

Yup it's working , thank you !