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端口转发iperf3失败 #1872

Closed
Cwek opened this issue Sep 8, 2019 · 2 comments · Fixed by #2005
Closed

Dokodemo-door端口转发iperf3失败 #1872

Cwek opened this issue Sep 8, 2019 · 2 comments · Fixed by #2005

Comments

@Cwek
Copy link

Cwek commented Sep 8, 2019

  1. 你正在使用哪个版本的 V2Ray?(如果服务器和客户端使用了不同版本,请注明)
    4.10和4.18都试过
  2. 你的使用场景是什么?比如使用 Chrome 通过 Socks/VMess 代理观看 YouTube 视频。
    想通过dokodemo端口转发iperf3来测量v2负载通道
  3. 你看到的不正常的现象是什么?(请描述具体现象,比如访问超时,TLS 证书错误等)
    iperf3端访问dokodemo的端口时,v2的error日志有显示连接上转发的目标iperf3服务端,但是服务端和客户端都没有反应,无论手动中断(客户端ctrl+c)还是v2自动中断,服务端都提示“iperf3: error - unable to receive parameters from client”
  4. 你期待看到的正确表现是怎样的?
    能正常转发iperf3的流量
  5. 请附上你的配置(提交 Issue 前请隐藏服务器端IP地址)。

服务器端配置:

{
    "log": {
        "access": "/dev/null",
        "error": "/home/pi/uklog/v2.log",
        "loglevel": "debug"
    },
    "inbounds": [
        {
            "tag": "d2",
            "port": 6665,
            "listen": "192.168.0.30",
            "protocol": "dokodemo-door",
            "settings": {
                "address": "192.168.0.105",
                "port": 6666,
                "network": "tcp",
                "userLevel": 0,
                "followRedirect": false
            }
        }
    ],
    "outbounds": [     
        {
            "protocol": "freedom",
            "tag": "direct",
            "settings": {
                "userLevel": 1,
                "domainStrategy": "UseIP"
            }
        }
    ],
    "policy": {
        "levels": {
            "0": {
                "handshake": 5,
                "connIdle": 1200,
                "uplinkOnly": 10,
                "downlinkOnly": 10,
                "bufferSize": 16
            },
            "1": {
                "handshake": 5,
                "connIdle": 1200,
                "uplinkOnly": 10,
                "downlinkOnly": 10,
                "bufferSize": 16
            }
        }
    },
    "routing": {
        "domainStrategy": "AsIs",
        "rules": [
            {
                "type": "field",
                "inboundTag": [
                    "d2"
                ],
                "outboundTag": "direct"
            }
        ]
    }
}

iperf3
服务端:iperf3 -sp 6666 -B 192.168.0.30 -f K
客户端: iperf3 -c 192.168.0.30 -p 6665 -b 1M -f K --get-server-output
客户端配置:

    // 在这里附上客户端配置
  1. 请附上出错时软件输出的错误日志。在 Linux 中,日志通常在 /var/log/v2ray/error.log 文件中。

服务器端错误日志:

2019/09/08 14:44:01 [Debug] v2ray.com/core/app/log: Logger started
2019/09/08 14:44:01 [Warning] v2ray.com/core: V2Ray 4.18.0 started
2019/09/08 14:44:25 [Debug] [279345417] v2ray.com/core/proxy/dokodemo: processing connection from: 192.168.0.30:60194
2019/09/08 14:44:25 [Info] [279345417] v2ray.com/core/app/dispatcher: taking detour [direct] for [tcp:192.168.0.30:6666]
2019/09/08 14:44:25 [Info] [279345417] v2ray.com/core/proxy/freedom: opening connection to tcp:192.168.0.30:6666
2019/09/08 14:44:25 [Info] [279345417] v2ray.com/core/transport/internet/tcp: dialing TCP to tcp:192.168.0.30:6666
2019/09/08 14:53:28 [Info] [279345417] v2ray.com/core/app/proxyman/inbound: connection ends > v2ray.com/core/proxy/dokodemo: connection ends > context canceled
2019/09/08 14:53:28 [Info] [279345417] v2ray.com/core/app/proxyman/outbound: failed to process outbound traffic > v2ray.com/core/proxy/freedom: connection ends > context canceled
  1. 其它相关的配置文件(如 Nginx)和相关日志。
@Cwek
Copy link
Author

Cwek commented Sep 9, 2019

在转发到iperf3服务端直接做了tcpdump,客户端在三次握手后会发送一串类似身份标识的数据,然后服务端会返回1字节(值为“0x09”)的数据回去。直连的话会客户端会继续推进下去,正常连接。但是用dokodemo的话,如果把缓存关掉,v2的转发还会ACK服务端这1字节数据,但并没有向客户端转发返回这1字节的数据。

是不是dokodemo对转发的数据量有要求?

@Cwek
Copy link
Author

Cwek commented Sep 9, 2019

#1817 提到v4.7是可行的,我再用4.7测试是可以通过的,而4.8就不行了。然后比对了4.7~4.8之间的代码,好像demo和freedom的数据转发线程有调整过,是不是这部分的原因?

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

Successfully merging a pull request may close this issue.

1 participant