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 report] DoH met shadowsocks ivCheck error #872

Closed
rurirei opened this issue Apr 6, 2021 · 8 comments
Closed

[Bug report] DoH met shadowsocks ivCheck error #872

rurirei opened this issue Apr 6, 2021 · 8 comments

Comments

@rurirei
Copy link
Contributor

rurirei commented Apr 6, 2021

What version of V2Ray are you using?

client v2fly/v2ray-core 4.37.1
server v2fly/v2ray-core 4.34.0

What problems have you encountered?

DoH dnsserver met failed shadowsocks ivCheck set ivCheck to either false or true on client. (server 4.34.0 has no ivCheck.)

What's your expectation?

this may bug of shadowsocks ivCheck @xiaokangwang
(this works on vmess or shadowsocks-without-DoH.)

{
  "log": {
    "loglevel": "debug"
  },
  "dns": {
    "servers": [
      "https://dns.google/dns-query"
    ]
  },
  "inbounds": [
    {
      "listen": "127.0.0.1",
      "port": 1080,
      "protocol": "socks",
      "settings": {
        "auth": "noauth",
        "udp": true
      },
      "sniffing": {
        "destOverride": [
          "http",
          "tls"
        ],
        "enabled": true
      }
    }
  ],
  "outbounds": [
    {
      "protocol": "shadowsocks",
      "settings": {
        "servers": [
          {
            ...,
            "ivCheck": false  // either false or true
          }
        ]
      },
      "streamSettings": {
        "network": "tcp",
        "security": "none"
      },
      "tag": "proxy-out"
    },
    {
      "protocol": "dns",
      "settings": {
        "network": "tcp"
      },
      "tag": "dns-out"
    }
  ],
  "routing": {
    "domainStrategy": "AsIs",
    "rules": [
      {
        "network": "udp",
        "port": "53",
        "outboundTag": "dns-out",
        "type": "field"
      }
    ]
  },
  "stats": {}
}
[info] LogLevel: debug
[Debug] app/log: Logger started
[Info] app/dns: DNS: created Remote DOH client for https://dns.google/dns-query
[Warning] V2Ray 4.37.1 started

[Debug] transport/internet/udp: dispatch request to: udp:8.8.8.8:53
[Info] transport/internet/udp: establishing new connection for udp:8.8.8.8:53
[Info] app/dispatcher: taking detour [dns-out] for [udp:8.8.8.8:53]
[Info] proxy/dns: handling DNS traffic to tcp:8.8.8.8:53
[Debug] app/dns: domain v2fly.org will use DNS in order: [DOH//dns.google]
[Info] app/dns: DOH//dns.google querying: v2fly.org

[Info] app/dispatcher: taking detour [proxy-out] for [tcp:dns.google:443]
[Info] common/mux: dispatching request to tcp:dns.google:443
[Info] transport/internet/tcp: dialing TCP to tcp:${server}
[Info] proxy/shadowsocks: tunneling request to tcp:v1.mux.cool:9527 via tcp:${server}
[Info] failed to handler mux client connection > proxy/shadowsocks: connection ends > proxy/shadowsocks: failed to read IV > EOF
[Info] common/mux: failed to read metadata > io: read/write on closed pipe
[Error] app/dns: failed to retrieve response > Post "https://dns.google/dns-query": EOF
[Info] app/proxyman/outbound: failed to process outbound traffic > proxy/dns: connection ends > context canceled
[Info] transport/internet/udp: failed to handle UDP input > io: read/write on closed pipe
[Info] app/dns: failed to lookup ip for domain v2fly.org at server DOH//dns.google > context deadline exceeded
[Info] proxy/dns: ip query > app/dns: returning nil for domain v2fly.org > multierr: context deadline exceeded | 
@rurirei
Copy link
Contributor Author

rurirei commented Apr 7, 2021

c.c. @xiaokangwang @database64128

@xiaokangwang
Copy link
Contributor

Could you please also send the server side log and server side configure of this situation?

"failed to read IV" happens before the IV check, so it could have been an another bug.

return nil, nil, newError("failed to read IV").Base(err)

@rurirei
Copy link
Contributor Author

rurirei commented Apr 9, 2021

@xiaokangwang thanks, i will do logs later.

does one else met this?

@xiaokangwang
Copy link
Contributor

I haven't received any report. But I do not help ordinary user individually so I don't have the best knowledge on bug encountered by users.

@rurirei
Copy link
Contributor Author

rurirei commented Apr 9, 2021

updated to server 4.37.1 to solved.

i'm sorry.

@rurirei rurirei closed this as completed Apr 9, 2021
@xiaokangwang
Copy link
Contributor

This should be a compatible change and no break is expected. Can you share the error message from previous version of v2ray?

@database64128
Copy link
Contributor

This should be a compatible change and no break is expected. Can you share the error message from previous version of v2ray?

He updated his server from v4.34.0 to v4.37.1. So it's unlikely to be related.

@xiaokangwang
Copy link
Contributor

xiaokangwang commented Apr 9, 2021

Yes... It should not have been connected. Please do let me know if the ss in the v2ray is not working with other implementation.

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