From 92fd84f61f95a0ecb8aea75c28207d81a9c6f94d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Wed, 11 Sep 2019 07:22:07 +0200 Subject: Initial support for Socks5 --- src/gun_tls_proxy.erl | 1 + 1 file changed, 1 insertion(+) (limited to 'src/gun_tls_proxy.erl') diff --git a/src/gun_tls_proxy.erl b/src/gun_tls_proxy.erl index 3978822..d519919 100644 --- a/src/gun_tls_proxy.erl +++ b/src/gun_tls_proxy.erl @@ -237,6 +237,7 @@ not_connected(cast, Msg={setopts, _}, State) -> {keep_state_and_data, postpone}; not_connected(cast, Msg={connect_proc, {ok, Socket}}, State=#state{owner_pid=OwnerPid, extra=Extra}) -> ?DEBUG_LOG("msg ~0p state ~0p", [Msg, State]), + %% @todo We should distinguish case when no protocol was negotiated (for socks). Protocol = case ssl:negotiated_protocol(Socket) of {ok, <<"h2">>} -> gun_http2; _ -> gun_http -- cgit v1.2.3