I’m using HTTPoison to send HTTP requests through a proxy, but when I change the proxy’s port, HTTPoison doesn’t seem to automatically adapt:
iex(1)> HTTPoison.get! "http://httpbin.org/ip", %{}, [proxy: {:socks5,'127.0.0.1', 9052}]
%HTTPoison.Response{
body: "{\n \"origin\": \"156.54.213.67, 156.54.213.67\"\n}\n",
iex(2)> HTTPoison.get! "http://httpbin.org/ip", %{}, [proxy: {:socks5,'127.0.0.1', 3}]
%HTTPoison.Response{
body: "{\n \"origin\": \"156.54.213.67, 156.54.213.67\"\n}\n",
Is there a way to force HTTPoison to use the port that was sent as an argument ?