Skip to content

Instantly share code, notes, and snippets.

@ramr
Created June 11, 2018 23:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ramr/c55d15803a3b083b7ed9eb587846c2a2 to your computer and use it in GitHub Desktop.
Save ramr/c55d15803a3b083b7ed9eb587846c2a2 to your computer and use it in GitHub Desktop.
haproxy http2 support tests
$ curl -k --http2 -vvv --resolve edge.header.test:443:127.0.0.1 https://edge.header.test/
* Added edge.header.test:443:127.0.0.1 to DNS cache
* Hostname edge.header.test was found in DNS cache
* Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to edge.header.test (127.0.0.1) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* Cipher selection: PROFILE=SYSTEM
* successfully set certificate verify locations:
* CAfile: /etc/pki/tls/certs/ca-bundle.crt
CApath: none
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Client hello (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256
* ALPN, server accepted to use h2
* Server certificate:
* subject: CN=header.test; ST=CA; C=US; O=Security; OU=OpenShift3
* start date: Feb 1 00:45:10 2017 GMT
* expire date: Feb 1 00:45:10 2037 GMT
* issuer: C=US; ST=CA; O=Security; OU=OpenShift3 test CA; CN=header.test CA
* SSL certificate verify result: self signed certificate in certificate chain (19), continuing anyway.
* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* Using Stream ID: 1 (easy handle 0x560caa0621d0)
> GET / HTTP/2
> Host: edge.header.test
> User-Agent: curl/7.55.1
> Accept: */*
>
* Connection state changed (MAX_CONCURRENT_STREAMS updated)!
< HTTP/2 200
< date: Mon, 11 Jun 2018 23:13:41 GMT
< content-length: 305
< set-cookie: 84b8695e09938cf8e101e3f186b6425b=d3737cbd59dd17ab8976fce618dfea67; path=/; HttpOnly; Secure
< cache-control: private
<
<pre>
user-agent: curl/7.55.1
accept: */*
host: edge.header.test
x-forwarded-host: edge.header.test
x-forwarded-port: 443
x-forwarded-proto: https
x-forwarded-proto-version: h2
forwarded: for=127.0.0.1;host=edge.header.test;proto=https;proto-version=h2
x-forwarded-for: 127.0.0.1
</pre>
* Connection #0 to host edge.header.test left intact
$
$ curl -k --http2 -vvv --resolve reencrypt.header.test:443:127.0.0.1 https://reencrypt.header.test/
* Added reencrypt.header.test:443:127.0.0.1 to DNS cache
* Hostname reencrypt.header.test was found in DNS cache
* Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to reencrypt.header.test (127.0.0.1) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* Cipher selection: PROFILE=SYSTEM
* successfully set certificate verify locations:
* CAfile: /etc/pki/tls/certs/ca-bundle.crt
CApath: none
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Client hello (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256
* ALPN, server accepted to use h2
* Server certificate:
* subject: CN=header.test; ST=CA; C=US; O=Security; OU=OpenShift3
* start date: Feb 1 00:45:10 2017 GMT
* expire date: Feb 1 00:45:10 2037 GMT
* issuer: C=US; ST=CA; O=Security; OU=OpenShift3 test CA; CN=header.test CA
* SSL certificate verify result: self signed certificate in certificate chain (19), continuing anyway.
* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* Using Stream ID: 1 (easy handle 0x563f3c1cd1d0)
> GET / HTTP/2
> Host: reencrypt.header.test
> User-Agent: curl/7.55.1
> Accept: */*
>
* Connection state changed (MAX_CONCURRENT_STREAMS updated)!
< HTTP/2 200
< date: Mon, 11 Jun 2018 23:14:43 GMT
< content-length: 320
< set-cookie: 2f95fb9c2d6f8edffe494028cbb2c9ca=d0962123efd30ea9a197ca9c5014c981; path=/; HttpOnly; Secure
< cache-control: private
<
<pre>
user-agent: curl/7.55.1
accept: */*
host: reencrypt.header.test
x-forwarded-host: reencrypt.header.test
x-forwarded-port: 443
x-forwarded-proto: https
x-forwarded-proto-version: h2
forwarded: for=127.0.0.1;host=reencrypt.header.test;proto=https;proto-version=h2
x-forwarded-for: 127.0.0.1
</pre>
* Connection #0 to host reencrypt.header.test left intact
[ramr@f27 origin (cached:haproxy-http2:c-1:s-0+0:o-7)]$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment