Locust,如何设置源请求ip

Locust, How to set source request ip

运行Locust多网卡的虚拟机

有什么方法可以设置 Locust 的源请求 IP 吗?

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

使用此处描述的解决方案通过猴子修补 socket.create_connection() 应该是可能的,因为 Locust 的 HttpUser 使用 requests.

Requests, bind to an ip

我原来的回答被 mod 出于某种未知原因删除了。希望不要再发生...