4

I have a Ubuntu server that has multiple IP addresses. As an example, how do I set the correct IP address for outbound requests in a library like python requests?

vgoklani
  • 10,685
  • 16
  • 63
  • 101
  • Do you mean to ask if it is possible to configure the interface that the `requests` module uses? – DeepSpace Jul 11 '16 at 15:27
  • 1
    Try the solution in this issue: https://github.com/kennethreitz/requests/issues/394 – Alden Jul 11 '16 at 15:30
  • 1
    If you mean binding to a source address, look at the [requests toolbelt](https://toolbelt.readthedocs.io/en/latest/adapters.html#sourceaddressadapter). – Lex Scarisbrick Jul 11 '16 at 15:31

0 Answers0