v2ray / v2ray-core

A platform for building proxies to bypass network restrictions.
https://www.v2ray.com/
MIT License
45.32k stars 8.94k forks source link

rejected Proxy|VMess|Encoding: failed to read request header > tls: first record does not look like a TLS handshake #580

Closed kmahyyg closed 7 years ago

kmahyyg commented 7 years ago

1) 你正在使用哪个版本的 V2Ray?(如果服务器和客户端使用了不同版本,请注明) What version of V2Ray are you using (If you deploy different version on server and client, please explicitly point out)?

v2.39 build0928

2) 你的使用场景是什么?比如使用 Chrome 通过 Socks/VMess 代理观看 YouTube 视频。 What's your scenario of using V2Ray? E.g., Watching YouTube videos in Chrome via Socks/VMess proxy.

Using chrome to surf https://github.com via SwitchyOmega Plugin. SwitchyOmega is configured with: socks5 localhost 1093

3) 你看到的不正常的现象是什么? What did you see?

ERR_CONNECTION_CLOSED

4) 你期待看到的正确表现是怎样的? What's your expectation?

Works fine.

5) 请附上你的配置文件(提交 Issue 前请隐藏服务器端IP地址)。 Please attach your configuration file (Mask IP addresses before submit this issue).

Server Configuration File(服务器端配置文件):
{
  "log": {
    "access": "/var/log/v2ray/access.log",
    "error": "/var/log/v2ray/error.log",
    "loglevel": "warning"
  },
  "inbound": {
    "port": 12306,
    "protocol": "vmess",
    "settings": {
      "clients": [
        {
          "id": "ff053507-c465-0d1b-b41d-4107fcde0bb2",
          "level": 1,
          "alterId": 32
        }
      ]
    },
    "detour": {
      "to": "vmess-detour-613022"
    },
    "streamSettings": {
      "security": "tls",
      "tlsSettings": {
        "serverName": "sxxxxxxxxxxxxxxxxxxxxz",
        "certificates": [
          {
            "certificateFile": "/root/letsssl/fullchain.pem",
            "keyFile": "/root/letsssl/privkey.pem"
          }
        ]
      }
    }
  },
  "outbound": {
    "protocol": "freedom",
    "settings": {}
  },
  "inboundDetour": [
    {
      "protocol": "vmess",
      "port": "10010-10086",
      "tag": "vmess-detour-613022",
      "settings": {},
      "allocate": {
        "strategy": "random",
        "concurrency": 5,
        "refresh": 5
      },
      "streamSettings": {
        "security": "tls",
        "tlsSettings": {
          "serverName": "sxxxxxxxxxxz",
          "certificates": [
            {
              "certificateFile": "/root/letsssl/fullchain.pem",
              "keyFile": "/root/letsssl/privkey.pem"
            }
          ]
        }
      }
    }
  ],
  "outboundDetour": [
    {
      "protocol": "blackhole",
      "settings": {},
      "tag": "blocked"
    }
  ],
  "routing": {
    "strategy": "rules",
    "settings": {
      "rules": [
        {
          "type": "field",
          "ip": [
            "0.0.0.0/8",
            "10.0.0.0/8",
            "100.64.0.0/10",
            "127.0.0.0/8",
            "169.254.0.0/16",
            "172.16.0.0/12",
            "192.0.0.0/24",
            "192.0.2.0/24",
            "192.168.0.0/16",
            "198.18.0.0/15",
            "198.51.100.0/24",
            "203.0.113.0/24",
            "::1/128",
            "fc00::/7",
            "fe80::/10"
          ],
          "outboundTag": "blocked"
        }
      ]
    }
  },
  "transport": {
    "tcpSettings": {
      "connectionReuse": true
    },
    "kcpSettings": {
      "mtu": 1300,
      "tti": 50,
      "uplinkCapacity": 8,
      "downlinkCapacity": 8,
      "congestion": true,
      "readBufferSize": 2,
      "writeBufferSize": 2,
      "header": {
        "type": "wechat-video"
      }
    }
  }
}
Client Configuration File(客户端配置文件):
{
  "log": {
    "loglevel": "warning"
  },
  "inbound": {
    "listen": "127.0.0.1",
    "port": 1093,
    "protocol": "socks",
    "settings": {
      "auth": "noauth",
      "udp": true,
      "ip": "127.0.0.1"
    }
  },
  "outbound": {
    "protocol": "vmess",
    "settings": {
      "vnext": [
        {
          "address": "sssssssss",
          "port": 12306,
          "users": [
            {
              "id": "ff053507-c465-0d1b-b41d-4107fcde0bb2",
              "level": 1,
              "alterId": 32
            }
          ]
        }
      ]
    },
    "mux": {
      "enabled": true,
      "concurrency": 8
    },
    "streamSettings": {
      "security": "true",
      "tlsSettings": {
        "serverName": "sssssssss"
      }
    }
  },
  "outboundDetour": [
    {
      "protocol": "freedom",
      "settings": {},
      "tag": "direct"
    }
  ],
  "routing": {
    "strategy": "rules",
    "settings": {
      "rules": [
        {
          "type": "field",
          "port": "54-79",
          "outboundTag": "direct"
        },
        {
          "type": "field",
          "port": "81-442",
          "outboundTag": "direct"
        },
        {
          "type": "field",
          "port": "444-65535",
          "outboundTag": "direct"
        },
        {
          "type": "field",
          "domain": [
            "gc.kis.scr.kaspersky-labs.com"
          ],
          "outboundTag": "direct"
        },
        {
          "type": "chinasites",
          "outboundTag": "direct"
        },
        {
          "type": "field",
          "ip": [
            "0.0.0.0/8",
            "10.0.0.0/8",
            "100.64.0.0/10",
            "127.0.0.0/8",
            "169.254.0.0/16",
            "172.16.0.0/12",
            "192.0.0.0/24",
            "192.0.2.0/24",
            "192.168.0.0/16",
            "198.18.0.0/15",
            "198.51.100.0/24",
            "203.0.113.0/24",
            "::1/128",
            "fc00::/7",
            "fe80::/10"
          ],
          "outboundTag": "direct"
        },
        {
          "type": "chinaip",
          "outboundTag": "direct"
        }
      ]
    }
  },
  "transport": {
    "tcpSettings": {
      "connectionReuse": true
    },
    "kcpSettings": {
      "mtu": 1300,
      "tti": 50,
      "uplinkCapacity": 8,
      "downlinkCapacity": 8,
      "congestion": true,
      "readBufferSize": 2,
      "writeBufferSize": 2,
      "header": {
        "type": "wechat-video"
      }
    }
  }
}

6) 请附上出错时软件输出的日志。在 Linux 中,日志通常在 /var/log/v2ray/error.log 文件中。 Please attach the log file, especially the bottom lines if the file is large. Log file is usually /var/log/v2ray/error.log on Linux.

No related log found in error.log in Linux according to the time order.

Server Log File(服务器端日志):(access.log)
2017/10/01 08:06:54 xxx.xxx.xxx.155:21300 rejected  Proxy|VMess|Encoding: failed to read request header > tls: oversized record received with length 57154
2017/10/01 08:06:54 xxx.xxx.xxx.155:21304 rejected  Proxy|VMess|Encoding: failed to read request header > tls: oversized record received with length 50989
2017/10/01 08:06:55 xxx.xxx.xxx.155:21307 rejected  Proxy|VMess|Encoding: failed to read request header > tls: first record does not look like a TLS handshake
2017/10/01 08:06:56 xxx.xxx.xxx.155:21329 rejected  Proxy|VMess|Encoding: failed to read request header > tls: oversized record received with length 36050
2017/10/01 08:06:56 xxx.xxx.xxx.155:21328 rejected  Proxy|VMess|Encoding: failed to read request header > tls: oversized record received with length 63802
2017/10/01 08:06:56 xxx.xxx.xxx.155:21330 rejected  Proxy|VMess|Encoding: failed to read request header > tls: oversized record received with length 62839
2017/10/01 08:06:58 xxx.xxx.xxx.155:21332 rejected  Proxy|VMess|Encoding: failed to read request header > tls: oversized record received with length 32960
2017/10/01 08:07:05 xxx.xxx.xxx.155:21334 rejected  Proxy|VMess|Encoding: failed to read request header > tls: first record does not look like a TLS handshake
2017/10/01 08:07:06 xxx.xxx.xxx.155:21336 rejected  Proxy|VMess|Encoding: failed to read request header > tls: oversized record received with length 42960
2017/10/01 08:07:10 xxx.xxx.xxx.155:21338 rejected  Proxy|VMess|Encoding: failed to read request header > tls: first record does not look like a TLS handshake
2017/10/01 08:07:21 xxx.xxx.xxx.155:21345 rejected  Proxy|VMess|Encoding: failed to read request header > tls: oversized record received with length 60939
2017/10/01 08:07:34 xxx.xxx.xxx.155:21347 rejected  Proxy|VMess|Encoding: failed to read request header > tls: first record does not look like a TLS handshake
2017/10/01 08:07:34 xxx.xxx.xxx.155:21350 rejected  Proxy|VMess|Encoding: failed to read request header > tls: first record does not look like a TLS handshake
2017/10/01 08:07:44 xxx.xxx.xxx.155:21375 rejected  Proxy|VMess|Encoding: failed to read request header > tls: first record does not look like a TLS handshake
2017/10/01 08:08:27 xxx.xxx.xxx.155:21385 rejected  Proxy|VMess|Encoding: failed to read request header > tls: oversized record received with length 38481
2017/10/01 08:08:57 xxx.xxx.xxx.155:21389 rejected  Proxy|VMess|Encoding: failed to read request header > tls: oversized record received with length 31242
2017/10/01 08:09:14 xxx.xxx.xxx.155:21392 rejected  Proxy|VMess|Encoding: failed to read request header > tls: first record does not look like a TLS handshake
2017/10/01 08:09:21 xxx.xxx.xxx.155:21395 rejected  Proxy|VMess|Encoding: failed to read request header > tls: oversized record received with length 62548
2017/10/01 08:16:29 xxx.xxx.xxx.155:21552 rejected  Proxy|VMess|Encoding: failed to read request header > tls: first record does not look like a TLS handshake
2017/10/01 08:16:30 xxx.xxx.xxx.155:21554 rejected  Proxy|VMess|Encoding: failed to read request header > tls: first record does not look like a TLS handshake
2017/10/01 08:16:30 xxx.xxx.xxx.155:21557 rejected  Proxy|VMess|Encoding: failed to read request header > tls: oversized record received with length 24760
2017/10/01 08:16:30 xxx.xxx.xxx.155:21561 rejected  Proxy|VMess|Encoding: failed to read request header > tls: oversized record received with length 54720
2017/10/01 08:16:31 xxx.xxx.xxx.155:21569 rejected  Proxy|VMess|Encoding: failed to read request header > tls: first record does not look like a TLS handshake
2017/10/01 08:16:33 xxx.xxx.xxx.155:21571 rejected  Proxy|VMess|Encoding: failed to read request header > tls: unsupported SSLv2 handshake received
Client Log File(客户端日志):
V2Ray v2.39 (One for all) 20170928
An unified platform for anti-censorship.
2017/10/01 08:16:01 [Debug]App|Proxyman|Inbound: creating tcp worker on 127.0.0.
1:1093
2017/10/01 08:16:01 [Warning]Core: V2Ray started
DarienRaymond commented 7 years ago

客户端配置里面:"security": "tls",