v2ray / discussion

For general discussion over Project V development and usage.
299 stars 34 forks source link

经过两层反代(v2->caddy->cdn或caddy)后,部分视频网站严重卡断 #525

Closed woshiniming007 closed 4 years ago

woshiniming007 commented 4 years ago

1) 你正在使用哪个版本的 V2Ray?(如果服务器和客户端使用了不同版本,请注明) 4.22.0

2) 你的使用场景是什么?(vmess的加密方法auto、none都试过) 经过两层反代,比如以下的各种情况 (1)v2->caddy(VPS)->caddy(香港服务器) (2)v2->nginx(VPS)->caddy(香港服务器) (3)v2->caddy(VPS)->阿里云CDN、腾讯云CDN (4)v2->nginx(VPS)->阿里云CDN、腾讯云CDN

3) 你看到的不正常的现象是什么? 在看部分视频网站如pornhub时,拖动视频性能差到几乎看不了(只一层代理的话则不卡)。 另一些网站如youtube就没问题,连接稳定速度快! 我用同一VPS作两层反代测试,即v2->caddy(VPS)->caddy(同一VPS),在本地<->VPS网络质量好的时候,与一层反代相比,看pornhub都比较流畅,但网络质量稍差时,两层反代比一层要卡顿很多。 测例1-4用的这些两层反代的连接质量其实已经很好了,youtube稳定80mbps,测试其他静态网页很流畅,pornhub巨卡,但其他视频网站未测试。

4) 你期待看到的正确表现是怎样的? 都流畅,而不是部分视频网站没法看

5) 请附上你的配置。 v2->caddy->caddy的配置文件 src.test.com:443 { root /root/www/v2 log /root/www/v2.log proxy /v2 localhost:10000 { websocket header_upstream -Origin } } relay.test.com:443 { proxy /v2 https://src.test.com { websocket header_upstream -Origin } }

6) 请附上出错时软件输出的错误日志。。 error.log里无出错log

7) 请附上访问日志。 在各种环境测试,搞不清哪是哪了,但总共只有这两种类型 2020/02/02 02:44:52 xx.xx.33.3 - - [02/Feb/2020:02:44:52 +0000] "GET /v2 HTTP/2.0" 400 12 2020/02/02 02:51:02 xx.xx.33.3 - - [02/Feb/2020:02:51:02 +0000] "GET /v2 HTTP/1.1" 200 0

8) v2ray服务端配置。

{ "inbound": { "port": 10000, "listen":"127.0.0.1", "protocol": "vmess", "settings": { "clients": [ { "id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxx", "alterId": 64 } ] }, "streamSettings": { "network": "ws", "wsSettings": { "path": "/v2" } } }, "outbound": { "protocol": "freedom", "settings": {} } }

9) v2ray客户端配置。

{ "policy": null, "log": { "access": "", "error": "", "loglevel": "warning" }, "inbounds": [ { "tag": "proxy", "port": 10800, "listen": "127.0.0.1", "protocol": "socks", "sniffing": { "enabled": true, "destOverride": [ "http", "tls" ] }, "settings": { "auth": "noauth", "udp": true, "ip": null, "address": null, "clients": null }, "streamSettings": null } ], "outbounds": [ { "tag": "proxy", "protocol": "vmess", "settings": { "vnext": [ { "address": "relay.test.com", "port": 36443, "users": [ { "id": "xxxxxxxxxxxxxxxx", "alterId": 64, "email": "t@t.tt", "security": "none" } ] } ], "servers": null, "response": null }, "streamSettings": { "network": "ws", "security": "tls", "tlsSettings": { "allowInsecure": false, "serverName": null }, "tcpSettings": null, "kcpSettings": null, "wsSettings": { "connectionReuse": true, "path": "/v2", "headers": null }, "httpSettings": null, "quicSettings": null }, "mux": { "enabled": true } }, { "tag": "direct", "protocol": "freedom", "settings": { "vnext": null, "servers": null, "response": null }, "streamSettings": null, "mux": null }, { "tag": "block", "protocol": "blackhole", "settings": { "vnext": null, "servers": null, "response": { "type": "http" } }, "streamSettings": null, "mux": null } ], "stats": null, "api": null, "dns": null, "routing": { "domainStrategy": "IPIfNonMatch", "rules": [ { "type": "field", "port": null, "inboundTag": "api", "outboundTag": "api", "ip": null, "domain": null }, { "type": "field", "port": null, "inboundTag": null, "outboundTag": "direct", "ip": [ "geoip:private" ], "domain": null }, { "type": "field", "port": null, "inboundTag": null, "outboundTag": "direct", "ip": [ "geoip:cn" ], "domain": null }, { "type": "field", "port": null, "inboundTag": null, "outboundTag": "direct", "ip": null, "domain": [ "geosite:cn" ] } ] } }

github-actions[bot] commented 4 years ago

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days