Repository navigation
NGINX(domain)+VLESS+XHTTP+TLS: [Connection reset by peer | upstream prematurely closed] problems #5386
|
Hi! After reading here #4113 and after looking at various examples, I probably didn't fully figure it out, because I don't understand why the connection is broken. I have next configuration:
I have no errors in xray logs(error, access), but i have many errors in nginx logs: 1. Nginx error.log2. Full nginx.conf nginx.conf3. Xray server configuration Xray server configuration{
"log": {
"loglevel": "debug",
"access": "/var/log/xray/access.log",
"error": "/var/log/xray/error.log"
},
"inbounds": [
{
"tag": "xhttp-tls",
"listen": "/dev/shm/xrxh.socket,0666",
"protocol": "vless",
"settings": {
"clients": [
{
"id": "MY UUID",
"email": "xhttp@test",
"flow": ""
}
],
"decryption": "none",
"encryption": "none"
},
"streamSettings": {
"network": "xhttp",
"security": "tls",
"xhttpSettings":
{
"mode": "auto",
"path": "/mypath"
}
},
"tlsSettings": {
"alpn": [
"h2",
"h3"
],
"certificates": [
{
"certificateFile": "/etc/ssl/certs/fullchain_mysite.site.pem",
"keyFile": "/etc/ssl/private/mysite.site.key"
}
],
"minVersion": "1.2"
},
"sniffing": {
"enabled": true,
"routeOnly": false,
"destOverride": ["http", "tls", "quic", "fakedns"]
}
}
],
"outbounds": [
{ "tag": "direct", "protocol": "freedom" },
{ "tag": "block", "protocol": "blackhole" }
],
"routing": {
"domainStrategy": "AsIs",
"rules": [
{
"inboundTag": ["xhttp-tls"],
"outboundTag": "block",
"protocol": ["bittorrent"]
},
{
"inboundTag": ["xhttp-tls"],
"outboundTag": "block",
"domain": ["geosite:category-ads-all"]
},
{
"inboundTag": ["xhttp-tls"],
"outboundTag": "direct"
}
]
}
}4. My client outbound config coppied from "Export selected for complete configuration" v2rayN's option : client outbound config{
"outbounds": [
{
"tag": "proxy",
"protocol": "vless",
"settings": {
"vnext": [
{
"address": "mysite.site",
"port": 443,
"users": [
{
"id": "MY UUID",
"email": "t@t.tt",
"security": "auto",
"encryption": "none"
}
]
}
]
},
"streamSettings": {
"network": "xhttp",
"security": "tls",
"tlsSettings": {
"allowInsecure": false,
"alpn": ["h3", "h2"],
"fingerprint": "firefox"
},
"xhttpSettings": {
"path": "/mypath",
"mode": "auto"
}
},
"mux": {
"enabled": false,
"concurrency": -1
}
},
{
"tag": "direct",
"protocol": "freedom"
},
{
"tag": "block",
"protocol": "blackhole"
}
]
}So I will be glad of any help. |
Replies: 3 comments 1 reply
|
As i understand xray closed connection but i don't understand reason |
|
Part of v2rayN errros logs: v2RayN Client error logs |
|
Я предполагаю следующее. Nginx слушает на 443 порту и устанавливает TLS-соединение, но ты настраиваешь его также в конфигурации xray. Однако nginx уже расшифровал его, поэтому tlsSettings для xray не нужны. |
Я предполагаю следующее. Nginx слушает на 443 порту и устанавливает TLS-соединение, но ты настраиваешь его также в конфигурации xray. Однако nginx уже расшифровал его, поэтому tlsSettings для xray не нужны.