make curl use the socks5 proxy when option is set.
add proper error handling to the socks5 support.