| 1 | # Set example.org to 127.0.0.1 in /etc/hosts, then trigger the bug
|
|---|
| 2 | # by accessing one of these URLs:
|
|---|
| 3 | # https://example.org
|
|---|
| 4 | # https://example.org:8443
|
|---|
| 5 |
|
|---|
| 6 | events {
|
|---|
| 7 | worker_connections 1024;
|
|---|
| 8 | }
|
|---|
| 9 |
|
|---|
| 10 | stream {
|
|---|
| 11 | resolver 1.1.1.1;
|
|---|
| 12 |
|
|---|
| 13 | server {
|
|---|
| 14 | listen 443;
|
|---|
| 15 | ssl_preread on;
|
|---|
| 16 | # Hostnames are statically resolved to IPv6-only
|
|---|
| 17 | # Trigger the bug by binding to IPv4 local address
|
|---|
| 18 | proxy_bind 0.0.0.0;
|
|---|
| 19 | proxy_pass example.com:443;
|
|---|
| 20 | }
|
|---|
| 21 |
|
|---|
| 22 | server {
|
|---|
| 23 | listen 8443;
|
|---|
| 24 | ssl_preread on;
|
|---|
| 25 | # Hostnames are dynamically resolved to IPv4-only
|
|---|
| 26 | # Trigger the bug by binding to IPv6 local address
|
|---|
| 27 | proxy_bind ::;
|
|---|
| 28 | proxy_pass $ssl_preread_server_name:443;
|
|---|
| 29 | }
|
|---|
| 30 | }
|
|---|