Allow specifying a list of addresses to connect to for a given target host/port
Proposal
Add a flag to vegeta attack that does something similar to what the --connect-to flag does on curl. The idea would be having something like:
echo GET https://mi.internal.server | ./vegeta attack -connect-to my.internal.server:[email protected]:443,10.1.2.4:443 -insecure
that would connect to 10.1.2.3 or 10.1.2.4 when the target host:port is my.internal.server, without hitting the corporate DNS servers. This would also allow running tests locally.
Background
Vegeta (go actually) doesn't cache DNS results. That means that any attack with hundreds of thousands of calls end up doing also hundreds of thousands of DNS calls, which is something I don't need or want. On the other hand, our load balancers work distributing calls using SNI, so just connecting by IP would not work.
Workarounds
If the host:address where you're connecting doesn't use SNI you could try connecting by IP address. Or you could add the host to your /etc/hosts (or Windows equivalent file) and hope the go net code hits that before hitting the DNS server. Or you could setup a local DNS server to avoid stressing the corporate one.