| 1 | user cdnuser cdnuser;
|
|---|
| 2 | worker_processes auto;
|
|---|
| 3 | pid /cdn/nginx_quic/run/nginx.pid;
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 | error_log /dev/null error;
|
|---|
| 7 |
|
|---|
| 8 | worker_rlimit_nofile 73728;
|
|---|
| 9 | worker_rlimit_core 10240M;
|
|---|
| 10 | working_directory /cdn/tmp/quiccores/;
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 | events {
|
|---|
| 14 | worker_connections 24576;
|
|---|
| 15 | use epoll;
|
|---|
| 16 | }
|
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 | http {
|
|---|
| 20 | include mime.types;
|
|---|
| 21 | default_type application/octet-stream;
|
|---|
| 22 | reset_timedout_connection on;
|
|---|
| 23 | client_header_timeout 60s;
|
|---|
| 24 | client_body_timeout 60s;
|
|---|
| 25 | send_timeout 60s;
|
|---|
| 26 | client_header_buffer_size 16k;
|
|---|
| 27 | large_client_header_buffers 4 16k;
|
|---|
| 28 | client_body_buffer_size 1k;
|
|---|
| 29 | client_max_body_size 1k;
|
|---|
| 30 | connection_pool_size 512;
|
|---|
| 31 | server_names_hash_bucket_size 4096;
|
|---|
| 32 | server_names_hash_max_size 4096;
|
|---|
| 33 | request_pool_size 8k;
|
|---|
| 34 | output_buffers 1 256k;
|
|---|
| 35 | postpone_output 1460;
|
|---|
| 36 | proxy_buffers 8 8k;
|
|---|
| 37 |
|
|---|
| 38 | sendfile on;
|
|---|
| 39 | tcp_nopush off;
|
|---|
| 40 | tcp_nodelay on;
|
|---|
| 41 | keepalive_timeout 180;
|
|---|
| 42 | keepalive_requests 1024;
|
|---|
| 43 | ignore_invalid_headers on;
|
|---|
| 44 | recursive_error_pages on;
|
|---|
| 45 | resolver 127.0.0.53 ipv6=off;
|
|---|
| 46 | resolver_timeout 5s;
|
|---|
| 47 | add_header X-VHostId $tcpinfo_rtt;
|
|---|
| 48 |
|
|---|
| 49 | ssl_protocols TLSv1.3;
|
|---|
| 50 | quic_retry on;
|
|---|
| 51 | quic_gso on;
|
|---|
| 52 | http3 on;
|
|---|
| 53 |
|
|---|
| 54 | ssl_ciphers 'AESGCM kEECDH+ECDSA+AES128 kEECDH+ECDSA+AES256 kEECDH+AES128 kEECDH+AES256 kEDH+AES128 kEDH+AES256 DES-CBC3-SHA RC4 +SHA !aNULL !eNULL !LOW !kECDH !DSS !MD5 !EXP !PSK !SRP !CAMELLIA !SEED';
|
|---|
| 55 | ssl_session_timeout 5h;
|
|---|
| 56 | ssl_session_cache shared:SSL:250m;
|
|---|
| 57 | ssl_session_tickets on;
|
|---|
| 58 | ssl_stapling on;
|
|---|
| 59 | ssl_dhparam dhparam2048.pem;
|
|---|
| 60 | ssl_buffer_size 16k;
|
|---|
| 61 |
|
|---|
| 62 | # ssl proxy
|
|---|
| 63 | set_real_ip_from 127.0.0.1;
|
|---|
| 64 | set_real_ip_from unix:;
|
|---|
| 65 | real_ip_header X-Forwarded-For;
|
|---|
| 66 |
|
|---|
| 67 |
|
|---|
| 68 | upstream local_rp {
|
|---|
| 69 | server 127.0.0.1;
|
|---|
| 70 | }
|
|---|
| 71 |
|
|---|
| 72 | server {
|
|---|
| 73 | listen [::]:443 quic reuseport;
|
|---|
| 74 | server_name changed_to.exmple.com;
|
|---|
| 75 | ssl_certificate /cdn/ngx_ssl_certs/user_0/some_cert.crt;
|
|---|
| 76 | ssl_certificate_key /cdn/ngx_ssl_certs/user_0/some_cert.key;
|
|---|
| 77 | proxy_pass_request_headers off;
|
|---|
| 78 | proxy_intercept_errors on;
|
|---|
| 79 | proxy_max_temp_file_size 0;
|
|---|
| 80 |
|
|---|
| 81 | slice 1m;
|
|---|
| 82 | proxy_set_header Range $slice_range;
|
|---|
| 83 |
|
|---|
| 84 | http3_stream_buffer_size 327680;
|
|---|
| 85 | http3_max_concurrent_streams 128;
|
|---|
| 86 |
|
|---|
| 87 | proxy_connect_timeout 10s;
|
|---|
| 88 | proxy_read_timeout 60s;
|
|---|
| 89 | proxy_send_timeout 10s;
|
|---|
| 90 |
|
|---|
| 91 | proxy_set_header Host $host;
|
|---|
| 92 | proxy_set_header X-Forwarded-For $remote_addr;
|
|---|
| 93 | proxy_set_header X-CDN-Force-SSL "True";
|
|---|
| 94 | proxy_set_header X-CDN-HTTP2 "$http3";
|
|---|
| 95 | proxy_set_header X-CDN-HTTPS "$https";
|
|---|
| 96 | proxy_set_header X-CDN-HTTP3 "$http3";
|
|---|
| 97 | proxy_set_header X-CDN-TCPINFO-RTT "$tcpinfo_rtt";
|
|---|
| 98 | proxy_set_header Referer "$http_referer";
|
|---|
| 99 | proxy_set_header User-Agent "$http_user_agent";
|
|---|
| 100 |
|
|---|
| 101 | location / {
|
|---|
| 102 | proxy_pass http://local_rp/ ;
|
|---|
| 103 | }
|
|---|
| 104 | }
|
|---|
| 105 | # .
|
|---|
| 106 | # .
|
|---|
| 107 | # .
|
|---|
| 108 | }
|
|---|