Surveillance station behind HAProxy

Hi, Everyone.

Hope you guys can help me, I have setup HAProxy in my pfsense. I am using Cloudflare to host my domain and external DNS. I have Synology NAS behind the HAProxy, I am able to make Synology Drive and Photos work with HAProxy but I am having trouble making Surveillance Station work. Here is a breakdown of the issues that is happening:

  1. Using the mobile client behind my network. I am not able to login using camera.mydomain.com:443

  2. Using a mobile client connected 4G/5G, I am able to authenticate but not able to play live view or any recording

  3. On a Desktop Client using camera.mydomain.com:443 I am able to login and view the live video and recording

I have attached the stats for my camera:

Please let me know what information you needed to help me address this issue so I can provide it.

I have never use HAPorxy with Synology but since it works on desktop my guess the mobile app is looking for something that HAProxy does not pass over the proxy connection.

Hi, Tom.

Thanks for the reply, yeah I guess this is more of mobile client issue. I have also open a ticket with Synology and I will update this thread once we get a response from support.

Hi, Everyone.

I have finally fixed the issue, the Synology support provide me this kb article: https://kb.synology.com/en-global/Surveillance/tutorial/WebSocket_connection_fail_streaming_issue

Surveillance station is using websocket, I have a bit of googling and found this discussion in netgate forum: Websockets configuration in HAProxy | Netgate Forum

This help me fix my issue. Here is what I have added in frontend configuration:

1 Like

Just to expand on this if anyone like me did not get this first time, make two entries within your Frontend, under the actions (backend)… of course yours will match what youve named your backend.

No settings altered within Synology, all default. Mine is working great with Surveillance Station on a Xpenology VM on proxmox.

hope this adds more and helps