VUS custom ip address

How can i send a http request with custom ip address?

Hi @Sepehr79m
Welcome to the forum. Do you mean the IP of the sender here? If so, then no, that is quite out of scope of k6. If you meant the receiver’s IP, then you can just put it in place of the domain in URL of HTTP request and that’s it.

1 Like

@Sepehr79m, additionally, you may find these global options of k6 useful as well:

  • –local-ips in CLI or ENV for customizing the sender’s IPs if it’s available
  • hosts in config for custom DNS resolution

As you can see from descriptions, these options have certain limitations in their usage: e.g. the IP in --local-ips must already be present on the given machine. But depending on your exact use case, these options may be handy :slightly_smiling_face: