v2ray / v2ray-core

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

中国移动网络连接服务器时提示failed to find an available destination #668

Closed SgtDaJim closed 5 years ago

SgtDaJim commented 6 years ago

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

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

server: v2.45 client: v2.45/core + v2rayW

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

3) 你看到的不正常的现象是什么? What did you see? 服务器是可以Ping通的,但v2ray无法连接服务器,view log得到日志(服务器IP我换成xxx了,IP填写确认是正确的):

[1]: V2Ray v2.45 (One for all) 20171029
[2]: An unified platform for anti-censorship.
[3]: 2017/10/31 12:22:18 [Debug]App|Proxyman|Inbound: creating tcp worker on 127.0.0.1:1080
[4]: 2017/10/31 12:22:18 [Warning]Core: V2Ray started
[5]: 2017/10/31 12:32:45 [Warning]App|Proxyman|Outbound: failed to process outbound traffic > Proxy|VMess|Outbound: failed to find an available destination > Retry: [dial tcp: lookup xxx : no such host] > Retry: all retry attempts failed
[6]: 2017/10/31 12:32:47 [Warning]App|Proxyman|Outbound: failed to process outbound traffic > Proxy|VMess|Outbound: failed to find an available destination > Retry: [dial tcp: lookup xxx : no such host] > Retry: all retry attempts failed
[7]: 2017/10/31 12:32:49 [Warning]App|Proxyman|Outbound: failed to process outbound traffic > Proxy|VMess|Outbound: failed to find an available destination > Retry: [dial tcp: lookup xxx : no such host] > Retry: all retry attempts failed
[8]: 2017/10/31 12:32:49 [Warning]App|Proxyman|Outbound: failed to process outbound traffic > Proxy|VMess|Outbound: failed to find an available destination > Retry: [dial tcp: lookup xxx : no such host] > Retry: all retry attempts failed
[9]: 2017/10/31 12:32:51 [Warning]App|Proxyman|Outbound: failed to process outbound traffic > Proxy|VMess|Outbound: failed to find an available destination > Retry: [dial tcp: lookup xxx : no such host] > Retry: all retry attempts failed
[10]: 2017/10/31 12:32:53 [Warning]App|Proxyman|Outbound: failed to process outbound traffic > Proxy|VMess|Outbound: failed to find an available destination > Retry: [dial tcp: lookup xxx : no such host] > Retry: all retry attempts failed

4) 你期待看到的正确表现是怎样的? What's your expectation? 正常连接服务器并使用。因为我在校园网上使用是正常的,我让我朋友在家尝试,就报了以上错误。

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": "debug"
  },
  "inbound": {
    "port": 2335,
    "protocol": "vmess",
    "settings": {
      "clients": [
        {
          "id": "5eab6a07-34c8-4473-ab01-d610db812016",
          "level": 1,
          "alterId": 64
        },
        {
          "id": "dd7f677c-f242-400b-93aa-5e9f2f4c1659",
          "level": 1,
          "alterId": 64
        }
      ]
    }
  },
  "outbound": {
    "protocol": "freedom",
    "settings": {}
  },
  "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"
        }
      ]
    }
  }
}
Client Configuration File(客户端配置文件)(这是填写v2rayW生成的v2rayw.json):
{
    "dns": {
        "servers": [
            "8.8.8.8"
        ]
    },
    "outboundDetour": [
        {
            "protocol": "freedom",
            "tag": "direct",
            "settings": {}
        }
    ],
    "inbound": {
        "listen": "127.0.0.1",
        "port": 1080,
        "protocol": "socks",
        "settings": {
            "auth": "noauth",
            "udp": false,
            "ip": "127.0.0.1"
        },
        "allowPassive": false
    },
    "routing": {
        "strategy": "rules",
        "settings": {
            "domainStrategy": "IPIfNonMatch",
            "rules": [
                {
                    "port": "1-52",
                    "type": "field",
                    "outboundTag": "direct"
                },
                {
                    "port": "54-79",
                    "type": "field",
                    "outboundTag": "direct"
                },
                {
                    "port": "81-442",
                    "type": "field",
                    "outboundTag": "direct"
                },
                {
                    "port": "444-65535",
                    "type": "field",
                    "outboundTag": "direct"
                },
                {
                    "type": "chinasites",
                    "outboundTag": "direct"
                },
                {
                    "type": "chinaip",
                    "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"
                }
            ]
        }
    },
    "log": {
        "loglevel": "warning"
    },
    "outbound": {
        "protocol": "vmess",
        "streamSettings": {
            "network": "tcp",
            "tcpSettings": {
                "connectionReuse": true,
                "header": {
                    "type": "none"
                }
            },
            "kcpSettings": {
                "mtu": 1350,
                "tti": 20,
                "uplinkCapacity": 5,
                "downlinkCapacity": 20,
                "congestion": false,
                "readBufferSize": 1,
                "writeBufferSize": 1,
                "header": {
                    "type": "none"
                }
            },
            "wsSettings": {
                "connectionReuse": true,
                "path": ""
            }
        },
        "settings": {
            "vnext": [
                {
                    "address": "xxx",
                    "port": 2335,
                    "users": [
                        {
                            "id": "5eab6a07-34c8-4473-ab01-d610db812016",
                            "alterId": 64,
                            "security": "aes-128-cfb"
                        }
                    ]
                }
            ]
        }
    }
}

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.

Server Log File(服务器端日志):
    // 在这里附上服务器端日志
    // Please attach your server log here.
服务器端没日志,因为根本没连接。
Client Log File(客户端日志):
    // 在这里附上客户端日志
    // Please attach your client log here.
[1]: V2Ray v2.45 (One for all) 20171029
[2]: An unified platform for anti-censorship.
[3]: 2017/10/31 12:22:18 [Debug]App|Proxyman|Inbound: creating tcp worker on 127.0.0.1:1080
[4]: 2017/10/31 12:22:18 [Warning]Core: V2Ray started
[5]: 2017/10/31 12:32:45 [Warning]App|Proxyman|Outbound: failed to process outbound traffic > Proxy|VMess|Outbound: failed to find an available destination > Retry: [dial tcp: lookup xxx : no such host] > Retry: all retry attempts failed
[6]: 2017/10/31 12:32:47 [Warning]App|Proxyman|Outbound: failed to process outbound traffic > Proxy|VMess|Outbound: failed to find an available destination > Retry: [dial tcp: lookup xxx : no such host] > Retry: all retry attempts failed
[7]: 2017/10/31 12:32:49 [Warning]App|Proxyman|Outbound: failed to process outbound traffic > Proxy|VMess|Outbound: failed to find an available destination > Retry: [dial tcp: lookup xxx : no such host] > Retry: all retry attempts failed
[8]: 2017/10/31 12:32:49 [Warning]App|Proxyman|Outbound: failed to process outbound traffic > Proxy|VMess|Outbound: failed to find an available destination > Retry: [dial tcp: lookup xxx : no such host] > Retry: all retry attempts failed
[9]: 2017/10/31 12:32:51 [Warning]App|Proxyman|Outbound: failed to process outbound traffic > Proxy|VMess|Outbound: failed to find an available destination > Retry: [dial tcp: lookup xxx : no such host] > Retry: all retry attempts failed
[10]: 2017/10/31 12:32:53 [Warning]App|Proxyman|Outbound: failed to process outbound traffic > Proxy|VMess|Outbound: failed to find an available destination > Retry: [dial tcp: lookup xxx : no such host] > Retry: all retry attempts failed

再附上tracert的结果:

通过最多 30 个跃点跟踪
到 xxx-xxx-xxx-xx-host.colocrossing.com [xxx] 的路由:

  1    20 ms    14 ms     3 ms  192.168.1.1
  2     *        *        *     请求超时。
  3     9 ms     8 ms     8 ms  183.233.51.113
  4    19 ms    21 ms    21 ms  120.196.243.249
  5    14 ms    12 ms    12 ms  221.183.19.13
  6    40 ms    41 ms    42 ms  221.176.22.25
  7    47 ms    44 ms    47 ms  221.176.22.34
  8     *       41 ms    41 ms  221.183.25.194
  9    83 ms    48 ms    44 ms  221.183.55.33
 10   194 ms   193 ms   198 ms  223.120.12.5
 11   193 ms   194 ms   192 ms  223.120.6.18
 12   197 ms   193 ms   197 ms  las-b24-link.telia.net [62.115.37.98]
 13   199 ms   235 ms   197 ms  colocrossing-ic-317204-las-b3.c.telia.net [62.115.146.157]
 14     *        *        *     请求超时。
 15   196 ms   200 ms   207 ms  xxx-xxx-xxx-xx-host.colocrossing.com [xxx] 

跟踪完成。
DarienRaymond commented 6 years ago

这个 xxx 是 IP 还是域名?看上去像是一个域名,而你的 DNS 解析不出来,所以出现了"no such host"的错误。

SgtDaJim commented 6 years ago

@DarienRaymond xxx是IP,不是域名

DarienRaymond commented 6 years ago

这个错误是因为V2Ray(至少是golang)尝试解析远端主机地址(就是你的xxx),然后报了一个“no such host”的错。至于原因暂时还不知道。

你可以尝试更换一个IP地址,最好是IPv4,再试一下。

SgtDaJim commented 6 years ago

@DarienRaymond 可是我只有一台服务器啊。。没有别的IP了。。

Gannti commented 6 years ago

@SgtDaJim

  1. 尝试使用 tcping 来验证是否能够 ping 通目标主机 usage of tcping
    tcping <ip> <port>
  2. 尝试更换另一个运营商,比如电信。原因是近期有过很多中国移动加大封锁力度的反馈;
  3. 尝试 wss/cdn ,这样可以挽救一个被屏蔽的 IP。
SgtDaJim commented 6 years ago

@Gannti 好,我试试。另外想问下,wss是什么意思?

Nehalem-Lf commented 6 years ago

websocks

VictoriaRaymond commented 5 years ago

Assuming fixed