Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VLESS-XHTTP3-Nginx的配置似乎不成功 #208

Closed
shinyboy opened this issue Dec 31, 2024 · 7 comments
Closed

VLESS-XHTTP3-Nginx的配置似乎不成功 #208

shinyboy opened this issue Dec 31, 2024 · 7 comments

Comments

@shinyboy
Copy link

Xray 24.12.18

VLESS-XHTTP3-Nginx的配置会在xray server端报错
proxy/vless/inbound: connection ends > context canceled

xray server端报错如下:
2024/12/31 13:16:34 from XXXX请求IP:0 accepted tcp:developers.google.com:443
2024/12/31 13:16:34 [Info] [2621369704] proxy/freedom: connection opened to tcp:developers.google.com:443, local endpoint 10.0.0.82:40978, remote endpoint 172.217.25.174:443
2024/12/31 13:16:34 [Info] [2621369704] proxy: CopyRawConn readv
2024/12/31 13:16:35 [Info] [2621369704] app/proxyman/inbound: connection ends > proxy/vless/inbound: connection ends > context canceled

server端相关配置如下:
"inbounds": [
{
"listen": "/dev/shm/xrxh.socket,0666",
"protocol": "vless",
"settings": {
"clients": [
{
"id": "XXX"
}
],
"decryption": "none"
},
"streamSettings": {
"network": "xhttp",
"xhttpSettings": {
"mode": "stream-one",
"path": "/split"
}
}
},

client端配置如下:

"outbounds": [
{
"protocol": "vless",
"settings": {
"vnext": [
{
"address": "XXX",
"port": 443,
"users": [
{
"id": "XXX" //填写你的 UUID
}
]
}
]
},
"streamSettings": {
"network": "xhttp",
"xhttpSettings": {
"path": "/split", //填写你的 path
"mode": "stream-one",
"xmux": {
"maxConcurrency": 128,
"cMaxReuseTimes": 1000,
"cMaxLifetimeMs": 3600000
}
}
"security": "tls",
"tlsSettings": {
"alpn": [
"h3"
]
}
}
}

nginx相关配置如下

  location /split/ {
    client_max_body_size 0;
    grpc_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    client_body_timeout 5m;
    grpc_read_timeout 315;
    grpc_send_timeout 5m;
    grpc_pass unix:/dev/shm/xrxh.socket;
  }
@4nonch

This comment was marked as off-topic.

@xqzr
Copy link
Contributor

xqzr commented Jan 3, 2025

I'm having issues with XHTTP3 too.
But different kind of error: [Info] transport/internet/splithttp: invalid x_padding length:0

Try xPaddingBytes: -1 in xhttpSettings

@xqzr
Copy link
Contributor

xqzr commented Jan 3, 2025

看起来服务端(入站)已经收到并理解请求,检查与 TCP 172.217.25.174:443 的连接。
提供客户端(出站)日志

@4nonch
Copy link

4nonch commented Jan 3, 2025

Try xPaddingBytes: -1 in xhttpSettings

OK, i'm sorry for silly question. I should've test client with debug log mode before asking. xPaddingBytes issue occured when i tried to make curl request to my path and i mistook it for client log. So actual issue is: client can't reach my host

Client requests for some reason fails to execute:

2025/01/04 01:37:17 [Debug] [2049168422] transport/internet: dialing to udp:my.host.com:443
2025/01/04 01:37:17 [Info] [2049168422] transport/internet/splithttp: failed to POST https://my.host.com/mypath/7300f7be-ced5-411d-b209-ba16096ac392?x_padding=000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 > Post "https://my.host.com/mypath/7300f7be-ced5-411d-b209-ba16096ac392?x_padding=000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000": lookup my.host.com: no such host
2025/01/04 01:37:17 [Info] [2049168422] proxy/vless/outbound: tunneling request to tcp:130.255.77.28:443 via my.host.com:443
2025/01/04 01:37:18 [Info] [2049168422] app/proxyman/inbound: connection ends > proxy/socks: connection ends > context canceled
2025/01/04 01:37:18 [Info] [1788824348] proxy/socks: TCP Connect request to tcp:130.255.77.28:443
2025/01/04 01:37:18 [Info] [1788824348] app/dispatcher: default route for tcp:130.255.77.28:443
2025/01/04 01:37:18 [Info] [1788824348] transport/internet/splithttp: XHTTP is dialing to udp:my.host.com:443, mode stream-up, HTTP version 3, host my.host.com
2025/01/04 01:37:18 [Debug] [1788824348] transport/internet: dialing to udp:my.host.com:443
2025/01/04 01:37:18 from tcp:127.0.0.1:65297 accepted tcp:130.255.77.28:443
2025/01/04 01:37:18 [Info] [1788824348] transport/internet/splithttp: failed to GET https://my.host.com/mypath/c6edd6a5-bf19-4a60-9c8a-681ea555b57e?x_padding=00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 > Get "https://my.host.com/mypath/c6edd6a5-bf19-4a60-9c8a-681ea555b57e?x_padding=00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000": lookup my.host.com: no such host
2025/01/04 01:37:18 [Debug] [1788824348] transport/internet: dialing to udp:my.host.com:443
2025/01/04 01:37:18 [Info] [1788824348] transport/internet/splithttp: failed to POST https://my.host.com/mypath/c6edd6a5-bf19-4a60-9c8a-681ea555b57e?x_padding=00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 > Post "https://my.host.com/mypath/c6edd6a5-bf19-4a60-9c8a-681ea555b57e?x_padding=00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000": lookup my.host.com: no such host
2025/01/04 01:37:18 [Info] [1788824348] proxy/vless/outbound: tunneling request to tcp:130.255.77.28:443 via my.host.com:443
2025/01/04 01:37:19 [Info] [1788824348] app/proxyman/inbound: connection ends > proxy/socks: connection ends > context canceled
2025/01/04 01:37:22 [Debug] app/log: Logger closing

Probably some poor client/nginx configuration occurred. Will try to fix it later.

@xqzr
Copy link
Contributor

xqzr commented Jan 3, 2025

lookup my.host.com: no such host

check ur DNS

@4nonch

This comment was marked as off-topic.

@Fangliding
Copy link
Member

Fangliding commented Jan 3, 2025

没模板不处理
按主项目那个模板发

@Fangliding Fangliding closed this as not planned Won't fix, can't repro, duplicate, stale Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants