xhttp在客户端启用h3通过cloudflare cdn代理时无法上网 #4258
Unanswered
bubuqing99
asked this question in
Q&A
Replies: 1 comment 5 replies
-
服务端 mode 不需配置,默认自动即可。 |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
搭建了vless+xhttp+tls,在cloudflare仅dns或cloudflare cdn时客户端都是可以上网。
不过在客户端填写h3时,只有在cloudflare仅dns时可以上网,当cloudflare代理流量时客户端就没法上网,不知道怎么解决。
nginx版本是1.27.3,已经启用quic和h3。
查看xray客户端和nginx服务端日志都显示确实是通过http3连接的。
本人小白,配置都是参考大佬们写的,还有靠chatgpt写好的,希望有大佬指导一下,谢谢。
这是xray服务端配置:
{
"log": {
"access": "/var/log/xray/access.log",
"error": "/var/log/xray/error.log",
"loglevel": "warning"
},
"inbounds": [
{
"listen": "/dev/shm/xrxh.socket,0666",
"protocol": "vless",
"settings": {
"clients": [
{
"id": "fbec4d67-1b04-4813-9b20-4444cd285f75"
}
],
"decryption": "none"
},
"streamSettings": {
"network": "xhttp",
"xhttpSettings": {
"mode": "stream-one",
"path": "/fffffff"
}
}
}
],
"outbounds": [
{
"protocol": "freedom",
"settings": {}
}
]
}
这是nginx的配置:
error_log /var/log/nginx/error.log debug;
events {
worker_connections 768;
}
http {
}
客户端配置
{
"log": {
"loglevel": "info"
},
"inbounds": [
{
"port": "2335",
"listen": "127.0.0.1",
"protocol": "socks",
"settings": {
"udp": true
}
}
],
"outbounds": [
{
"protocol": "vless",
"settings": {
"vnext": [
{
"address": "ffff.com",
"port": 443,
"users": [
{
"id": "fbec4d67-1b04-4813-9b20-4444cd285f75",
"encryption": "none"
}
]
}
]
},
"streamSettings": {
"network": "xhttp",
"xhttpSettings": {
"path": "fffffff", //填写你的 path
"mode": "stream-one", //如使用 downloadSettings(下行),不可用 stream-one;可用 stream-up。
"#xmux": { //使用默认值。如需自定义:移除前面的 #(井号)。注意:不可超过 Nginx 的最高(上限)值。
"maxConcurrency": 128, //Nginx 默认上限 128。https://nginx.org/en/docs/http/ngx_http_v3_module.html#http3_max_concurrent_streams
"hMaxRequestTimes": 1000, //Nginx 默认上限 1000。https://nginx.org/en/docs/http/ngx_http_core_module.html#keepalive_requests
"hMaxReusableSecs": 3600 //Nginx 默认上限 3600s(1h)。https://nginx.org/en/docs/http/ngx_http_core_module.html#keepalive_time
},
"#downloadSettings": { //如需 H2 下行:移除前面的 #(井号)以使用 downloadSettings;上面和 server.json 的 mode 更改为 stream-up。
"address": "ffff.com",
"port": 443,
"network": "xhttp",
"xhttpSettings": {
"path": "fffffff", //填写你的 path(同上)
"#xmux": { //使用默认值。如需自定义:移除前面的 #(井号)。注意:不可超过 Nginx 的最高(上限)值。
"maxConcurrency": 128, //Nginx 默认上限 128。https://nginx.org/en/docs/http/ngx_http_v3_module.html#http3_max_concurrent_streams
"hMaxRequestTimes": 1000, //Nginx 默认上限 1000。https://nginx.org/en/docs/http/ngx_http_core_module.html#keepalive_requests
"hMaxReusableSecs": 3600 //Nginx 默认上限 3600s(1h)。https://nginx.org/en/docs/http/ngx_http_core_module.html#keepalive_time
}
}
]
}
xray客户端日志
Xray 24.12.31 (Xray, Penetrates Everything.) 4be32e9 (go1.23.4 windows/amd64)
A unified platform for anti-censorship.
2025/01/06 15:59:07 [Info] infra/conf/serial: Reading config: &{Name:xray.json Format:json}
2025/01/06 15:59:07 [Info] transport/internet/tcp: listening TCP on 127.0.0.1:2335
2025/01/06 15:59:07 [Info] transport/internet/udp: listening UDP on 127.0.0.1:2335
2025/01/06 15:59:07 [Warning] core: Xray 24.12.31 started
2025/01/06 15:59:07 [Info] [2637343663] proxy/socks: TCP Connect request to tcp:play.google.com:443
2025/01/06 15:59:07 [Info] [2637343663] app/dispatcher: default route for tcp:play.google.com:443
2025/01/06 15:59:07 from tcp:127.0.0.1:12353 accepted tcp:play.google.com:443
2025/01/06 15:59:07 [Info] [2637343663] transport/internet/splithttp: XHTTP is dialing to udp:ffff.com:443, mode stream-one, HTTP version 3, host ffff.com
2025/01/06 15:59:07 [Info] [2637343663] proxy/vless/outbound: tunneling request to tcp:play.google.com:443 via ffff.com:443
2025/01/06 15:59:07 [Info] [3971998774] proxy/socks: TCP Connect request to tcp:play.google.com:443
2025/01/06 15:59:07 from tcp:127.0.0.1:12352 accepted tcp:play.google.com:443
2025/01/06 15:59:07 [Info] [3971998774] app/dispatcher: default route for tcp:play.google.com:443
2025/01/06 15:59:07 [Info] [3971998774] transport/internet/splithttp: XHTTP is dialing to udp:ffff.com:443, mode stream-one, HTTP version 3, host ffff.com
2025/01/06 15:59:07 [Info] [3971998774] proxy/vless/outbound: tunneling request to tcp:play.google.com:443 via ffff.com:443
2025/01/06 15:59:08 [Info] [1087766951] proxy/socks: TCP Connect request to tcp:alive.github.com:443
2025/01/06 15:59:08 [Info] [1087766951] app/dispatcher: default route for tcp:alive.github.com:443
2025/01/06 15:59:08 from tcp:127.0.0.1:12356 accepted tcp:alive.github.com:443
2025/01/06 15:59:08 [Info] [1087766951] transport/internet/splithttp: XHTTP is dialing to udp:ffff.com:443, mode stream-one, HTTP version 3, host ffff.com
2025/01/06 15:59:08 [Info] [1087766951] proxy/vless/outbound: tunneling request to tcp:alive.github.com:443 via ffff.com:443
2025/01/06 15:59:11 [Info] [2629257952] proxy/socks: TCP Connect request to tcp:www.google.com:443
2025/01/06 15:59:11 [Info] [2629257952] app/dispatcher: default route for tcp:www.google.com:443
2025/01/06 15:59:11 from tcp:127.0.0.1:12357 accepted tcp:www.google.com:443
2025/01/06 15:59:11 [Info] [2629257952] transport/internet/splithttp: XHTTP is dialing to udp:ffff.com:443, mode stream-one, HTTP version 3, host ffff.com
2025/01/06 15:59:11 [Info] [2629257952] proxy/vless/outbound: tunneling request to tcp:www.google.com:443 via ffff.com:443
2025/01/06 15:59:11 [Info] [2451264429] proxy/socks: TCP Connect request to tcp:www.youtube.com:443
2025/01/06 15:59:11 from tcp:127.0.0.1:12358 accepted tcp:www.youtube.com:443
2025/01/06 15:59:11 [Info] [2451264429] app/dispatcher: default route for tcp:www.youtube.com:443
2025/01/06 15:59:11 [Info] [2451264429] transport/internet/splithttp: XHTTP is dialing to udp:ffff.com:443, mode stream-one, HTTP version 3, host ffff.com
2025/01/06 15:59:11 [Info] [2451264429] proxy/vless/outbound: tunneling request to tcp:www.youtube.com:443 via ffff.com:443
2025/01/06 15:59:27 [Info] [2637343663] app/proxyman/inbound: connection ends > proxy/socks: connection ends > context canceled
nginx后台日志
172.69.195.149 - - [06/Jan/2025:16:01:00 +0800] "POST /fffffff/?x_padding=000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 HTTP/2.0" 200 5190 "-" "quic-go HTTP/3"
172.69.195.149 - - [06/Jan/2025:16:01:06 +0800] "POST /fffffff/?x_padding=0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 HTTP/2.0" 200 5211 "-" "quic-go HTTP/3"
172.69.195.149 - - [06/Jan/2025:16:01:24 +0800] "POST /fffffff/?x_padding=00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 HTTP/2.0" 200 7673 "-" "quic-go HTTP/3"
172.69.195.149 - - [06/Jan/2025:16:01:31 +0800] "POST /fffffff/?x_padding=000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 HTTP/2.0" 200 5189 "-" "quic-go HTTP/3"
172.69.195.149 - - [06/Jan/2025:16:02:13 +0800] "POST /fffffff/?x_padding=0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 HTTP/2.0" 200 5191 "-" "quic-go HTTP/3"
Beta Was this translation helpful? Give feedback.
All reactions