-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx.conf
56 lines (49 loc) · 1.53 KB
/
nginx.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
worker_processes auto;
events {
worker_connections 10240;
}
http {
include /etc/nginx/conf.d/*.conf;
client_max_body_size 500M;
proxy_cache off;
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
upstream v2ray {
server v2ray:80;
}
server {
listen 443 ssl;
server_name _;
ssl_certificate /ssl/cert.pem;
ssl_certificate_key /ssl/key.pem;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-CHACHA20-POLY1305;
ssl_prefer_server_ciphers on;
keepalive_timeout 120;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 1m;
location /ws {
proxy_pass http://v2ray;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}
}
server {
listen 80;
server_name _;
keepalive_timeout 120;
location /ws {
proxy_pass http://v2ray;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}
}
}