tsenart / vegeta

HTTP load testing tool and library. It's over 9000!
http://godoc.org/github.com/tsenart/vegeta/lib
MIT License
23.51k stars 1.36k forks source link

Feature request: Supporting SNI #178

Closed sumikawa closed 6 years ago

sumikawa commented 8 years ago

To benchmark https site which only accessible with SNI extension, I want to specify servername otherwise TLS handshake will failure from server side.

Reference: https://golang.org/pkg/crypto/tls/#ClientHelloInfo

        // ServerName indicates the name of the server requested by the client
        // in order to support virtual hosting. ServerName is only set if the
        // client is using SNI (see
        // http://tools.ietf.org/html/rfc4366#section-3.1).
        ServerName string
tsenart commented 8 years ago

Yes, this is doable.

chrismoos commented 7 years ago

@sumikawa How do you know SNI is not working? Using the below command I can verify the server_name is properly set in the Client Hello packet with go version go1.7.3 darwin/amd64:

$ echo "GET https://www.yahoo.com/" | vegeta attack -duration=1s | tee results.bin | vegeta report