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

http组件监听端口绑定失败日志消息等级建议从info变更为warning #576

Closed
nov30th opened this issue Jan 2, 2021 · 0 comments

Comments

@nov30th
Copy link

nov30th commented Jan 2, 2021

  1. 你正在使用哪个版本的 V2Ray?(如果服务器和客户端使用了不同版本,请注明)
    4.33.0
  2. 你的使用场景是什么?比如使用 Chrome 通过 Socks/VMess 代理观看 YouTube 视频。
    只启动服务程序
  3. 你看到的不正常的现象是什么?(请描述具体现象,比如访问超时,TLS 证书错误等)
    最小化配置,
    默认stdout中没有任何错误,检查后发现配置中端口冲突,但提示消息为info被默认log等级为警告忽略,程序无法工作也没有报错
  4. 你期待看到的正确表现是怎样的?
    服务监听端口冲突用warning或者以上等级默认友好展示出来。
  5. 请附上你的配置(提交 Issue 前请隐藏服务器端IP地址)。

服务器端配置:

{
  "inbounds": [
    {
      "port": 443,
      "protocol": "vmess",
      "settings": {
        "clients": [
          {
            "id": "****",
            "alterId": 64
          }
        ]
      },
      "streamSettings": {
        "network": "h2",
        "httpSettings": {
          "path": "/ray"
        },
        "security": "tls",
        "tlsSettings": {
          "certificates": [
            {
              "certificateFile": "C:\\****",
              "keyFile": "C:\\****"
            }
          ]
        }
      }
    }
  ],
  "outbounds": [{
    "protocol": "freedom",
    "settings": {}
  },{
    "protocol": "blackhole",
    "settings": {},
    "tag": "blocked"
  }],
  "routing": {
    "rules": [
      {
        "type": "field",
        "ip": ["geoip:private"],
        "outboundTag": "blocked"
      }
    ]
}
}

服务器log配置debug后看到绑定的错误消息。

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

服务器端错误日志:
配置log level debug后,看到错误消息的log等级为info

V2Ray 4.33.0 (V2Fly, a community-driven edition of V2Ray.) Custom (go1.15.5 windows/amd64)
A unified platform for anti-censorship.
2021/01/02 22:12:07 Using default config:  C:\tmp\v2ray\config.json
2021/01/02 22:12:07 [Info] v2ray.com/core/main/jsonem: Reading config: C:\tmp\v2ray\config.json
2021/01/02 22:12:07 [Debug] v2ray.com/core/app/log: Logger started
2021/01/02 22:12:07 [Debug] v2ray.com/core/app/proxyman/inbound: creating stream worker on 0.0.0.0:443
2021/01/02 22:12:07 [Warning] v2ray.com/core: V2Ray 4.33.0 started
2021/01/02 22:12:07 [Info] v2ray.com/core/transport/internet/http: failed to listen on 0.0.0.0:443 > listen tcp 0.0.0.0:443: bind: An attempt was made to access a socket in a way forbidden by its access permissions.```

重新设置了本地log文件,stdout与stderr被转入文件,在文件中仍然是info消息。
kslr added a commit that referenced this issue Jan 2, 2021
@kslr kslr closed this as completed Jan 2, 2021
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

2 participants