Network Interface setting (VPN Kill Switch)

I recently discovered that qBittorrent essentially has a VPN Kill Switch feature built into the client which will kill its connection if it detects your VPN has disconnected. VPN kill switches from VPN clients for the desktop are not fully reliable as they can often fail and you can still connect to the internet with a unencrypted connection with your IP exposed.

I would like to purpose adding this feature in the settings of Syncthing. This way if your VPN disconnects, Syncthing will also lose internet access too.

You can already do this by either configuring things to connect over specific addresses, or to listen on specific network interfaces.

How would I do this to ensure all of my traffic (Except for local LAN traffic) goes through my VPN and if my VPN disconnects, Syncthing is offline?

Configure the devices to only listen on vpn adapter, or configure devices to connect over specific addresses, i.e., vpn addresses.

To configure Syncthing to only run on a specific network interface, such as a VPN network interface on your desktop device. If you set Syncthing to only run on your VPN network interface, Syncthing will not be able to connect to the outside world.