V2ray-core: v2ray 连接问题

Created on 3 Mar 2017  ·  16Comments  ·  Source: v2ray/v2ray-core

提交 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)?
2.20.1
2) 你的使用场景是什么?比如使用 Chrome 通过 Socks/VMess 代理观看 YouTube 视频。
What's your scenario of using V2Ray? E.g., Watching YouTube videos in Chrome via Socks/VMess proxy.
使用 Chrome 通过 Socks/VMess 代理观看 YouTube 视频
3) 你看到的不正常的现象是什么?
What did you see?
家中可以用,单位电脑用不了,在单位手机用actinium连接单位WIFI(与台式机同一网络)可以,配置文件一样,不用kcp协议也不行,家里用不用kcp都可以。
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": "info"
        },
      "inbound": {
       "port": 10086,
       "protocol": "vmess",
       "settings": {
       "clients": [
        {
          "id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
          "level": 1,
          "alterId": 64
           }
         ]
       },
      "streamSettings":{
      "network":"kcp",
      "kcpSettings": {
      "mtu": 1350,
      "tti": 20,
      "uplinkCapacity": 5,
      "downlinkCapacity": 100,
      "congestion": false,
       "readBufferSize": 1,
      "writeBufferSize": 1,
       "header": {
         "type": "none"
        }
       }
       }
        },
// 以下为添加的内容


  "inboundDetour": [ // 扩展的传入连接


    {


      "protocol": "shadowsocks",   // 开启 Shadowsocks 协议


      "port": 30001, // 监听 30001 端口


      "settings": {


        "method": "aes-256-cfb", // 加密方式,支持 aes-256-cfb, aes-128-cfb, chacha20, chacha20-ietf


        "password": "v2ray",     // 密码,必须和客户端相同


        "udp": false             // 是否开启 UDP 转发


      }


    },


    {


      "protocol": "shadowsocks",   // 开启 Shadowsocks 协议


      "port": 30002, // 监听 30002 端口,由于 Shadowsocks 的限制,多用户的时候只能开多个端口


      "settings": {  // 配置和上述类似


        "method": "aes-256-cfb",


        "password": "v2ray-2",


        "udp": false


      }


    }


  ],


  // 以上为添加的内容

  "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"
        }
      ]
    }
  },
  "transport": {
    "kcpSettings": {
      "uplinkCapacity": 2,
      "downlinkCapacity": 10
    }
  }
}


    Client Configuration File(客户端配置文件):
```javascript
    // 在这里附上客户端配置文件
    // Please attach your client configuration file here.
           {
 "log": {
 "loglevel": "warning"
 },
  "inbound": {
   "port": 20080,
   "listen": "127.0.0.1",
  "protocol": "socks",
  "settings": {
    "auth": "noauth",
   "ip": "127.0.0.1"
  }
 },
 "outbound": {
   "protocol": "vmess",
  "settings": {
    "vnext": [
      {
      "address": "xxxxxxxx",
      "port": 10086,
      "users": [
        {
          "id": "xxxxxxxxxxxxxxxxxxxxx",
          "alterId": 64,
          "security": "auto"
        }
      ]
       }
     ]
      },
       "streamSettings":{
     "network":"kcp",
  "kcpSettings": {
 "mtu": 1350,
  "tti": 20,
    "uplinkCapacity": 5,
   "downlinkCapacity": 100,
 "congestion": false,
 "readBufferSize": 1,
  "writeBufferSize": 1,
       "header": {
   "type": "none"
    }
   }
   }
    },
    "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
}

}
}

// Please attach your server configuration file here.
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(客户端日志):
 ```
   [error] kcp | dialer :failed to dail to dest: dail to udp xx.xx.xx.xx 10086 opretion was canceled[warning] proxyman outbound handler failed to process outbound traffic>>vmess outbound;failed to find an avaiable destination>>dail udp xx.xx.xx.xx 10086 operation was cancelled >>retry: all retry attempts failed.

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

    // Please attach your client log here.

All 16 comments

您需要重新编辑您的 issue,因为

  • 您粘贴的配置文件和日志没能被 GitHub Markdown 正确解析。
    粘贴配置文件和日志时候应该在两行 ``` 内粘贴你的配置文件和日志。

重新编辑了 @oing9179

@dcliubing
这样吧,

  • 你把客户端和服务器端的配置文件都上传上来吧,上传之前把文件里的ip地址去掉。
  • 在命令行里(Windows 下用 cmd)执行命令 tracert <你的服务器的IP地址>,然后把输出的文本以代码的形式贴出来。
    前5条输出内容不要,从第6条开始到后面的都贴出来。

6 10 ms 9 ms 15 ms 219.158.7.209
7 11 ms 10 ms 13 ms 219.158.112.162
8 11 ms 8 ms 9 ms 219.158.97.170
9 166 ms 165 ms 165 ms 219.158.104.10
10 209 ms 210 ms 210 ms 199.102.95.5
11 181 ms 164 ms 165 ms quadranet [204.152.204.1]
12 192 ms 162 ms 163 ms colo-lax13.as8100.net [96.44.180.94]
13 * * * 请求超时。
14 167 ms 165 ms 165 ms v719.sioru.com [107.182.184.20]
15 162 ms 162 ms 161 ms 服务器ipclouds.com [服务器ip]

跟踪完成。

@dcliubing
麻烦把配置文件上传上来,直接把配置文件拖拽到文本框里就行。

稍等我回家上传,谢谢

服务器日志“无”是什么鬼。配置一样的话,检查一下时间是不是同步,公司有没有额外的防火墙之类的问题。

服务器没有新的日志,有可能是时间问题,公司是加域的,时间改不了。

@dcliubing 没有新的日志怕不是根本没连上服务器,时间戳不对服务器也会有日志的。看看是不是公司防火墙的事情,换个端口试试

@wtlusvm
但是我看了下它(他 or 她 ?)给出的 traceroute,看上去能连通服务器,虽然前些天搬瓦工的网络有些波动。
估计应该是像你说的 防火墙的问题。

时间偏差十来分钟,单位wifi手机能连上,应该不是防火墙,基本上确定是时间问题,我疏忽时间了,谢谢大家

域里所有电脑时间是不是统一的?

@dcliubing
时间需要统一,但是 时区无关

@dcliubing 解决了就关掉这个issue吧

如上面所说,时间不对的话服务器端也会有日志。服务器端没日志说明物理上连不通。

安卓手机连不上v2ray,PC可以,why?

Was this page helpful?
0 / 5 - 0 ratings