Skip to content

Instantly share code, notes, and snippets.

@StefanYohansson
Last active August 9, 2020 22:21
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save StefanYohansson/ce450ef0ef2020a3fd5837da593cfcc2 to your computer and use it in GitHub Desktop.
HTTP/2 curl
FROM haproxy:2.2.2
COPY haproxy.cfg /usr/local/etc/haproxy/haproxy.cfg
COPY cert.pem /tmp/test.pem
COPY key.pem /tmp/test.pem.key
#!/usr/bin/env sh
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 10000 -nodes -subj '/CN=127.0.0.1'
defaults
timeout connect 5s
timeout client 1m
timeout server 1m
listen bad
mode tcp
bind *:1234
listen https
mode http
bind *:443 ssl crt /tmp/test.pem alpn h2
server bad 127.0.0.1:1234
#!/usr/bin/env sh
./generatekey.sh
docker build -t my-haproxy .
docker run -d -p 443:443 --name my-running-haproxy my-haproxy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment