ws+tls+nginx+xray
song
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

server {
listen 80;
listen [::]:80;
server_name mikubar.xyz;
return 301 https://mikubar.xyz$request_uri;
}

server {
listen 443 ssl http2;
listen [::]:443 http2;
server_name mikubar.xyz;

ssl_certificate /wwwroot/cert/mikubar.pem;
ssl_certificate_key /wwwroot/cert/mikubar.key;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers TLS-AES-256-GCM-SHA384:TLS-CHACHA20-POLY1305-SHA256:TLS-AES-128-GCM-SHA256:TLS-AES-128-CCM-8-SHA256:TLS-AES-128-CCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256;

# 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=31536000";
root /wwwroot/html;
index index.php index.html index.htm;

location /rootwss {
proxy_redirect off;
proxy_pass http://127.0.0.1:3307;
proxy_http_version 1.1;
proxy_connect_timeout 30s;
proxy_send_timeout 60s;
proxy_read_timeout 60s;
proxy_set_header Host $http_host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}

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
57
58
59
60
{
"log":{
"access":"/wwwroot/log/xray-access.log",
"error":"/wwwroot/log/xray-error.log",
"loglevel":"warning"
},
"inbounds":[
{
"port":3307,
"protocol":"vless",
"settings":{
"clients":[
{
"id":"27848739-xxxxxx-098a63964b6b",
"level":1,
"alterId":0
}
],
"decryption":"none"
},
"streamSettings":{
"network":"ws",
"security":"none",
"wsSettings":{
"path":"/rsx"
}
}
},
{
"port":3308,
"protocol":"vmess",
"settings":{
"clients":[
{
"id":"c7d4ae2xxxxxxxxxxxx-b517bf7045",
"level":1,
"alterId":0
}
]
},
"streamSettings":{
"network":"tcp"
},
"sniffing":{
"enabled":true,
"destOverride":[
"http",
"tls"
]
}
}
],
"outbounds":[
{
"protocol":"freedom"
}
]
}


由 Hexo 驱动 & 主题 Keep