vless为什么默认回落到 html/websocket路径下, 不在index.html
nginx报错:
2022/09/25 10:36:55 [error] 19034#0: *336 open() "/usr/local/nginx/html/websocket" failed (2: No such file or directory), client: 127.0.0.1, server: “domain”, request: "GET /websocket HTTP/1.1", host: "domain"
配置文件:
{
"log": {
"loglevel": "debug",
"access": "/usr/local/xray/log/access.log",
"error": "/usr/local/xray/log/error.log"
},
"dns": {
"servers": [
"localhost"
]
},
"routing": {
"domainStrategy": "IPIfNonMatch",
"rules": [
{
"type": "field",
"ip": [
"geoip:private"
],
"outboundTag": "block"
},
{
"type": "field",
"domain": [
"geosite:category-ads-all"
],
"outboundTag": "block"
},
{
"type": "field",
"domain": [
"geosite:cn"
],
"outboundTag": "block"
},
{
"type": "field",
"domain": [
"geoip:cn"
],
"outboundTag": "block"
}
]
},
"inbounds": [
{
"port": 4443,
"protocol": "vless",
"settings": {
"clients": [
{
"id": "",
"flow": "xtls-rprx-direct",
"level": 0
}
],
"decryption": "none",
"fallbacks": [
{
"dest": "8081"
}
]
},
"streamSettings": {
"network": "tcp",
"security": "xtls",
"xtlsSettings": {
"allowInsecure": false,
"minVersion": "1.3",
"alpn": ["http/1.1"],
"certificates": [
{
"certificateFile": "/usr/local/xray/ssl/fullchain.pem",
"keyFile": "/usr/local/xray/ssl/key.pem"
}
]
}
}
}
],
"outbounds": [
{
"tag": "direct",
"protocol": "freedom"
},
{
"tag": "block",
"protocol": "blackhole"
}
]
}
nginx配置文件:
events {
worker_connections 1024;
}
http {
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 8081;
server_name domain;
location / {
root html;
index index.html index.htm;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
}