v2ray / v2ray-core

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

[Discussion]Routing无效,geosite:cn设置的direct也走代理 #2264

Closed skypolis closed 4 years ago

skypolis commented 4 years ago

提交 Issue 之前请先阅读 Issue 指引,然后回答下面的问题,谢谢。 除非特殊情况,请完整填写所有问题。不按模板发的 issue 将直接被关闭。 如果你遇到的问题不是 V2Ray 的 bug,比如你不清楚要如何配置,请使用Discussion进行讨论。

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

2) 你的使用场景是什么?比如使用 Chrome 通过 Socks/VMess 代理观看 YouTube 视频。 使用Chrome通过HTTP/VMess上Google,通过direct上国内网站

3) 你看到的不正常的现象是什么?(请描述具体现象,比如访问超时,TLS 证书错误等) 今天V2rayN客户端突然报告2333端口突然无法绑定,所以切换到v2ray.exe走HTTP代理。现在Google可以正常打开。但routing中设置的direct无效,国内网站打开很慢。

4) 你期待看到的正确表现是怎样的? cn网站走direct

5) 请附上你的配置(提交 Issue 前请隐藏服务器端IP地址)。

服务器端配置:

    // 在这里附上服务器端配置文件

客户端配置:

    // 在这里附上客户端配置
{
  "log": {
    "access": "./v2ray.log",
    "debug": "./v2ray.log",
    "loglevel": "debug"
  },
  "inbound": {
    "port": 4455,
    "listen": "127.0.0.1",
    "protocol": "HTTP",
    "settings": {
      "auth": "noauth",
      "udp": true,
      "ip": "127.0.0.1",
      "clients": null
    },
    "streamSettings": null
  },
  "outbound": {
    "tag": "agentout",
    "protocol": "vmess",
    "settings": {
      "vnext": [
        {
          "address": "155.138.133.253",
          "port": 19276,
          "users": [
            {
              "id": "b36443ed-3214-43e0-bbdf-eb8dee07284e",
              "alterId": 64,
              "email": "t@t.tt",
              "security": "aes-128-gcm"
            }
          ]
        }
      ],
      "servers": null
    },
    "streamSettings": {
      "network": "tcp",
      "security": "",
      "tlsSettings": null,
      "tcpSettings": null,
      "kcpSettings": null,
      "wsSettings": null,
      "httpSettings": null
    },
    "mux": {
      "enabled": true
    }
  },
  "inboundDetour": null,
  "outboundDetour": [
    {
      "protocol": "freedom",
      "settings": {},
      "tag": "direct"
    },
    {
      "protocol": "blackhole",
      "settings": {},
      "tag": "blockout"
    }
  ],
  "dns": {
    "servers": [
      "8.8.8.8",
      "8.8.4.4",
      "localhost"
    ]
  },
  "routing": {
    "domainStrategy": "IPOnDemand",
    "rules": [
      {
        "type": "field",
        "outboundTag": "direct",
        "domain": [
          "geosite:cn"
        ]
      }
    ]
  }
}
}

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

服务器端错误日志:

    // 在这里附上服务器端日志

客户端错误日志:

    // 在这里附上客户端日志
2020/02/19 17:10:46 127.0.0.1:22001 accepted //mqtt-web.zhihu.com:443  
2020/02/19 17:10:46 127.0.0.1:22002 accepted //mqtt-web.zhihu.com:443  
2020/02/19 17:10:56 127.0.0.1:22007 accepted //www.google.com:443  
2020/02/19 17:11:05 127.0.0.1:22009 accepted http://www.sogou.com/imewis/msugg?ifc=4&em=4  
2020/02/19 17:11:07 127.0.0.1:22011 accepted http://www.sogou.com/imewis/msugg?ifc=4&em=4  
2020/02/19 17:11:07 127.0.0.1:22013 accepted http://www.sogou.com/imewis/msugg?ifc=4&em=4  
2020/02/19 17:11:08 127.0.0.1:22015 accepted http://www.sogou.com/imewis/msugg?ifc=4&em=4  
2020/02/19 17:11:17 127.0.0.1:22017 accepted http://www.sogou.com/imewis/msugg?ifc=4&em=4  
2020/02/19 17:11:17 127.0.0.1:22019 accepted http://www.sogou.com/imewis/msugg?ifc=4&em=4  
2020/02/19 17:11:18 127.0.0.1:22021 accepted //www.jd.com:443  
2020/02/19 17:11:18 127.0.0.1:22022 accepted //www.jd.com:443  
2020/02/19 17:11:18 127.0.0.1:22023 accepted //misc.360buyimg.com:443  
2020/02/19 17:11:19 127.0.0.1:22027 accepted //wl.jd.com:443  
2020/02/19 17:11:19 127.0.0.1:22028 accepted //misc.360buyimg.com:443  
2020/02/19 17:11:19 127.0.0.1:22030 accepted //misc.360buyimg.com:443  
2020/02/19 17:11:19 127.0.0.1:22032 accepted //clients4.google.com:443  
2020/02/19 17:11:20 127.0.0.1:22034 accepted //mercury.jd.com:443  
2020/02/19 17:11:20 127.0.0.1:22035 accepted //passport.jd.com:443  
2020/02/19 17:11:20 127.0.0.1:22036 accepted //passport.jd.com:443  
2020/02/19 17:11:20 127.0.0.1:22037 accepted //floor.jd.com:443  
2020/02/19 17:11:20 127.0.0.1:22038 accepted //floor.jd.com:443  
2020/02/19 17:11:21 127.0.0.1:22039 accepted //mercury.jd.com:443  
2020/02/19 17:11:21 127.0.0.1:22040 accepted //mercury.jd.com:443  
2020/02/19 17:11:21 127.0.0.1:22041 accepted //mercury.jd.com:443  
2020/02/19 17:11:21 127.0.0.1:22050 accepted //lapi.jd.com:443  
2020/02/19 17:11:21 127.0.0.1:22051 accepted //api.m.jd.com:443  
2020/02/19 17:11:21 127.0.0.1:22052 accepted //img1.360buyimg.com:443  
2020/02/19 17:11:21 127.0.0.1:22053 accepted //fd.3.cn:443  
2020/02/19 17:11:21 127.0.0.1:22054 accepted //im-x.jd.com:443  
2020/02/19 17:11:21 127.0.0.1:22055 accepted //imgcps.jd.com:443  
2020/02/19 17:11:21 127.0.0.1:22056 accepted //img10.360buyimg.com:443  
2020/02/19 17:11:21 127.0.0.1:22057 accepted //lapi.jd.com:443  
2020/02/19 17:11:21 127.0.0.1:22060 accepted //fd.3.cn:443  
2020/02/19 17:11:22 127.0.0.1:22068 accepted //d.jd.com:443  
2020/02/19 17:12:03 127.0.0.1:22071 accepted http://crl.certum.pl/ca.crl  
2020/02/19 17:12:41 127.0.0.1:22074 accepted //github.com:443  
2020/02/19 17:12:41 127.0.0.1:22075 accepted //github.com:443  
2020/02/19 17:12:41 127.0.0.1:22076 accepted //github.githubassets.com:443  
2020/02/19 17:12:46 127.0.0.1:22078 accepted //eclick.baidu.com:443  
2020/02/19 17:12:46 127.0.0.1:22079 accepted //eclick.baidu.com:443  
2020/02/19 17:12:46 127.0.0.1:22080 accepted //hm.baidu.com:443  
2020/02/19 17:12:46 127.0.0.1:22081 accepted //hm.baidu.com:443  
2020/02/19 17:12:47 127.0.0.1:22083 accepted //avatars1.githubusercontent.com:443  
2020/02/19 17:12:47 127.0.0.1:22084 accepted //avatars1.githubusercontent.com:443  
2020/02/19 17:12:47 127.0.0.1:22085 accepted //avatars0.githubusercontent.com:443  
2020/02/19 17:12:47 127.0.0.1:22086 accepted //avatars3.githubusercontent.com:443  
2020/02/19 17:12:47 127.0.0.1:22087 accepted //avatars2.githubusercontent.com:443  
2020/02/19 17:12:47 127.0.0.1:22088 accepted //avatars0.githubusercontent.com:443  
2020/02/19 17:12:47 127.0.0.1:22089 accepted //avatars1.githubusercontent.com:443  
2020/02/19 17:12:48 127.0.0.1:22094 accepted //avatars3.githubusercontent.com:443  
2020/02/19 17:12:48 127.0.0.1:22095 accepted //avatars0.githubusercontent.com:443  
2020/02/19 17:12:48 127.0.0.1:22096 accepted //avatars2.githubusercontent.com:443  
2020/02/19 17:12:48 127.0.0.1:22097 accepted //clients1.google.com:443  
2020/02/19 17:12:54 127.0.0.1:22100 accepted //live.github.com:443  
2020/02/19 17:12:55 127.0.0.1:22101 accepted //www.google-analytics.com:443  
2020/02/19 17:12:55 127.0.0.1:22102 accepted //collector.githubapp.com:443  
2020/02/19 17:12:55 127.0.0.1:22103 accepted //api.github.com:443  
2020/02/19 17:13:05 127.0.0.1:22105 accepted //github.com:443  
2020/02/19 17:13:05 127.0.0.1:22106 accepted //github.githubassets.com:443  
2020/02/19 17:13:08 127.0.0.1:22107 accepted //live.github.com:443  
2020/02/19 17:13:17 127.0.0.1:22108 accepted //github.com:443  
2020/02/19 17:13:17 127.0.0.1:22109 accepted //github.githubassets.com:443  
2020/02/19 17:13:19 127.0.0.1:22110 accepted //live.github.com:443  
2020/02/19 17:13:24 127.0.0.1:22111 accepted //play.google.com:443  
2020/02/19 17:13:35 127.0.0.1:22112 accepted //github.com:443  
2020/02/19 17:14:24 127.0.0.1:22113 accepted //go.microsoft.com:443  
2020/02/19 17:14:27 127.0.0.1:22116 accepted //stopservice.chshap.blob.core.windows.net:443  
2020/02/19 17:14:37 127.0.0.1:22117 accepted //stopservice.chshap.blob.core.windows.net:443  
2020/02/19 17:14:46 127.0.0.1:22118 accepted //stopservice.chshap.blob.core.windows.net:443  
2020/02/19 17:14:51 127.0.0.1:22121 accepted //live.github.com:443  
2020/02/19 17:15:24 127.0.0.1:22123 accepted //go.microsoft.com:443  
2020/02/19 17:15:26 127.0.0.1:22124 accepted //chshap.blob.core.windows.net:443  
2020/02/19 17:15:27 127.0.0.1:22125 accepted //array707.prod.do.dsp.mp.microsoft.com:443  
2020/02/19 17:15:36 127.0.0.1:22126 accepted //chshap.blob.core.windows.net:443  
2020/02/19 17:15:45 127.0.0.1:22127 accepted //chshap.blob.core.windows.net:443  
2020/02/19 17:15:55 127.0.0.1:22128 accepted //note.youdao.com:443  
2020/02/19 17:15:55 127.0.0.1:22129 accepted //note.youdao.com:443  
2020/02/19 17:15:55 127.0.0.1:22130 accepted //urswebzj.nosdn.127.net:443  
2020/02/19 17:15:55 127.0.0.1:22131 accepted //shared-https.ydstatic.com:443  
2020/02/19 17:15:55 127.0.0.1:22132 accepted //qiyukf.com:443  
2020/02/19 17:15:56 127.0.0.1:22134 accepted //hm.baidu.com:443  
2020/02/19 17:15:56 127.0.0.1:22136 accepted //www.google-analytics.com:443  
2020/02/19 17:15:58 127.0.0.1:22139 accepted //note.youdao.com:443  
2020/02/19 17:15:59 127.0.0.1:22140 accepted //note.youdao.com:443  
2020/02/19 17:15:59 127.0.0.1:22141 accepted //note.youdao.com:443  
2020/02/19 17:15:59 127.0.0.1:22142 accepted //note.youdao.com:443  
2020/02/19 17:16:00 127.0.0.1:22143 accepted //web.push.126.net:443  
2020/02/19 17:16:01 127.0.0.1:22145 accepted //web.push.126.net:443  
2020/02/19 17:16:01 127.0.0.1:22147 accepted //qiyukf.com:443  
2020/02/19 17:16:03 127.0.0.1:22148 accepted //www.google.com:443  
2020/02/19 17:16:06 127.0.0.1:22149 accepted //gorgon.youdao.com:443  
2020/02/19 17:16:06 127.0.0.1:22150 accepted //clients4.google.com:443  
2020/02/19 17:16:08 127.0.0.1:22151 accepted //stopservice.chshap.blob.core.windows.net:443  
2020/02/19 17:16:08 127.0.0.1:22152 accepted //hm.baidu.com:443  
2020/02/19 17:16:08 127.0.0.1:22154 accepted //clients1.google.com:443  
2020/02/19 17:16:10 127.0.0.1:22155 accepted //note.youdao.com:443  
2020/02/19 17:16:17 127.0.0.1:22156 accepted //stopservice.chshap.blob.core.windows.net:443  
2020/02/19 17:16:27 127.0.0.1:22160 accepted //stopservice.chshap.blob.core.windows.net:443  
2020/02/19 17:17:27 127.0.0.1:22204 accepted //go.microsoft.com:443  
2020/02/19 17:17:27 127.0.0.1:22205 accepted //note.youdao.com:443  
2020/02/19 17:17:29 127.0.0.1:22206 accepted //stopservice.chshap.blob.core.windows.net:443  
2020/02/19 17:17:38 127.0.0.1:22207 accepted //stopservice.chshap.blob.core.windows.net:443  
2020/02/19 17:17:47 127.0.0.1:22208 accepted //chshap.blob.core.windows.net:443  
2020/02/19 17:17:48 127.0.0.1:22223 accepted //stopservice.chshap.blob.core.windows.net:443  
2020/02/19 17:17:56 127.0.0.1:22225 accepted //chshap.blob.core.windows.net:443  
2020/02/19 17:18:05 127.0.0.1:22227 accepted //chshap.blob.core.windows.net:443  

7) 请附上访问日志。在 Linux 中,日志通常在 /var/log/v2ray/access.log 文件中。

    // 在这里附上服务器端日志

8) 其它相关的配置文件(如 Nginx)和相关日志。

9) 如果 V2Ray 无法启动,请附上 --test 输出。

通常的命令为 /usr/bin/v2ray/v2ray --test --config /etc/v2ray/config.json。请按实际情况修改。

10) 如果 V2Ray 服务运行不正常,请附上 journal 日志。

通常的命令为 journalctl -u v2ray

请预览一下你填的内容再提交。

kslr commented 4 years ago

先升级到最新版本

skypolis commented 4 years ago

非常感谢你的回应! 虽然还没搞清楚代理的2333端口为什么突然绑不上了,但现在至少可以先用了。 后续发现了新的进展再分享给大家。