Hey, are you want to a socks5 client which could auto check the server is reachable?
I have a lot of C programming experience, and I use proxy server every day. So I think I can help you.
But writing a socks5 client maybe need some time because of there is very many protocol detail to deal.
Looking forward to discussing more detail with you.