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

[Bug] 使用已被弃用的配置导致服务启动失败 #86

Open
daizc311 opened this issue Jun 15, 2022 · 2 comments
Open

[Bug] 使用已被弃用的配置导致服务启动失败 #86

daizc311 opened this issue Jun 15, 2022 · 2 comments

Comments

@daizc311
Copy link

影响范围

  • 版本:v2.2.2之后
  • 仅vmess+websocket配置受影响

V2Ray Desktop Config

{
    "allow-lan": true,
    "bind-address": "127.0.0.1",
    "dns": {
        "enable": false,
        "listen": "0.0.0.0:53",
        "nameserver": [
            "8.8.8.8",
            "4.4.4.4"
        ]
    },
    "log-level": "info",
    "mode": "rule",
    "port": 1087,
    "proxies": [
        {
            "alterId": 0,
            "cipher": "auto",
            "name": "config-a",
            "network": "ws",
            "port": 443,
            "server": "Hidden",
            "skip-cert-verify": false,
            "tls": true,
            "type": "vmess",
            "udp": false,
            "uuid": "Hidden",
            "ws-headers": {
                "Host": ""
            },
            "ws-path": "Hidden"
        }
    ],
    "proxy-groups": [
        {
            "interval": 300,
            "name": "PROXY",
            "proxies": [
                "config-a"
            ],
            "type": "load-balance",
            "url": "http://www.gstatic.com/generate_204"
        }
    ],
    "rules": [
        "IP-CIDR, 127.0.0.0/8, DIRECT",
        "IP-CIDR, 10.0.0.0/8, DIRECT",
        "IP-CIDR, 172.16.0.0/12, DIRECT",
        "IP-CIDR, 192.168.0.0/16, DIRECT",
        "GEOIP, CN, DIRECT",
        "MATCH, PROXY"
    ],
    "socks-port": 1080
}

V2Ray Desktop Log


<!-- 访问资源时报错 #错误B -->
2022/06/15 14:27:16 [warning] clash: [TCP] dial PROXY (match Match/) to raw.githubusercontent.com:443 error: dial xxxxxx:443 error: 200 OK
2022/06/15 14:27:16 [Info] v2ray-desktop: Start to get url:  "https://raw.githubusercontent.com/du5/gfwlist/master/Rules/Clash/gfwlist.yml"
2022/06/15 14:27:16 [Critical] v2ray-desktop: Error occurred during requsting  "https://raw.githubusercontent.com/du5/gfwlist/master/Rules/Clash/gfwlist.yml" ; Error:  QNetworkReply::RemoteHostClosedError

<!-- 启动服务时报错  #错误A -->
2022/06/15 14:12:45 [Critical] v2ray-desktop: Failed to start Clash.
2022/06/15 14:12:45 [Warning] v2ray-desktop: QIODevice::read (QProcess): WriteOnly device
2022/06/15 14:12:45 [Critical] v2ray-desktop: ""
2022/06/15 14:12:45 [Info] v2ray-desktop: Disconnected from  "config-a"
2022/06/15 14:12:46 [Info] v2ray-desktop: Connected to  "config-a"

环境 Environment

  • Deepin 20.6

说明 Description

Clash在V1.9.0版本弃用了ws-pathws-headers等配置,导致使用vmess+ws的服务器均无法正常连接,需要更新代码以已修复这个问题。

重现问题的具体布骤 Steps to Reproduce

  1. 双击运行 "V2Ray-Desktop-v2.3.1-linux-x86_64.AppImage"
  2. 服务器-添加新服务器页面填写配置,传输协议选择WebSocket,并任意填写HostPath选项
  3. 启用刚才配置的服务器并在托盘右键菜单中单击打开 V2Ray Desktop,日志中即出现上述所示的错误A
  4. 访问任意资源,日志中即出现上述所示的错误B

更多信息 More Information

  1. 经过检查,这个问题是由Clash在V1.9.0版本弃用已过时的配置项导致的。
  2. 查阅Clash配置文档后可知,Vmess的ws配置项发生了如下变动
    # old 已弃用
    - name: v4
      type: vmess
      server: example.com
      port: 443
      uuid: uuid
      alterId: 233
      cipher: auto
      tls: true
      tls-hostname: example.com
      skip-cert-verify: true
      network: ws
      ws-path: /
      ws-headers:
          Host: example.com
      
    # new
    - name: "vmess"
      type: vmess
      server: server
      port: 443
      uuid: uuid
      alterId: 32
      cipher: auto
      udp: true
      tls: true
      skip-cert-verify: true
      servername: example.com # priority over wss host
      network: ws
      ws-opts:
        path: /path
        headers:
          Host: v2ray.com
        max-early-data: 2048
        early-data-header-name: Sec-WebSocket-Protocol
  3. 按照格式更新config.yaml后直接启动clash,代理正常运行
@mirakyux
Copy link

原来是这个原因😂😂, 我说我每次更新版本后都不能联网, 得回退版本才行

@Dr-Incognito
Copy link
Owner

Do you mean to downgrade clash to v1.9.0 (or before)?

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

3 participants