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
ipin theconnect_optionstohackney.hackneypassesconnect_optionsdirectly togen_tcp, which accepts anip: