new script hook - on connection failures

This is where we can discuss what we would like to see added or changed in OpenVPN.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Post Reply
User avatar
krzee
Forum Team
Posts: 728
Joined: Fri Aug 29, 2008 5:42 pm

new script hook - on connection failures

Post by krzee » Thu Oct 27, 2011 6:43 pm

would be nice to have a script hook for failed connections.
(so when a connection is attempted, and fails, a script is run)

User avatar
janjust
Forum Team
Posts: 2703
Joined: Fri Aug 20, 2010 2:57 pm
Location: Amsterdam
Contact:

Re: new script hook

Post by janjust » Thu Oct 27, 2011 6:54 pm

client side or server side or both?

User avatar
krzee
Forum Team
Posts: 728
Joined: Fri Aug 29, 2008 5:42 pm

Re: new script hook

Post by krzee » Thu Oct 27, 2011 7:14 pm

good question. client side would be good for my needs... i cant think of a need that server-side would use it for, but i assume there is one.
the reason i could use this is as follows:
im using RR DNS (multiple A entries for a single host)
on starting openvpn on android, it randomly chooses a host to connect to (good) but then if that host is down (or goes down) it never tries another host, it just sits there unable to connect to the dead one. On the other system i tested so far, this worked as expected, just not on android. If I had this hook client side I could see about having the script d some trickery to either restart the network, or restart openvpn, or restart the resolver (if i can find a way, and if that works)

User avatar
krzee
Forum Team
Posts: 728
Joined: Fri Aug 29, 2008 5:42 pm

Re: new script hook

Post by krzee » Thu Oct 27, 2011 11:40 pm

solved my problem with many extra remote entries, each with its own hostname
that way i can simply add hosts in dns and they will work in configs that i can no longer access. (thanks for the idea eugenekay)
still think this could be a handy place for a hook, but i no longer need it

Post Reply