ITADN

v2ray dokodemo-door 透明代理没有正确处理SNI中不带端口的host

#3335Closedkirbyzhou 创建于 2025-07-09
K
kirbyzhoucommented
除非特殊情况,请完整填写所有问题。不按模板发的 issue 将直接被关闭。 如果你遇到的问题不是 V2Ray 的 bug,比如你不清楚要如何配置,请使用[Discussion](https://github.com/v2fly/discussion/issues)进行讨论。 1) 你正在使用哪个版本的 V2Ray?(如果服务器和客户端使用了不同版本,请注明) 5.30 2) 你的使用场景是什么?比如使用 Chrome 通过 Socks/VMess 代理观看 YouTube 视频。 使用dns欺骗 + dokodemo-door 实现 https 透明代理 3) 你看到的不正常的现象是什么?(请描述具体现象,比如访问超时,TLS 证书错误等) 如果透明代理监听的不是443端口,而是其他端口,例如2983 透明代理转发流量时,从https sni字段读取到不带端口号的host www.google.com 后,会尝试通过outbound去访问 www.google.com:2983 4) 你期待看到的正确表现是怎样的? 如果SNI里的host不带端口号,则采用https的默认端口号443 5) 请附上你的配置(提交 Issue 前请隐藏服务器端IP地址)。 服务器端配置: ```javascript // 和服务器端无关 ``` 客户端配置: ```javascript { "log": { "access": "/var/log/v2ray/access.log", "error": "/var/log/v2ray/error.log", "loglevel": "info" }, "inbounds": [ { "port": 2983, "protocol": "dokodemo-door", "settings": { "network": "tcp,udp", "followRedirect": true }, "sniffing": { "enabled": true, "destOverride": ["http", "tls"] }, "streamSettings": { "sockopt": { "tproxy": "tproxy" } } } } ], "outbounds": [ { "protocol": "vless", "tag": "proxy", "mux": { "concurrency": 8, "enabled": false }, "settings": { "vnext": [ { "users": [ { "encryption": "none", "id": "...", "flow": "", "level": 0 } ], "address": "XXX", "port": 12345 } ] }, "streamSettings": { ... } }, { "protocol": "freedom", "tag": "direct", "settings": { "userLevel": 0, "domainStrategy": "UseIP" } }, { "protocol": "blackhole", "tag": "block", "settings": { "response": { "type": "none" } } } ], "transport": {}, "dns": { "servers": [ "1.1.1.1", "8.8.8.8" ] }, "routing": { "domainStrategy": "AsIs", "rules": [ { "type": "field", "inboundTag": [ "api" ], "outboundTag": "api" }, { "type": "field", "outboundTag": "block", "domain": [ "geosite:category-ads-all" ] }, { "type": "field", "outboundTag": "direct", "domain": [ "geosite:cn" ] }, { "type": "field", "port": "0-65535", "outboundTag": "proxy" } ] } } ``` 6) 请附上出错时软件输出的错误日志。在 Linux 中,日志通常在 `/var/log/v2ray/error.log` 文件中。 服务器端错误日志: ```javascript // 忽略 ``` 客户端错误日志: ```javascript 2025/07/07 15:04:56 [Info] [704599051] proxy/dokodemo: received request for 192.168.18.82:59016 2025/07/07 15:04:56 [Info] [704599051] app/dispatcher: sniffed domain: www.google.com for tcp:192.168.18.3:2983 2025/07/07 15:04:56 [Info] [704599051] app/dispatcher: taking detour [proxy] for [tcp:www.google.com:2983] 2025/07/07 15:04:56 [Info] [704599051] transport/internet/websocket: creating connection to tcp:XXX:12345 2025/07/07 15:04:56 [Info] [704599051] proxy/vless/outbound: tunneling request to tcp:www.google.com:2983 via XXX:12345 ``` 7) 请附上访问日志。在 Linux 中,日志通常在 `/var/log/v2ray/access.log` 文件中。 ```javascript // 在这里附上客户端日志 2025/07/07 15:04:56 192.168.18.82:59016 accepted tcp:192.168.18.3:2983 [proxy] ``` 8) 其它相关的配置文件(如 Nginx)和相关日志。 9) 如果 V2Ray 无法启动,请附上 `--test` 输出。 通常的命令为 `/usr/bin/v2ray/v2ray --test --config /etc/v2ray/config.json`。请按实际情况修改。 10) 如果 V2Ray 服务运行不正常,请附上 journal 日志。 通常的命令为 `journalctl -u v2ray`。 请预览一下你填的内容再提交。
关闭于 2025-07-09 0 条评论