Enhanced SOCKS5 Support

Enhanced SOCKS5 Support

Supports HTTP and HTTPS destinations and performs all hostname resolution via the SOCKS proxy, preventing privacy leakage if used with Tor.

Verified to work when the destination url uses an IP address instead of a hostname.
What about something like this instead:

````erlang
connect(Host, Port, Via) when is_list(Host), is_integer(Port), is_port(Via) ->
    {AddressType, Address} = case inet:parse_address(Host) of
        {_, _, _, _} = IPv4Address ->
            {?ATYP_IPV4, list_to_binary(IPv4Address)};
        {_, _, _, _, _, _, _, _} = IPv6Address ->
            {?ATYP_IPV6, list_to_binary(IPv6Address)};
        _ ->
            {?ATYP_DOMAINNAME, list_to_binary(Host)}
    end,
    ok = gen_tcp:send(Via,
        <<?VERSION, ?CONNECT, ?RESERVED, AddressType,
          (byte_size(Address)), Address/binary,
          Port:16>>),
    case gen_tcp:recv(Via, 0) of
        {ok, <<?VERSION, ?SUCCEEDED, ?RESERVED, _/binary>>} -> ok;
        {ok, <<?VERSION, Rep, ?RESERVED, _/binary>>} -> {error, reply(Rep)};
        {error, Reason} -> {error, Reason}
    end.
````