V2ray-core: WebSocket+TLS在搬瓦工速率上限只有17m/s

Created on 29 Nov 2019  ·  11Comments  ·  Source: v2ray/v2ray-core

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

1) 你正在使用哪个版本的 V2Ray?(如果服务器和客户端使用了不同版本,请注明)
服务器64位Debian 9:V2Ray v4.21.3;客户端64位Win10:V2Ray v4.21.3

2) 你的使用场景是什么?比如使用 Chrome 通过 Socks/VMess 代理观看 YouTube 视频。
总共在2台谷歌云、1台搬瓦工CN2 GIA服务器上部署相同配置的v2ray,vps服务器配置大体相同:均为1核(谷歌云:Intel(R) Xeon(R) CPU @ 2.20GHz,搬瓦工:QEMU Virtual CPU version (cpu64-rhel6))、512M内存,网速1000m/s以上,新装64位Debian 9,服务器性能测试中搬瓦工的cpu和内存得分均比谷歌云高很多。家里电脑用Chrome 通过v2ray 全局代理下载文件。

3) 你看到的不正常的现象是什么?(请描述具体现象,比如访问超时,TLS 证书错误等)
3台服务器依次用v2ray(ws+tls+none加密)全局代理下载google drive文件、nvidia驱动、centos镜像,谷歌云2台服务器均能达到家里光纤满速率(40m/s)下载,搬瓦工仅有17m/s,切换shadowsocks全局代理3台服务器均可以满速率,说明与服务器线路无关,修改3台服务器v2ray本地策略内部缓存为0、512或2048,或修改环境变量强制开启分散读取,结果不变,不同时段多次测试结果也与上面相同

4) 你期待看到的正确表现是怎样的?
用搬瓦工服务器搭v2ray(ws+tls+none加密)全局代理也能满速(40m/s)下载

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

服务器端配置:

{
  "inbounds": [
    {
      "port": 443,
      "protocol": "vmess",
      "settings": {
        "clients": [
          {
            "id": "60027bb4-b563-47ce-8ead-20xxxxxxxxac",
            "alterId": 4
          }
        ]
      },
      "streamSettings": {
        "network": "ws",
        "wsSettings": {
        "path": "/xxxx"
        },
        "security": "tls",
        "tlsSettings": {
          "certificates": [
            {
            "certificateFile": "/etc/v2ray/v2ray.crt",
            "keyFile": "/etc/v2ray/v2ray.key"
            }
          ]
        }
      }
    }
  ],
  "outbounds": [
    {
      "protocol": "freedom",
      "settings": {}
    }
  ]
}

客户端配置:

{
  "policy": null,
  "log": {
    "access": "",
    "error": "",
    "loglevel": "none"
  },
  "inbounds": [
    {
      "tag": "proxy",
      "port": 10808,
      "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": "xxxxxxxxx.com",
            "port": 443,
            "users": [
              {
                "id": "60027bb4-b563-47ce-8ead-20xxxxxxxxac",
                "alterId": 4,
                "email": "[email protected]",
                "security": "none"
              }
            ]
          }
        ],
        "servers": null,
        "response": null
      },
      "streamSettings": {
        "network": "ws",
        "security": "tls",
        "tlsSettings": {
          "allowInsecure": false,
          "serverName": null
        },
        "tcpSettings": null,
        "kcpSettings": null,
        "wsSettings": {
          "connectionReuse": true,
          "path": "/xxxx",
          "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": {
    "servers": [
      "8.8.8.8",
      "8.8.4.4",
      "localhost"
    ]
  },
  "routing": {
    "domainStrategy": "IPIfNonMatch",
    "rules": [
      {
        "type": "field",
        "port": null,
        "inboundTag": [
          "api"
        ],
        "outboundTag": "api",
        "ip": null,
        "domain": null
      }
    ]
  }
}

6) 请附上出错时软件输出的错误日志。在 Linux 中,日志通常在 /var/log/v2ray/error.log 文件中。

服务器端错误日志:

客户端错误日志:

7) 请附上访问日志。在 Linux 中,日志通常在 /var/log/v2ray/access.log 文件中。

8) 其它相关的配置文件(如 Nginx)和相关日志。

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

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

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

通常的命令为 journalctl -u v2ray

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

Most helpful comment

好的,
瓦工机子修改系统变量:
echo "net.ipv4.tcp_wmem = 4096 65536 67108864" >> /etc/sysctl.conf
保存生效:
sysctl -p

All 11 comments

使用vmess测试,速率也需要详细的报告

请问需要哪个报告?下载速率图还是v2ray的日志还是?

比如测试时间/测试方式/测试日志/对比组

好的,下个月5号详细测试各种配置方式对比一下,这个月搬瓦工的流量刚好用完了 @kslr

我大概猜测一下,你可能需要调整协议,因为瓦工是重灾区,也是被重点照顾。

用了shadowsocks libev+obfs+tls 混淆能够满速,等5号有流量了用shadowsocks libev+v2ray插件配个相同配置试试看。emmm...或者直接建站https在瓦工服务器上下载文件看看速度?

你看看CPU方面?我用WS的话,服务端会占用大量的CPU引起瓶颈

我的占用很少,你试下64位的系统,之前用32的也是cpu占用很高

已解决,调高Linux缓冲内存

咋调的,说出来啊,万一别人有问题呢,他们该怎么解决,别直接关了

好的,
瓦工机子修改系统变量:
echo "net.ipv4.tcp_wmem = 4096 65536 67108864" >> /etc/sysctl.conf
保存生效:
sysctl -p

Was this page helpful?
0 / 5 - 0 ratings