mirror of https://github.com/wulabing/Xray_onekey
38 lines
1.2 KiB
Plaintext
38 lines
1.2 KiB
Plaintext
server {
|
|
listen 443 ssl http2;
|
|
listen [::]:443 ssl http2;
|
|
ssl_certificate /ssl/xray.crt;
|
|
ssl_certificate_key /ssl/xray.key;
|
|
ssl_protocols TLSv1.3;
|
|
ssl_ecdh_curve X25519:P-256:P-384:P-521;
|
|
server_name xxx;
|
|
index index.html index.htm;
|
|
root /www/xray_web;
|
|
error_page 400 = /400.html;
|
|
|
|
# Config for 0-RTT in TLSv1.3
|
|
ssl_early_data on;
|
|
ssl_stapling on;
|
|
ssl_stapling_verify on;
|
|
add_header Strict-Transport-Security "max-age=63072000" always;
|
|
|
|
location /ray/
|
|
{
|
|
proxy_redirect off;
|
|
proxy_pass http://127.0.0.1:10000;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header X-Real-IP \$remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
proxy_set_header Host $http_host;
|
|
# Config for 0-RTT in TLSv1.3
|
|
proxy_set_header Early-Data $ssl_early_data;
|
|
}
|
|
}
|
|
server {
|
|
listen 80;
|
|
listen [::]:80;
|
|
server_name xxx;
|
|
return 301 https://$http_host$request_uri;
|
|
} |