wenger66
wenger66

Reputation: 41

Locust, How to set source request ip

The virtual machine which run Locust has multiple network cards

Is there any way to set source request IP of Locust?

https://docs.locust.io/en/stable/configuration.html#command-line-options

Upvotes: 2

Views: 1126

Answers (1)

Cyberwiz
Cyberwiz

Reputation: 11426

It should be possible by monkey patching socket.create_connection() using the solution described here, as Locust’s HttpUser uses requests.

Requests, bind to an ip

My original answer was deleted by a mod for some unknown reason. Lets hope it doesnt happen again...

Upvotes: 2

Related Questions