v2ray / v2ray-core

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

Inbound/Outbound connection ends #2136

Closed a2232189 closed 4 years ago

a2232189 commented 4 years ago

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

1) 你正在使用哪个版本的 V2Ray?(如果服务器和客户端使用了不同版本,请注明) 4.21.3 2) 你的使用场景是什么?比如使用 Chrome 通过 Socks/VMess 代理观看 YouTube 视频。 使用 Chrome 通过 Socks/VMess 代理观看 YouTube 视频。 3) 你看到的不正常的现象是什么?(请描述具体现象,比如访问超时,TLS 证书错误等) Can't see content on webpage, return some chrome error. 4) 你期待看到的正确表现是怎样的? See normal webpage conent. 5) 请附上你的配置(提交 Issue 前请隐藏服务器端IP地址)。

服务器端配置:

    // 在这里附上服务器端配置文件
{
 "log": {
    "loglevel": "debug",
    "access": "/var/log/v2ray/access.log", // 这是 Linux 的路径
    "error": "/var/log/v2ray/error.log"
  },
  "inbounds": [{
    "port": 443,
    "protocol": "vmess",
    "settings": {
      "clients": [
        {
          "id": "hahhaa",
          "level": 1,
          "alterId": 64
        }
      ]
    }
  }],
  "outbounds": [{
    "protocol": "freedom",
    "settings": {}
  },{
    "protocol": "blackhole",
    "settings": {},
    "tag": "blocked"
  }],
  "routing": {
    "rules": [
      {
        "type": "field",
        "ip": ["geoip:private"],
        "outboundTag": "blocked"
      }
    ]
  }
}

客户端配置:

    // 在这里附上客户端配置
{
  "log": {
    "error": "",
    "loglevel": "debug",
    "access": ""
  },
  "inbounds": [
    {
      "listen": "127.0.0.1",
      "protocol": "socks",
      "settings": {
        "ip": "",
        "userLevel": 0,
        "udp": false,
        "auth": "noauth"
      },
      "port": "1080"
    },
    {
      "listen": "127.0.0.1",
      "protocol": "http",
      "settings": {
        "timeout": 360
      },
      "port": "1087"
    }
  ],
  "outbounds": [
    {
      "mux": {
        "enabled": false,
        "concurrency": 8
      },
      "protocol": "vmess",
      "streamSettings": {
        "tcpSettings": {
          "header": {
            "type": "none"
          }
        },
        "tlsSettings": {
          "allowInsecure": true
        },
        "security": "none",
        "network": "tcp"
      },
      "tag": "agentout",
      "settings": {
        "vnext": [
          {
            "address": "server-ip-hidden-by-me",
            "users": [
              {
                "id": "hahahah",
                "alterId": 64,
                "level": 0,
                "security": "aes-128-gcm"
              }
            ],
            "port": 443
          }
        ]
      }
    },
    {
      "tag": "direct",
      "protocol": "freedom",
      "settings": {
        "domainStrategy": "AsIs",
        "redirect": "",
        "userLevel": 0
      }
    },
    {
      "tag": "blockout",
      "protocol": "blackhole",
      "settings": {
        "response": {
          "type": "none"
        }
      }
    }
  ],
  "dns": {
    "servers": [
      "1.0.0.1",
      "1.1.1.1"
    ]
  },
  "routing": {
    "strategy": "rules",
    "settings": {
      "domainStrategy": "IPIfNonMatch",
      "rules": [
        {
          "type": "field",
          "outboundTag": "direct",
          "domain": [
            "geosite:cn",
            "geosite:speedtest"
          ]
        },
        {
          "type": "field",
          "ip": [
            "geoip:cn",
            "geoip:private"
          ],
          "outboundTag": "direct"
        }
      ]
    }
  },
  "transport": {}
}

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

服务器端错误日志:

    // 在这里附上服务器端日志
ubuntu@VM-103-176-ubuntu:/var/log/v2ray$ sudo grep -a '826910169' error.log
2019/12/27 10:37:01 [Info] [826910169] v2ray.com/core/proxy/vmess/inbound: received request for tcp:www.google.com:443
2019/12/27 10:37:01 [Info] [826910169] v2ray.com/core/app/dispatcher: default route for tcp:www.google.com:443
2019/12/27 10:37:01 [Info] [826910169] v2ray.com/core/proxy/freedom: opening connection to tcp:www.google.com:443
2019/12/27 10:37:01 [Info] [826910169] v2ray.com/core/transport/internet/tcp: dialing TCP to tcp:www.google.com:443
2019/12/27 10:37:12 [Info] [826910169] v2ray.com/core/app/proxyman/inbound: connection ends > v2ray.com/core/proxy/vmess/inbound: connection ends > context canceled
2019/12/27 10:37:12 [Info] [826910169] v2ray.com/core/app/proxyman/outbound: failed to process outbound traffic > v2ray.com/core/proxy/freedom: connection ends > context canceled

客户端错误日志:

    // 在这里附上客户端日志

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

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

ntgeralt commented 4 years ago

检查时钟校时