Well, I guess there are no configuration options so I think I will catch dbus notifications that signal the VPN failure and then kill my torrent client so that my traffic doesnt get shaped by my ISP.
Here is a (rudimentary but working) piece of python code that does that:
# licensed under GNU General Public License version 2
def catchall_signal_handler(*args, **kwargs):
print ("Caught signal (in catchall handler) "
if args >= 6: #vpn disconnect (6) or failure (7)
print ("killing bittorrent client")
os.system('killall -9 transmission')
if __name__ == '__main__':
bus = dbus.SystemBus()
#lets make a catchall
bus.add_signal_receiver(catchall_signal_handler, signal_name='VpnStateChanged', interface_keyword='dbus_interface', member_keyword='member')
loop = gobject.MainLoop()
A possible improvement would be to send a dbus signal to close existing internet connections instead of killing only specific apps. I'll do that later when I have some free time