You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
同一个服务器配置,不经过CDN可以正常连接,经过CDN就会出现failed to read request version > EOF无法连接,Caddy日志如下: Dec 06 01:50:00 linux.g caddy[0987]: {"level":"error","ts":1100000000.8000000,"logger":"http.handlers.reverse_proxy","msg":"aborting with incomplete response","upstream":"localhost:5999","duration":0.000599076,"request":{"remote_ip":"172.69.1.2","remote_port":"44584","client_ip":"172.69.1.2","proto":"HTTP/2.0","method":"GET","host":"cloudflare.exameple.com","uri":"/default/uuid-uuid?","headers":{"Cf-Visitor":["{\"scheme\":\"https\"}"],"Accept-Encoding":["gzip, br"],"Cf-Ipcountry":["CN"],"User-Agent":["Go-http-client/2.0"],"X-Forwarded-Host":["cloudflare.example.com"],"Cf-Ray":["*-LHR"],"X-Forwarded-Proto":["https"],"Cdn-Loop":["cloudflare; loops=1"],"X-Forwarded-For":["172.69.1.2"],"Cf-Connecting-Ip":["218.1.0.0"]},"tls":{"resumed":false,"version":772,"cipher_suite":4865,"proto":"h2","server_name":"cloudflare.example.com"}},"error":"reading: context canceled"}
Structure
with CDN:
local --> Cloudflare CDN --> Caddy --> localhost:5999
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
同一个服务器配置,不经过CDN可以正常连接,经过CDN就会出现
failed to read request version > EOF
无法连接,Caddy日志如下:Dec 06 01:50:00 linux.g caddy[0987]: {"level":"error","ts":1100000000.8000000,"logger":"http.handlers.reverse_proxy","msg":"aborting with incomplete response","upstream":"localhost:5999","duration":0.000599076,"request":{"remote_ip":"172.69.1.2","remote_port":"44584","client_ip":"172.69.1.2","proto":"HTTP/2.0","method":"GET","host":"cloudflare.exameple.com","uri":"/default/uuid-uuid?","headers":{"Cf-Visitor":["{\"scheme\":\"https\"}"],"Accept-Encoding":["gzip, br"],"Cf-Ipcountry":["CN"],"User-Agent":["Go-http-client/2.0"],"X-Forwarded-Host":["cloudflare.example.com"],"Cf-Ray":["*-LHR"],"X-Forwarded-Proto":["https"],"Cdn-Loop":["cloudflare; loops=1"],"X-Forwarded-For":["172.69.1.2"],"Cf-Connecting-Ip":["218.1.0.0"]},"tls":{"resumed":false,"version":772,"cipher_suite":4865,"proto":"h2","server_name":"cloudflare.example.com"}},"error":"reading: context canceled"}
Structure
with CDN:
local --> Cloudflare CDN --> Caddy --> localhost:5999
without CDN:
local --> Caddy --> localhost:5999
Server config examp:
"inbounds": [ { "listen": "127.0.0.1", //只监听本机,避免本机外的机器探测到下面端口。 "port": 5999, //VLESS+SplitHTTP 监听端口 "protocol": "vless", "settings": { "clients": [ { "id": "uuiduui" } ], "decryption": "none" }, "streamSettings": { "network": "xhttp", "xhttpSettings": { "path": "/default" } }, "sniffing": { "enabled": true, "destOverride": [ "http", "tls", "quic" ] } } ]
Caddy config:
cloudflare.example.com { reverse_proxy /default/* localhost:5999 { transport http { versions 1.1 h2c 3 } } reverse_proxy localhost:55244 tls { dns cloudflare {env.CLOUDFLARE_API_TOKEN} } } direct.example.com { reverse_proxy /default/* localhost:5999 { transport http { versions 1.1 h2c 3 } } reverse_proxy localhost:55244 tls { dns cloudflare {env.CLOUDFLARE_API_TOKEN} } }
local config(v2rayng)
Beta Was this translation helpful? Give feedback.
All reactions