Closed rdtq closed 2 years ago
You have to configure the socks protocol. gun:connect
is for HTTP CONNECT.
https://github.com/ninenines/gun/blob/master/test/socks_SUITE.erl#L215-L224 for example.
It's for 2.0 but it's not super different for 1.3, not sure anything even changed.
Thanks! What worked for me was
{:ok, socks_conn} = :gun.open('socks5server.net', 1080, %{transport: :tcp, protocols: [{:socks, %{host: 'bing.com', port: 443, transport: :tls}}]})
I've been trying to setup this for a few days now 😋 I'm using gun with Elixir project.
Here's my code (roughly translated from the docs here https://ninenines.eu/docs/en/gun/1.3/manual/gun.connect/#_examples ):
What I get is:
Am I using gun wrong?