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

dokodemo-door 无法转发 iperf #1974

Closed
ToutyRater opened this issue Oct 27, 2019 · 2 comments
Closed

dokodemo-door 无法转发 iperf #1974

ToutyRater opened this issue Oct 27, 2019 · 2 comments

Comments

@ToutyRater
Copy link
Contributor

提交 Issue 之前请先阅读 Issue 指引,然后回答下面的问题,谢谢。
除非特殊情况,请完整填写所有问题。不按模板发的 issue 将直接被关闭。
如果你遇到的问题不是 V2Ray 的 bug,比如你不清楚要如何配置,请使用Discussion进行讨论。

  1. 你正在使用哪个版本的 V2Ray?(如果服务器和客户端使用了不同版本,请注明)
    v4.2 至 v4.21.0 均有测试

  2. 你的使用场景是什么?比如使用 Chrome 通过 Socks/VMess 代理观看 YouTube 视频。
    使用 dokodemo-dorr 转发 iperf:

  1. 在本地运行 V2Ray,监听 5000 端口,将 5000 端口接转发至 127.0.01:5201;
  2. 本地执行 iperf3 -s 以开启 iperf 服务端(默认监听 5201 端口);
  3. 本地执行 iperf3 -c 127.0.0.1 -p 5000 进行测试。
  1. 你看到的不正常的现象是什么?(请描述具体现象,比如访问超时,TLS 证书错误等)
    v4.2 至 v4.7.0 的版本都可以正常转发 iperf,v4.8.0 至 v4.21.0 的版本都不能正常转发 iperf。

  2. 你期待看到的正确表现是怎样的?
    正常转发 iperf

  3. 请附上你的配置(提交 Issue 前请隐藏服务器端IP地址)。

服务器端配置:

    // 与服务器无关,略

客户端配置:

{
  "log": {
    "loglevel": "debug"
  },
  "inbounds": [
    {
      "port": 5000,
      "protocol": "dokodemo-door",
      "settings": {
        "address": "127.0.0.1",
        "port": 5201,
        "network": "tcp,udp"
      }
    }
  ],
  "outbounds": [
    {
      "tag": "direct",
      "protocol": "freedom",
      "settings": {}
    }
  ]
}
  1. 请附上出错时软件输出的错误日志。在 Linux 中,日志通常在 /var/log/v2ray/error.log 文件中。

服务器端错误日志:

    // 与服务器无关,略

客户端错误日志:

2019/10/27 09:48:16 [Debug] [3338934124] v2ray.com/core/proxy/dokodemo: processing connection from: 127.0.0.1:35606
2019/10/27 09:48:16 [Info] [3338934124] v2ray.com/core/app/dispatcher: default route for tcp:127.0.0.1:5201
2019/10/27 09:48:16 [Info] [3338934124] v2ray.com/core/proxy/freedom: opening connection to tcp:127.0.0.1:5201
2019/10/27 09:48:16 [Info] [3338934124] v2ray.com/core/transport/internet/tcp: dialing TCP to tcp:127.0.0.1:5201
  1. 请附上访问日志。在 Linux 中,日志通常在 /var/log/v2ray/access.log 文件中。
    // 在这里附上服务器端日志
  1. 其它相关的配置文件(如 Nginx)和相关日志。

  2. 如果 V2Ray 无法启动,请附上 --test 输出。

通常的命令为 /usr/bin/v2ray/v2ray --test --config /etc/v2ray/config.json。请按实际情况修改。

  1. 如果 V2Ray 服务运行不正常,请附上 journal 日志。

通常的命令为 journalctl -u v2ray

请预览一下你填的内容再提交。

@ToutyRater
Copy link
Contributor Author

重新测了一下,用 Wireshark 抓包。测试方法为:

  1. 在本机 (192.168.5.152) 运行 V2Ray (v4.21.3),监听 5000 端口,将 5000 端口转发至 127.0.01:5201(配置见上面的);
  2. 本地执行 iperf3 -s 以开启 iperf 服务端(默认监听 5201 端口);
  3. 另一台设备 (192.168.5.11) 执行 iperf3 -c 192.168.5.152 -p 5000 -n 1 进行测试。

同时,添加一个对照组,由 iperf3 客户端直接请求服务端进行测试:
iperf3 -c 192.168.5.152 -p 5201 -n 1

wireshark pkg.zip 为测试时 Wireshark 的抓包文件,解压后共有 3 个文件:
iperf3_c---v2_doko.pcapng: iperf3 客户端 与 V2Ray dokodemo-door 之间的包;
v2_freedom---iperf3_s.pcapng: V2Ray 与 iperf3 服务端之间的包;
iperf3_c---iperf3_s.pcapng: iperf3 客户端与服务端直接测试的包。

从抓包的结果看,在握手之后,iperf3 服务端发送了一个 0x09 的包给 V2Ray,但 V2Ray 没有将之转发给 iperf3 客户端。

@ToutyRater
Copy link
Contributor Author

f7abe35 刚刚根据这个 commit 自行编译测试,发现问题已经解决了

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

1 participant