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

Server waiting a long time for password, instead of error message #277

Closed
medariox opened this issue Oct 25, 2016 · 1 comment
Closed

Server waiting a long time for password, instead of error message #277

medariox opened this issue Oct 25, 2016 · 1 comment

Comments

@medariox
Copy link

提交 Issue 之前请先阅读 Issue 指引,然后回答下面的问题,谢谢。
Please answer the following questions before submitting your issue. Thank you.

  1. 你正在使用哪个版本的 V2Ray?(如果服务器和客户端使用了不同版本,请注明)

  2. What version of V2Ray are you using?
    V2Ray v2.4.2 (One for all) 20161024

  3. 你的使用场景是什么?比如使用 Chrome 通过 Socks/VMess 代理观看 YouTube 视频。

  4. What your scenario of using V2Ray? E.g., Watching YouTube videos in Chrome via Socks/VMess proxy.
    Simple connect via SOCKS5 proxy with authentication.

  5. 你看到的不正常的现象是什么?

  6. What did you see?
    Server waiting a long time for password, although there is none provided in the request.

  7. 你期待看到的正确表现是怎样的?

  8. What do you expected to see instead?
    An error message server side, telling me that the password is missing/wrong for the given user.

  9. 请附上你的配置文件。

  10. Please attach your configuration file.

{
  "log": {
    "loglevel": "debug"
  },
  "inbound": {
    "port": 1080,
    "listen": "0.0.0.0",
    "protocol": "socks",
    "settings": {
      "auth": "password",
      "accounts": [{"user": "myuser", "pass": "mypass"}],
      "udp": true,
      "ip": "0.0.0.0"
    }
  },
  "outbound": {
    "protocol": "vmess",
    "settings": {
      "vnext": [
        {
          "address": "v2ray.cool",
          "port": 10086,
          "users": [
            {
              "id": "23ad6b10-8d1a-40f7-8ad0-e3e35cd38297",
              "alterId": 64
            }
          ]
        }
      ]
    }
  },
  "outboundDetour": [
    {
      "protocol": "freedom",
      "settings": {},
      "tag": "direct"
    }
  ],
  "dns": {
    "servers": [
      "8.8.8.8",
      "8.8.4.4",
      "localhost"
    ]
  },
  "routing": {
    "strategy": "rules",
    "settings": {
      "domainStrategy": "IPIfNonMatch",
      "rules": [
        {
          "type": "field",
          "port": "1-52",
          "outboundTag": "direct"
        },
        {
          "type": "field",
          "port": "54-79",
          "outboundTag": "direct"
        },
        {
          "type": "field",
          "port": "81-442",
          "outboundTag": "direct"
        },
        {
          "type": "field",
          "port": "444-65535",
          "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": {
    "kcpSettings": {
      "uplinkCapacity": 1,
      "downlinkCapacity": 10
    }
  }
}

This happens for the SOCKS5 protocol (with authentication) when there is an authentication attempt without a username and password or just without password provided. This causes the server to wait a long time (forever?) and the client to expect the answer (which it will never get).
I'd expect some error message returned from the server like there is right now for a missing username.

Thank you very much.

@v2ray v2ray closed this as completed in 2e46e95 Jan 8, 2017
@v2ray
Copy link
Collaborator

v2ray commented Jan 8, 2017

A hard timeout (16 seconds) is added for socks handshake. When such case happens, V2Ray will write back an error (0xFF) and close the connection.

This change will be included in the next release (2.15)

3gZ2jA pushed a commit to 3gZ2jA/v2ray-core that referenced this issue Oct 8, 2020
* fix fall back to abstract unix domain socket in vless and trojan

* Update trojan.go

* Update vless.go

* Update trojan.go

* Update vless.go

Co-authored-by: RPRX <[email protected]>
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

1 participant