Redsocks proxy behavior with failed Proxy Server

I’ve recently implemented proxy support for our fleet of devices using a Socks5 proxy.
Everything works fine per the documentation.
Recently, we adjusted our cloud infrastructure, and for a brief time our Socks5 proxy server became unresponsive and would allow connection but would not proxy.
All devices setup for proxy went offline and would not reconnect until the power was cycled on the devices.
Since these devices were effectively disconnected, and remote, no logs or information is readily available to me.

Does anyone have any recommendations regarding monitoring the status of the redsocks proxy?
Would it be possible to add a monitoring service as part of the balena container or OS to assure that the proxy does not crash or become unresponsive? Even if that were a full device reboot.

Thanks in advance!


Hey Chris, I think the easiest way to accomplish this would be to create a custom watchdog service container that polls for internet connectivity and after a certain number of failures triggers a reboot via the DBus or the SDK.

This would avoid changes to the host OS and give you complete control over the reboot scenario, timing, etc.

Hi Chris - did you manage to try the suggestion from Kyle?

Yes, we’re going to employ a combination strategy of VPN connection state and our service connection failure count to force a reboot via the Balena supervisor API to mitigate the dead proxy condition. This so far appears to be a working strategy.

Hey Chris, just wanted to check in on how this solution has been working for you so far, let me know if there are any other issues we can help with.

Thanks we’re good on the proxy behavior and workarounds!