I'm using elixir to make some XMLRPC queries to an host on my machine that accepts only call from 127.0.x.y where x and y can be configurable but the ip can not be 127.0.0.1.
Simple curl
requests to this host would fail unless I add the flag --interface 127.0.x.y
.
How can I start my elixir application with a given interface ip different from 127.0.0.1?
The library I use to send the request is HTTPoison if this can be helpful.
You can pass
ip
in theconnect_options
tohackney
.hackney
passesconnect_options
directly togen_tcp
, which accepts anip
: