vernesong / OpenClash

A Clash Client For OpenWrt
MIT License
15.96k stars 2.97k forks source link

v2ray的部分节点套CDN或者BGP问题 #483

Closed abc000123 closed 3 years ago

abc000123 commented 4 years ago

v2ray的部分节点套CDN或者BGP不能被openclash使用,安卓的v2rayng可以正常使用,请问如何解决,感谢

abc000123 commented 4 years ago

OpenClash 调试日志

生成时间: 2020-06-01 20:28:16 插件版本: v0.38.4-beta

===================== 系统信息 =====================

主机型号: Amlogic 固件版本: OpenWrt SNAPSHOT r2452-3ad7a35c LuCI版本: git-20.088.29068-cebe120-1 内核版本: 3.14.29 处理器架构: aarch64_generic

此项在使用Tun模式时应为ACCEPT

防火墙转发: ACCEPT

此项有值时建议到网络-接口-lan的设置中禁用IPV6的DHCP

IPV6-DHCP:

此项结果应仅有配置文件的DNS监听地址

Dnsmasq转发设置: 127.0.0.1#7874

===================== 依赖检查 =====================

dnsmasq-full: 已安装 coreutils: 已安装 coreutils-nohup: 已安装 bash: 已安装 curl: 已安装 jsonfilter: 已安装 ca-certificates: 已安装 ipset: 已安装 ip-full: 已安装 iptables-mod-tproxy: 已安装 kmod-tun(TUN模式): 已安装 luci-compat(Luci-19.07): 未安装

===================== 内核检查 =====================

运行状态: 运行中 已选择的架构: linux-armv8

下方无法显示内核版本号时请确认您的内核版本是否正确或者有无权限

Tun内核版本: 2020.05.08 Tun内核文件: 存在 Tun内核运行权限: 正常

Game内核版本: 20200510 Game内核文件: 存在 Game内核运行权限: 正常

Dev内核版本: premium-3-g5073c3c Dev内核文件: 存在 Dev内核运行权限: 正常

===================== 插件设置 =====================

当前配置文件: /etc/openclash/config/zhizhi.yaml 运行模式: fake-ip 默认代理模式: Rule UDP流量转发: 停用 DNS劫持: 启用 自定义DNS: 启用 IPV6-DNS解析: 停用 禁用Dnsmasq缓存: 停用 自定义规则: 启用 仅允许内网: 停用 仅代理命中规则流量: 停用

启动异常时建议关闭此项后重试

保留配置: 启用

启动异常时建议关闭此项后重试

第三方规则: lhie1 第三方规则策略组设置: GlobalTV: GlobalTV AsianTV: AsianTV Proxy: Proxy Apple: Apple Netflix: Netflix Spotify: Spotify Steam: Steam AdBlock: AdBlock Netease Music: Netease Music Speedtest: Speedtest Telegram: Telegram Microsoft: Microsoft PayPal: PayPal Domestic: Domestic Others: Others

读取的配置文件策略组: Auto - UrlTest Proxy Domestic Others Apple Microsoft Netflix Spotify Steam AdBlock AsianTV GlobalTV Speedtest Telegram PayPal Netease Music DIRECT REJECT

===================== 自定义规则 一 =====================

- DOMAIN-SUFFIX,google.com,Proxy 匹配域名后缀(交由Proxy代理服务器组)

- DOMAIN-KEYWORD,google,Proxy 匹配域名关键字(交由Proxy代理服务器组)

- DOMAIN,google.com,Proxy 匹配域名(交由Proxy代理服务器组)

- DOMAIN-SUFFIX,ad.com,REJECT 匹配域名后缀(拒绝)

- IP-CIDR,127.0.0.0/8,DIRECT 匹配数据目标IP(直连)

- SRC-IP-CIDR,192.168.1.201/32,DIRECT 匹配数据发起IP(直连)

- DST-PORT,80,DIRECT 匹配数据目标端口(直连)

- SRC-PORT,7777,DIRECT 匹配数据源端口(直连)

排序在上的规则优先生效,如添加(去除规则前的#号):

IP段:192.168.1.2-192.168.1.200 直连

- SRC-IP-CIDR,192.168.1.2/31,DIRECT

- SRC-IP-CIDR,192.168.1.4/30,DIRECT

- SRC-IP-CIDR,192.168.1.8/29,DIRECT

- SRC-IP-CIDR,192.168.1.16/28,DIRECT

- SRC-IP-CIDR,192.168.1.32/27,DIRECT

- SRC-IP-CIDR,192.168.1.64/26,DIRECT

- SRC-IP-CIDR,192.168.1.128/26,DIRECT

- SRC-IP-CIDR,192.168.1.192/29,DIRECT

- SRC-IP-CIDR,192.168.1.200/32,DIRECT

IP段:192.168.1.202-192.168.1.255 直连

- SRC-IP-CIDR,192.168.1.202/31,DIRECT

- SRC-IP-CIDR,192.168.1.204/30,DIRECT

- SRC-IP-CIDR,192.168.1.208/28,DIRECT

- SRC-IP-CIDR,192.168.1.224/27,DIRECT

此时IP为192.168.1.1和192.168.1.201的客户端流量走代理(策略),其余客户端不走代理

因为Fake-IP模式下,IP地址为192.168.1.1的路由器自身流量可走代理(策略),所以需要排除

在线IP段转CIDR地址:http://ip2cidr.com

===================== 自定义规则 二 =====================

- DOMAIN-SUFFIX,google.com,Proxy 匹配域名后缀(交由Proxy代理服务器组)

- DOMAIN-KEYWORD,google,Proxy 匹配域名关键字(交由Proxy代理服务器组)

- DOMAIN,google.com,Proxy 匹配域名(交由Proxy代理服务器组)

- DOMAIN-SUFFIX,ad.com,REJECT 匹配域名后缀(拒绝)

- IP-CIDR,127.0.0.0/8,DIRECT 匹配数据目标IP(直连)

- SRC-IP-CIDR,192.168.1.201/32,DIRECT 匹配数据发起IP(直连)

- DST-PORT,80,DIRECT 匹配数据目标端口(直连)

- SRC-PORT,7777,DIRECT 匹配数据源端口(直

===================== 防火墙设置 =====================

NAT chain

Chain PREROUTING (policy ACCEPT) num target prot opt source destination
1 REDIRECT tcp -- 0.0.0.0/0 8.8.4.4 redir ports 7892 2 REDIRECT tcp -- 0.0.0.0/0 8.8.8.8 redir ports 7892 3 CLOUD_MUSIC tcp -- 0.0.0.0/0 0.0.0.0/0 match-set music dst 4 REDIRECT udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:53 redir ports 53 5 REDIRECT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:53 redir ports 53 6 prerouting_rule all -- 0.0.0.0/0 0.0.0.0/0 / !fw3: Custom prerouting rule chain / 7 zone_lan_prerouting all -- 0.0.0.0/0 0.0.0.0/0 / !fw3 / 8 zone_vpn_prerouting all -- 0.0.0.0/0 0.0.0.0/0 / !fw3 / 9 openclash tcp -- 0.0.0.0/0 0.0.0.0/0
Chain OUTPUT (policy ACCEPT) num target prot opt source destination
1 openclash_output tcp -- 0.0.0.0/0 0.0.0.0/0

Mangle chain

Chain PREROUTING (policy ACCEPT) num target prot opt source destination
Chain OUTPUT (policy ACCEPT) num target prot opt source destination

===================== 路由表状态 =====================

route -n

Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 10.1.1.1 0.0.0.0 UG 0 0 0 br-lan 10.1.1.0 0.0.0.0 255.255.255.0 U 0 0 0 br-lan 192.168.192.0 0.0.0.0 255.255.255.0 U 0 0 0 ztc25ohmw2

ip route list

default via 10.1.1.1 dev br-lan proto static 10.1.1.0/24 dev br-lan proto kernel scope link src 10.1.1.122 192.168.192.0/24 dev ztc25ohmw2 proto kernel scope link src 192.168.192.84

ip rule show

0: from all lookup local 32766: from all lookup main 32767: from all lookup default

===================== 端口占用状态 =====================

tcp 0 0 :::9090 ::: LISTEN 17646/clash tcp 0 0 :::7890 ::: LISTEN 17646/clash tcp 0 0 :::7891 ::: LISTEN 17646/clash tcp 0 0 :::7892 ::: LISTEN 17646/clash udp 0 0 127.0.0.1:7874 0.0.0.0: 17646/clash udp 0 0 :::7891 ::: 17646/clash udp 0 0 :::7892 :::* 17646/clash

===================== 测试本机DNS查询 =====================

Server: 127.0.0.1 Address: 127.0.0.1#53

Name: www.baidu.com www.baidu.com canonical name = www.a.shifen.com Name: www.a.shifen.com Address 1: 180.101.49.12 Address 2: 180.101.49.11 www.baidu.com canonical name = www.a.shifen.com

===================== resolv.conf.auto =====================

Interface lan

nameserver 10.1.1.122

===================== 测试本机网络连接 =====================

HTTP/1.1 200 OK Accept-Ranges: bytes Cache-Control: private, no-cache, no-store, proxy-revalidate, no-transform Connection: keep-alive Content-Length: 277 Content-Type: text/html Date: Mon, 01 Jun 2020 12:28:19 GMT Etag: "575e1f60-115" Last-Modified: Mon, 13 Jun 2016 02:50:08 GMT Pragma: no-cache Server: bfe/1.0.8.18

===================== 测试本机网络下载 =====================

HTTP/1.1 200 Connection established

===================== 最近运行日志 =====================

time="2020-06-01T19:58:33+08:00" level=info msg="Start initial compatible provider Others" time="2020-06-01T19:58:33+08:00" level=info msg="Start initial compatible provider GlobalTV" time="2020-06-01T19:58:33+08:00" level=info msg="Start initial compatible provider Netease Music" time="2020-06-01T19:58:33+08:00" level=info msg="Start initial compatible provider AsianTV" time="2020-06-01T19:58:33+08:00" level=info msg="Start initial compatible provider Telegram" time="2020-06-01T19:58:33+08:00" level=info msg="Start initial compatible provider Netflix" time="2020-06-01T19:58:33+08:00" level=info msg="Start initial compatible provider Steam" time="2020-06-01T19:58:33+08:00" level=info msg="Start initial compatible provider Auto - UrlTest" time="2020-06-01T19:58:33+08:00" level=info msg="Start initial compatible provider Speedtest" time="2020-06-01T19:58:33+08:00" level=info msg="Start initial compatible provider Microsoft" time="2020-06-01T19:58:33+08:00" level=info msg="Start initial compatible provider AdBlock" time="2020-06-01T19:58:33+08:00" level=info msg="Start initial compatible provider PayPal" time="2020-06-01T19:58:33+08:00" level=info msg="Start initial compatible provider Spotify" time="2020-06-01T19:58:33+08:00" level=info msg="Start initial compatible provider Proxy" time="2020-06-01T19:58:33+08:00" level=info msg="Start initial compatible provider Domestic" time="2020-06-01T19:58:33+08:00" level=info msg="Start initial compatible provider Apple" 2020-06-01 19:58:02 OpenClash Start Successful

abc000123 commented 4 years ago

Server: 127.0.0.1 Address: 127.0.0.1#53 Name: 隐藏域名 Address 1: 119.188.隐.藏 *** Can't find 隐藏域名: No answer

abc000123 commented 4 years ago

 OpenWrt

诊断网络工具

  IPv4  IPv6 

 

安装 iputils-traceroute6 以进行 IPv6 路由追踪

正在收集数据...traceroute to 隐藏域名(119.188隐藏), 30 hops max, 46 byte packets 1 10.1.1.1 0.663 ms 2 144.255.31.1 291.974 ms 3 60.235.3.97 2.733 ms 4 60.235.0.217 8.232 ms 5 202.97.18.149 30.051 ms 6 202.97.46.18 20.670 ms 7 202.97.17.186 24.194 ms 8 219.158.6.221 23.082 ms 9 219.158.7.174 30.161 ms 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 *

vernesong commented 4 years ago

IPV6仅在普通redir模式下可用,你的DNS设置一个国内114,不要用本机53端口的地址

abc000123 commented 4 years ago

IPV6仅在普通redir模式下可用,你的DNS设置一个国内114,不要用本机53端口的地址

并没有开启IPv6,尝试设置114的上级dns,极少部分v2ray的部分节点套CDN或者BGP也不能被openclash使用。部分原始ip的v2节点也不能被使用