vernesong / OpenClash

A Clash Client For OpenWrt
MIT License
16.63k stars 3.07k forks source link

OpenClash有时出错导致任何网站都打不开。 #1747

Closed ghost closed 2 years ago

ghost commented 2 years ago

每次使用Windows端的Telegram(从微软应用商店下载的官方版本)后,OpenClash必定出错。同时,在一些其他情况下,OpenClash也会出错,表现为任何国内国外的网站都打不开。只有关闭OpenClash后才能恢复正常。 日志如下: OpenClash 调试日志

生成时间: 2021-11-09 15:46:32 插件版本: v0.43.09-beta 隐私提示: 上传此日志前请注意检查、屏蔽公网IP、节点、密码等相关敏感信息


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

主机型号: Newifi-D2
固件版本: OpenWrt SNAPSHOT r3670-cdb022d3e
LuCI版本: git-21.238.35254-83494a9-1
内核版本: 5.4.142
处理器架构: mipsel_24kc

#此项有值时,如不使用IPv6,建议到网络-接口-lan的设置中禁用IPV6的DHCP
IPV6-DHCP: server

#此项结果应仅有配置文件的DNS监听地址
Dnsmasq转发设置: 127.0.0.1#7874

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

dnsmasq-full: 已安装
coreutils: 已安装
coreutils-nohup: 已安装
bash: 已安装
curl: 已安装
ca-certificates: 已安装
ipset: 已安装
ip-full: 已安装
iptables-mod-tproxy: 已安装
kmod-ipt-tproxy: 已安装
iptables-mod-extra: 已安装
kmod-ipt-extra: 已安装
libcap: 已安装
libcap-bin: 已安装
ruby: 已安装
ruby-yaml: 已安装
ruby-psych: 已安装
ruby-pstore: 已安装
ruby-dbm: 已安装
kmod-tun(TUN模式): 已安装
luci-compat(Luci-19.07): 未安装

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

运行状态: 运行中
进程pid: 30316
运行权限: 30316: cap_dac_override,cap_net_bind_service,cap_net_admin,cap_net_raw,cap_sys_resource=eip
运行用户: nobody
已选择的架构: linux-mipsle-softfloat

#下方无法显示内核版本号时请确认您的内核版本是否正确或者有无权限
Tun内核版本: 2021.09.15
Tun内核文件: 存在
Tun内核运行权限: 正常

Game内核版本: 20210310-122-g48a4641
Game内核文件: 存在
Game内核运行权限: 正常

Dev内核版本: v1.7.1-24-gebbc960
Dev内核文件: 存在
Dev内核运行权限: 正常

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

当前配置文件: /etc/openclash/config/路由器.yaml
启动配置文件: /etc/openclash/路由器.yaml
运行模式: fake-ip
默认代理模式: rule
UDP流量转发(tproxy): 启用
DNS劫持: 启用
自定义DNS: 停用
IPV6代理: 启用
IPV6-DNS解析: 启用
禁用Dnsmasq缓存: 停用
自定义规则: 停用
仅允许内网: 停用
仅代理命中规则流量: 停用
仅允许常用端口流量: 停用
绕过中国大陆IP: 停用

#启动异常时建议关闭此项后重试
混合节点: 停用
保留配置: 停用

#启动异常时建议关闭此项后重试
第三方规则: 停用

#===================== 配置文件 =====================#

proxy-groups:
- name: Auto - UrlTest
  type: url-test
  proxies:
  - 104.255.65.83
  - 美国高速 IPv6
  - 美国大流量 IPv4
  - 美国大流量 IPv6
  url: https://cp.cloudflare.com/generate_204
  interval: '600'
  tolerance: '150'
- name: Proxy
  type: select
  proxies:
  - Auto - UrlTest
  - DIRECT
  - 104.255.65.83
  - 美国高速 IPv6
  - 美国大流量 IPv4
  - 美国大流量 IPv6
- name: Domestic
  type: select
  proxies:
  - DIRECT
  - Proxy
- name: Others
  type: select
  proxies:
  - Proxy
  - DIRECT
  - Domestic
- name: Microsoft
  type: select
  proxies:
  - DIRECT
  - Proxy
- name: Apple
  type: select
  proxies:
  - DIRECT
  - Proxy
  - 104.255.65.83
- name: Scholar
  type: select
  proxies:
  - Proxy
  - DIRECT
  - 104.255.65.83
- name: Bilibili
  type: select
  proxies:
  - AsianTV
  - DIRECT
  - 104.255.65.83
- name: Bahamut
  type: select
  proxies:
  - GlobalTV
  - DIRECT
  - 104.255.65.83
- name: HBO
  type: select
  proxies:
  - GlobalTV
  - DIRECT
  - 104.255.65.83
- name: Pornhub
  type: select
  proxies:
  - GlobalTV
  - DIRECT
  - 104.255.65.83
- name: Netflix
  type: select
  proxies:
  - GlobalTV
  - DIRECT
  - 104.255.65.83
- name: Disney
  type: select
  proxies:
  - GlobalTV
  - DIRECT
  - 104.255.65.83
- name: Youtube
  type: select
  disable-udp: true
  proxies:
  - GlobalTV
  - DIRECT
  - 104.255.65.83
- name: Spotify
  type: select
  proxies:
  - GlobalTV
  - DIRECT
  - 104.255.65.83
- name: Steam
  type: select
  proxies:
  - DIRECT
  - Proxy
  - 104.255.65.83
- name: AdBlock
  type: select
  proxies:
  - DIRECT
  - REJECT
  - Proxy
- name: AsianTV
  type: select
  proxies:
  - DIRECT
  - Proxy
  - 104.255.65.83
- name: GlobalTV
  type: select
  proxies:
  - Proxy
  - DIRECT
  - 104.255.65.83
- name: Speedtest
  type: select
  proxies:
  - Proxy
  - DIRECT
  - 104.255.65.83
- name: Telegram
  type: select
  proxies:
  - Proxy
  - DIRECT
  - 104.255.65.83
- name: PayPal
  type: select
  proxies:
  - DIRECT
  - Proxy
  - 104.255.65.83
rules:
- DOMAIN,jiankai.ml,DIRECT
- IP-CIDR,104.255.65.83/32,DIRECT
- IP-CIDR,107.173.87.240/32,DIRECT
- IP-CIDR6,2001:470:1f14:22b::2/128,DIRECT
- IP-CIDR6,2001:470:1f04:316::2/128,DIRECT
- RULE-SET,Reject,AdBlock
- RULE-SET,Special,DIRECT
- RULE-SET,Netflix,Netflix
- RULE-SET,Spotify,Spotify
- RULE-SET,YouTube,Youtube
- RULE-SET,Disney Plus,Disney
- RULE-SET,Bilibili,Bilibili
- RULE-SET,iQiyi,AsianTV
- RULE-SET,Letv,AsianTV
- RULE-SET,Netease Music,AsianTV
- RULE-SET,Tencent Video,AsianTV
- RULE-SET,Youku,AsianTV
- RULE-SET,WeTV,AsianTV
- RULE-SET,ABC,GlobalTV
- RULE-SET,Abema TV,GlobalTV
- RULE-SET,Amazon,GlobalTV
- RULE-SET,Apple News,GlobalTV
- RULE-SET,Apple TV,GlobalTV
- RULE-SET,Bahamut,Bahamut
- RULE-SET,BBC iPlayer,GlobalTV
- RULE-SET,DAZN,GlobalTV
- RULE-SET,Discovery Plus,GlobalTV
- RULE-SET,encoreTVB,GlobalTV
- RULE-SET,Fox Now,GlobalTV
- RULE-SET,Fox+,GlobalTV
- RULE-SET,HBO,HBO
- RULE-SET,Hulu Japan,GlobalTV
- RULE-SET,Hulu,GlobalTV
- RULE-SET,Japonx,GlobalTV
- RULE-SET,JOOX,GlobalTV
- RULE-SET,KKBOX,GlobalTV
- RULE-SET,KKTV,GlobalTV
- RULE-SET,Line TV,GlobalTV
- RULE-SET,myTV SUPER,GlobalTV
- RULE-SET,Pandora,GlobalTV
- RULE-SET,PBS,GlobalTV
- RULE-SET,Pornhub,Pornhub
- RULE-SET,Soundcloud,GlobalTV
- RULE-SET,ViuTV,GlobalTV
- RULE-SET,Telegram,Telegram
- RULE-SET,Steam,Steam
- RULE-SET,Speedtest,Speedtest
- RULE-SET,PayPal,PayPal
- RULE-SET,Microsoft,Microsoft
- RULE-SET,PROXY,Proxy
- RULE-SET,Apple,Apple
- RULE-SET,Scholar,Scholar
- RULE-SET,Domestic,Domestic
- RULE-SET,Domestic IPs,Domestic
- RULE-SET,LAN,DIRECT
- IP-CIDR,198.18.0.1/16,REJECT,no-resolve
- GEOIP,CN,Domestic
- MATCH,Others
redir-port: 7892
port: 7890
socks-port: 7891
mixed-port: 7893
mode: rule
log-level: silent
allow-lan: true
external-controller: 0.0.0.0:9090
bind-address: "*"
external-ui: "/usr/share/openclash/dashboard"
dns:
  enable: true
  ipv6: true
  enhanced-mode: fake-ip
  fake-ip-range: 198.18.0.1/16
  listen: 0.0.0.0:7874
  fake-ip-filter:
  - "*.lan"
  - time.windows.com
  - time.nist.gov
  - time.apple.com
  - time.asia.apple.com
  - "*.ntp.org.cn"
  - "*.openwrt.pool.ntp.org"
  - time1.cloud.tencent.com
  - time.ustc.edu.cn
  - pool.ntp.org
  - ntp.ubuntu.com
  - ntp.aliyun.com
  - ntp1.aliyun.com
  - ntp2.aliyun.com
  - ntp3.aliyun.com
  - ntp4.aliyun.com
  - ntp5.aliyun.com
  - ntp6.aliyun.com
  - ntp7.aliyun.com
  - time1.aliyun.com
  - time2.aliyun.com
  - time3.aliyun.com
  - time4.aliyun.com
  - time5.aliyun.com
  - time6.aliyun.com
  - time7.aliyun.com
  - "*.time.edu.cn"
  - time1.apple.com
  - time2.apple.com
  - time3.apple.com
  - time4.apple.com
  - time5.apple.com
  - time6.apple.com
  - time7.apple.com
  - time1.google.com
  - time2.google.com
  - time3.google.com
  - time4.google.com
  - music.163.com
  - "*.music.163.com"
  - "*.126.net"
  - musicapi.taihe.com
  - music.taihe.com
  - songsearch.kugou.com
  - trackercdn.kugou.com
  - "*.kuwo.cn"
  - api-jooxtt.sanook.com
  - api.joox.com
  - joox.com
  - y.qq.com
  - "*.y.qq.com"
  - streamoc.music.tc.qq.com
  - mobileoc.music.tc.qq.com
  - isure.stream.qqmusic.qq.com
  - dl.stream.qqmusic.qq.com
  - aqqmusic.tc.qq.com
  - amobile.music.tc.qq.com
  - "*.xiami.com"
  - "*.music.migu.cn"
  - music.migu.cn
  - "*.msftconnecttest.com"
  - "*.msftncsi.com"
  - localhost.ptlogin2.qq.com
  - "+.srv.nintendo.net"
  - "+.stun.playstation.net"
  - xbox.*.microsoft.com
  - "+.xboxlive.com"
  - proxy.golang.org
  - stun.*.*
  - stun.*.*.*
  - heartbeat.belkin.com
  - "*.linksys.com"
  - "*.linksyssmartwifi.com"
  - "+.battlenet.com.cn"
  nameserver:
  - 100.71.128.1
  - "[fe80::f64c:70ff:fe12:3]:53"
  - dhcp://"pppoe-wan"
  - 114.114.114.114
  - 119.29.29.29
  fallback:
  - https://cloudflare-dns.com/dns-query
  - https://dns.google/dns-query
  - https://1.1.1.1/dns-query
  - tls://8.8.8.8:853
  default-nameserver:
  - 100.71.128.1
  - "[fe80::f64c:70ff:fe12:3]:53"
  - 114.114.114.114
  - 119.29.29.29
ipv6: true
profile:
  store-selected: true
  store-fakeip: true
rule-providers:
  Reject:
    type: http
    behavior: classical
    url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Reject.yaml
    path: "./rule_provider/Reject"
    interval: 86400
  Special:
    type: http
    behavior: classical
    url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Special.yaml
    path: "./rule_provider/Special"
    interval: 86400
  Netflix:
    type: http
    behavior: classical
    url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Media/Netflix.yaml
    path: "./rule_provider/Netflix"
    interval: 86400
  Spotify:
    type: http
    behavior: classical
    url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Media/Spotify.yaml
    path: "./rule_provider/Spotify"
    interval: 86400
  YouTube:
    type: http
    behavior: classical
    url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Media/YouTube.yaml
    path: "./rule_provider/YouTube"
    interval: 86400
  Bilibili:
    type: http
    behavior: classical
    url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Media/Bilibili.yaml
    path: "./rule_provider/Bilibili"
    interval: 86400
  iQiyi:
    type: http
    behavior: classical
    url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Media/iQiyi.yaml
    path: "./rule_provider/iQiyi"
    interval: 86400
  Letv:
    type: http
    behavior: classical
    url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Media/Letv.yaml
    path: "./rule_provider/Letv"
    interval: 86400
  Netease Music:
    type: http
    behavior: classical
    url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Media/Netease%20Music.yaml
    path: "./rule_provider/Netease_Music"
    interval: 86400
  Tencent Video:
    type: http
    behavior: classical
    url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Media/Tencent%20Video.yaml
    path: "./rule_provider/Tencent_Video"
    interval: 86400
  Youku:
    type: http
    behavior: classical
    url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Media/Youku.yaml
    path: "./rule_provider/Youku"
    interval: 86400
  WeTV:
    type: http
    behavior: classical
    url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Media/WeTV.yaml
    path: "./rule_provider/WeTV"
    interval: 86400
  ABC:
    type: http
    behavior: classical
    url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Media/ABC.yaml
    path: "./rule_provider/ABC"
    interval: 86400
  Abema TV:
    type: http
    behavior: classical
    url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Media/Abema%20TV.yaml
    path: "./rule_provider/Abema_TV"
    interval: 86400
  Amazon:
    type: http
    behavior: classical
    url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Media/Amazon.yaml
    path: "./rule_provider/Amazon"
    interval: 86400
  Apple News:
    type: http
    behavior: classical
    url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Media/Apple%20News.yaml
    path: "./rule_provider/Apple_News"
    interval: 86400
  Apple TV:
    type: http
    behavior: classical
    url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Media/Apple%20TV.yaml
    path: "./rule_provider/Apple_TV"
    interval: 86400
  Bahamut:
    type: http
    behavior: classical
    url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Media/Bahamut.yaml
    path: "./rule_provider/Bahamut"
    interval: 86400
  BBC iPlayer:
    type: http
    behavior: classical
    url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Media/BBC%20iPlayer.yaml
    path: "./rule_provider/BBC_iPlayer"
    interval: 86400
  DAZN:
    type: http
    behavior: classical
    url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Media/DAZN.yaml
    path: "./rule_provider/DAZN"
    interval: 86400
  Discovery Plus:
    type: http
    behavior: classical
    url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Media/Discovery%20Plus.yaml
    path: "./rule_provider/Discovery_Plus"
    interval: 86400
  Disney Plus:
    type: http
    behavior: classical
    url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Media/Disney%20Plus.yaml
    path: "./rule_provider/Disney_Plus"
    interval: 86400
  encoreTVB:
    type: http
    behavior: classical
    url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Media/encoreTVB.yaml
    path: "./rule_provider/encoreTVB"
    interval: 86400
  Fox Now:
    type: http
    behavior: classical
    url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Media/Fox%20Now.yaml
    path: "./rule_provider/Fox_Now"
    interval: 86400
  Fox+:
    type: http
    behavior: classical
    url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Media/Fox%2B.yaml
    path: "./rule_provider/Fox+"
    interval: 86400
  HBO:
    type: http
    behavior: classical
    url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Media/HBO.yaml
    path: "./rule_provider/HBO"
    interval: 86400
  Hulu Japan:
    type: http
    behavior: classical
    url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Media/Hulu%20Japan.yaml
    path: "./rule_provider/Hulu_Japan"
    interval: 86400
  Hulu:
    type: http
    behavior: classical
    url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Media/Hulu.yaml
    path: "./rule_provider/Hulu"
    interval: 86400
  Japonx:
    type: http
    behavior: classical
    url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Media/Japonx.yaml
    path: "./rule_provider/Japonx"
    interval: 86400
  JOOX:
    type: http
    behavior: classical
    url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Media/JOOX.yaml
    path: "./rule_provider/JOOX"
    interval: 86400
  KKBOX:
    type: http
    behavior: classical
    url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Media/KKBOX.yaml
    path: "./rule_provider/KKBOX"
    interval: 86400
  KKTV:
    type: http
    behavior: classical
    url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Media/KKTV.yaml
    path: "./rule_provider/KKTV"
    interval: 86400
  Line TV:
    type: http
    behavior: classical
    url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Media/Line%20TV.yaml
    path: "./rule_provider/Line_TV"
    interval: 86400
  myTV SUPER:
    type: http
    behavior: classical
    url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Media/myTV%20SUPER.yaml
    path: "./rule_provider/myTV_SUPER"
    interval: 86400
  Pandora:
    type: http
    behavior: classical
    url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Media/Pandora.yaml
    path: "./rule_provider/Pandora"
    interval: 86400
  PBS:
    type: http
    behavior: classical
    url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Media/PBS.yaml
    path: "./rule_provider/PBS"
    interval: 86400
  Pornhub:
    type: http
    behavior: classical
    url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Media/Pornhub.yaml
    path: "./rule_provider/Pornhub"
    interval: 86400
  Soundcloud:
    type: http
    behavior: classical
    url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Media/Soundcloud.yaml
    path: "./rule_provider/Soundcloud"
    interval: 86400
  ViuTV:
    type: http
    behavior: classical
    url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Media/ViuTV.yaml
    path: "./rule_provider/ViuTV"
    interval: 86400
  Telegram:
    type: http
    behavior: classical
    url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Telegram.yaml
    path: "./rule_provider/Telegram"
    interval: 86400
  Steam:
    type: http
    behavior: classical
    url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Steam.yaml
    path: "./rule_provider/Steam"
    interval: 86400
  Speedtest:
    type: http
    behavior: classical
    url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Speedtest.yaml
    path: "./rule_provider/Speedtest"
    interval: 86400
  PayPal:
    type: http
    behavior: classical
    url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/PayPal.yaml
    path: "./rule_provider/PayPal"
    interval: 86400
  Microsoft:
    type: http
    behavior: classical
    url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Microsoft.yaml
    path: "./rule_provider/Microsoft"
    interval: 86400
  PROXY:
    type: http
    behavior: classical
    url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Proxy.yaml
    path: "./rule_provider/Proxy"
    interval: 86400
  Domestic:
    type: http
    behavior: classical
    url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Domestic.yaml
    path: "./rule_provider/Domestic"
    interval: 86400
  Apple:
    type: http
    behavior: classical
    url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Apple.yaml
    path: "./rule_provider/Apple"
    interval: 86400
  Scholar:
    type: http
    behavior: classical
    url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Scholar.yaml
    path: "./rule_provider/Scholar"
    interval: 86400
  Domestic IPs:
    type: http
    behavior: ipcidr
    url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Domestic%20IPs.yaml
    path: "./rule_provider/Domestic_IPs"
    interval: 86400
  LAN:
    type: http
    behavior: classical
    url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/LAN.yaml
    path: "./rule_provider/LAN"
    interval: 86400
script:
  code: |
    def main(ctx, metadata):
        ruleset_action = {"Reject": "AdBlock",
            "Special": "DIRECT",
            "Netflix": "Netflix",
            "Spotify": "Spotify",
            "YouTube": "Youtube",
            "Disney Plus": "Disney",
            "Bilibili": "Bilibili",
            "iQiyi": "AsianTV",
            "Letv": "AsianTV",
            "Netease Music": "AsianTV",
            "Tencent Video": "AsianTV",
            "Youku": "AsianTV",
            "WeTV": "AsianTV",
            "ABC": "GlobalTV",
            "Abema TV": "GlobalTV",
            "Amazon": "GlobalTV",
            "Apple News": "GlobalTV",
            "Apple TV": "GlobalTV",
            "Bahamut": "Bahamut",
            "BBC iPlayer": "GlobalTV",
            "DAZN": "GlobalTV",
            "Discovery Plus": "GlobalTV",
            "encoreTVB": "GlobalTV",
            "Fox Now": "GlobalTV",
            "Fox+": "GlobalTV",
            "HBO": "HBO",
            "Hulu Japan": "GlobalTV",
            "Hulu": "GlobalTV",
            "Japonx": "GlobalTV",
            "JOOX": "GlobalTV",
            "KKBOX": "GlobalTV",
            "KKTV": "GlobalTV",
            "Line TV": "GlobalTV",
            "myTV SUPER": "GlobalTV",
            "Pandora": "GlobalTV",
            "PBS": "GlobalTV",
            "Pornhub": "Pornhub",
            "Soundcloud": "GlobalTV",
            "ViuTV": "GlobalTV",
            "Telegram": "Telegram",
            "Steam": "Steam",
            "Speedtest": "Speedtest",
            "PayPal": "PayPal",
            "Microsoft": "Microsoft",
            "PROXY": "Proxy",
            "Apple": "Apple",
            "Scholar": "Scholar",
            "Domestic": "Domestic",
            "Domestic IPs": "Domestic",
            "LAN": "DIRECT"
          }

        port = int(metadata["dst_port"])

        if metadata["network"] == "UDP":
            if port == 443:
                ctx.log('[Script] matched QUIC traffic use reject')
                return "REJECT"

        port_list = [21, 22, 23, 53, 80, 123, 143, 194, 443, 465, 587, 853, 993, 995, 998, 2052, 2053, 2082, 2083, 2086, 2095, 2096, 5222, 5228, 5229, 5230, 8080, 8443, 8880, 8888, 8889]
        if port not in port_list:
            ctx.log('[Script] not common port use direct')
            return "DIRECT"

        if metadata["dst_ip"] == "":
            metadata["dst_ip"] = ctx.resolve_ip(metadata["host"])

        for ruleset in ruleset_action:
            if ctx.rule_providers[ruleset].match(metadata):
                return ruleset_action[ruleset]

        if metadata["dst_ip"] == "":
            return "DIRECT"

        code = ctx.geoip(metadata["dst_ip"])
        if code == "CN":
            ctx.log('[Script] Geoip CN')
            return "Domestic"

        ctx.log('[Script] FINAL')
        return "Others"
tproxy-port: 7895

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

#IPv4 NAT chain

# Generated by iptables-save v1.8.7 on Tue Nov  9 15:46:46 2021
*nat
:PREROUTING ACCEPT [285:229616]
:INPUT ACCEPT [3474:189133]
:OUTPUT ACCEPT [6210:387374]
:POSTROUTING ACCEPT [659:42094]
:MINIUPNPD - [0:0]
:MINIUPNPD-POSTROUTING - [0:0]
:openclash - [0:0]
:openclash_output - [0:0]
:postrouting_lan_rule - [0:0]
:postrouting_rule - [0:0]
:postrouting_wan_rule - [0:0]
:prerouting_lan_rule - [0:0]
:prerouting_rule - [0:0]
:prerouting_wan_rule - [0:0]
:zone_lan_postrouting - [0:0]
:zone_lan_prerouting - [0:0]
:zone_wan_postrouting - [0:0]
:zone_wan_prerouting - [0:0]
-A PREROUTING -d 8.8.4.4/32 -p tcp -m comment --comment "OpenClash Google DNS Hijack" -m tcp --dport 53 -j REDIRECT --to-ports 7892
-A PREROUTING -d 8.8.8.8/32 -p tcp -m comment --comment "OpenClash Google DNS Hijack" -m tcp --dport 53 -j REDIRECT --to-ports 7892
-A PREROUTING -p tcp -m tcp --dport 53 -m comment --comment "DNS Hijack" -j REDIRECT --to-ports 53
-A PREROUTING -p udp -m udp --dport 53 -m comment --comment "DNS Hijack" -j REDIRECT --to-ports 53
-A PREROUTING -p udp -m udp --dport 53 -j REDIRECT --to-ports 53
-A PREROUTING -p tcp -m tcp --dport 53 -j REDIRECT --to-ports 53
-A PREROUTING -m comment --comment "!fw3: Custom prerouting rule chain" -j prerouting_rule
-A PREROUTING -i br-lan -m comment --comment "!fw3" -j zone_lan_prerouting
-A PREROUTING -i pppoe-wan -m comment --comment "!fw3" -j zone_wan_prerouting
-A PREROUTING -i eth0.2 -m comment --comment "!fw3" -j zone_wan_prerouting
-A PREROUTING -p tcp -j openclash
-A OUTPUT -j openclash_output
-A POSTROUTING -m comment --comment "!fw3: Custom postrouting rule chain" -j postrouting_rule
-A POSTROUTING -o br-lan -m comment --comment "!fw3" -j zone_lan_postrouting
-A POSTROUTING -o pppoe-wan -m comment --comment "!fw3" -j zone_wan_postrouting
-A POSTROUTING -o eth0.2 -m comment --comment "!fw3" -j zone_wan_postrouting
-A openclash -p tcp -m tcp --sport 1688 -j RETURN
-A openclash -m set --match-set localnetwork dst -j RETURN
-A openclash -p tcp -j REDIRECT --to-ports 7892
-A openclash_output -p tcp -m tcp --sport 1688 -j RETURN
-A openclash_output -m set --match-set localnetwork dst -j RETURN
-A openclash_output -d 198.18.0.0/16 -p tcp -m owner ! --uid-owner 65534 -j REDIRECT --to-ports 7892
-A openclash_output -p tcp -m owner ! --uid-owner 65534 -j REDIRECT --to-ports 7892
-A zone_lan_postrouting -m comment --comment "!fw3: Custom lan postrouting rule chain" -j postrouting_lan_rule
-A zone_lan_prerouting -m comment --comment "!fw3: Custom lan prerouting rule chain" -j prerouting_lan_rule
-A zone_wan_postrouting -j MINIUPNPD-POSTROUTING
-A zone_wan_postrouting -j MINIUPNPD-POSTROUTING
-A zone_wan_postrouting -m comment --comment "!fw3: Custom wan postrouting rule chain" -j postrouting_wan_rule
-A zone_wan_postrouting -m comment --comment "!fw3" -j FULLCONENAT
-A zone_wan_prerouting -j MINIUPNPD
-A zone_wan_prerouting -j MINIUPNPD
-A zone_wan_prerouting -m comment --comment "!fw3: Custom wan prerouting rule chain" -j prerouting_wan_rule
-A zone_wan_prerouting -m comment --comment "!fw3" -j FULLCONENAT
COMMIT
# Completed on Tue Nov  9 15:46:46 2021

#IPv4 Mangle chain

# Generated by iptables-save v1.8.7 on Tue Nov  9 15:46:46 2021
*mangle
:PREROUTING ACCEPT [74529:9343417]
:INPUT ACCEPT [74348:9514875]
:FORWARD ACCEPT [286:21458]
:OUTPUT ACCEPT [80948:15279303]
:POSTROUTING ACCEPT [81192:15282438]
:openclash - [0:0]
-A PREROUTING -p udp -j openclash
-A FORWARD -o pppoe-wan -p tcp -m tcp --tcp-flags SYN,RST SYN -m comment --comment "!fw3: Zone wan MTU fixing" -j TCPMSS --clamp-mss-to-pmtu
-A FORWARD -i pppoe-wan -p tcp -m tcp --tcp-flags SYN,RST SYN -m comment --comment "!fw3: Zone wan MTU fixing" -j TCPMSS --clamp-mss-to-pmtu
-A FORWARD -o eth0.2 -p tcp -m tcp --tcp-flags SYN,RST SYN -m comment --comment "!fw3: Zone wan MTU fixing" -j TCPMSS --clamp-mss-to-pmtu
-A FORWARD -i eth0.2 -p tcp -m tcp --tcp-flags SYN,RST SYN -m comment --comment "!fw3: Zone wan MTU fixing" -j TCPMSS --clamp-mss-to-pmtu
-A openclash -p udp -m udp --sport 500 -j RETURN
-A openclash -p udp -m udp --sport 68 -j RETURN
-A openclash -m set --match-set localnetwork dst -j RETURN
-A openclash -p udp -m udp --dport 53 -j RETURN
-A openclash -p udp -j TPROXY --on-port 7892 --on-ip 0.0.0.0 --tproxy-mark 0x162/0xffffffff
COMMIT
# Completed on Tue Nov  9 15:46:46 2021

#IPv6 NAT chain

# Generated by ip6tables-save v1.8.7 on Tue Nov  9 15:46:46 2021
*nat
:PREROUTING ACCEPT [145:20428]
:INPUT ACCEPT [459:37792]
:OUTPUT ACCEPT [11:1508]
:POSTROUTING ACCEPT [20:2060]
-A PREROUTING -d 2001:4860:4860::8844/128 -p tcp -m comment --comment "OpenClash Google DNS Hijack" -m tcp --dport 53 -j ACCEPT
-A PREROUTING -d 2001:4860:4860::8888/128 -p tcp -m comment --comment "OpenClash Google DNS Hijack" -m tcp --dport 53 -j ACCEPT
-A PREROUTING -p tcp -m tcp --dport 53 -m comment --comment "DNS Hijack" -j REDIRECT --to-ports 53
-A PREROUTING -p udp -m udp --dport 53 -m comment --comment "DNS Hijack" -j REDIRECT --to-ports 53
-A PREROUTING -p udp -m udp --dport 53 -j REDIRECT --to-ports 53
-A PREROUTING -p tcp -m tcp --dport 53 -j REDIRECT --to-ports 53
COMMIT
# Completed on Tue Nov  9 15:46:46 2021

#IPv6 Mangle chain

# Generated by ip6tables-save v1.8.7 on Tue Nov  9 15:46:46 2021
*mangle
:PREROUTING ACCEPT [1130:104845]
:INPUT ACCEPT [2003:198061]
:FORWARD ACCEPT [37:3952]
:OUTPUT ACCEPT [2156:156973]
:POSTROUTING ACCEPT [2137:155893]
:openclash - [0:0]
:openclash_output - [0:0]
-A PREROUTING -j openclash
-A FORWARD -o pppoe-wan -p tcp -m tcp --tcp-flags SYN,RST SYN -m comment --comment "!fw3: Zone wan MTU fixing" -j TCPMSS --clamp-mss-to-pmtu
-A FORWARD -i pppoe-wan -p tcp -m tcp --tcp-flags SYN,RST SYN -m comment --comment "!fw3: Zone wan MTU fixing" -j TCPMSS --clamp-mss-to-pmtu
-A FORWARD -o eth0.2 -p tcp -m tcp --tcp-flags SYN,RST SYN -m comment --comment "!fw3: Zone wan MTU fixing" -j TCPMSS --clamp-mss-to-pmtu
-A FORWARD -i eth0.2 -p tcp -m tcp --tcp-flags SYN,RST SYN -m comment --comment "!fw3: Zone wan MTU fixing" -j TCPMSS --clamp-mss-to-pmtu
-A OUTPUT -j openclash_output
-A openclash -p tcp -m tcp --sport 1688 -j RETURN
-A openclash -p udp -m udp --sport 500 -j RETURN
-A openclash -s fc00::/6 -p udp -m udp --sport 546 -j RETURN
-A openclash -m set --match-set localnetwork6 dst -j RETURN
-A openclash -p tcp -m comment --comment OpenClash -j TPROXY --on-port 7895 --on-ip :: --tproxy-mark 0x162/0xffffffff
-A openclash -p udp -m comment --comment OpenClash -j TPROXY --on-port 7895 --on-ip :: --tproxy-mark 0x162/0xffffffff
-A openclash_output -p tcp -m tcp --sport 1688 -j RETURN
-A openclash_output -p udp -m udp --sport 500 -j RETURN
-A openclash_output -p udp -m udp --sport 546 -j RETURN
-A openclash_output -m set --match-set localnetwork6 dst -j RETURN
-A openclash_output -p tcp -m owner ! --uid-owner 65534 -j MARK --set-xmark 0x162/0xffffffff
-A openclash_output -p udp -m owner ! --uid-owner 65534 -j MARK --set-xmark 0x162/0xffffffff
COMMIT
# Completed on Tue Nov  9 15:46:46 2021

#===================== IPSET状态 =====================#

Name: music
Name: china_ip_route
Name: localnetwork
Name: china_ip6_route
Name: localnetwork6

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

#route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         100.71.128.1    0.0.0.0         UG    0      0        0 pppoe-wan
100.71.128.1    0.0.0.0         255.255.255.255 UH    0      0        0 pppoe-wan
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 br-lan
#ip route list
default via 100.71.128.1 dev pppoe-wan proto static 
100.71.128.1 dev pppoe-wan proto kernel scope link src 100.71.228.71 
192.168.1.0/24 dev br-lan proto kernel scope link src 192.168.1.1 
#ip rule show
0:  from all lookup local
32765:  from all fwmark 0x162 lookup 354
32766:  from all lookup main
32767:  from all lookup default

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

tcp        0      0 :::7890                 :::*                    LISTEN      30316/clash
tcp        0      0 :::7891                 :::*                    LISTEN      30316/clash
tcp        9      0 :::7892                 :::*                    LISTEN      30316/clash
tcp        0      0 :::7893                 :::*                    LISTEN      30316/clash
tcp        0      0 :::7895                 :::*                    LISTEN      30316/clash
tcp        0      0 :::9090                 :::*                    LISTEN      30316/clash
udp     1408      0 :::7874                 :::*                                30316/clash
udp        0      0 :::7891                 :::*                                30316/clash
udp        0      0 :::7892                 :::*                                30316/clash
udp        0      0 :::7893                 :::*                                30316/clash
udp        0      0 :::7895                 :::*                                30316/clash

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

Server:     ::1
Address:    [::1]:53

Name:   www.baidu.com
Address: 198.18.0.47

*** Can't find www.baidu.com: No answer

#===================== resolv.conf.d =====================#

# Interface wan
nameserver 222.246.129.80
nameserver 59.51.78.210
# Interface wan_6
nameserver 240e:50:5000::80
nameserver 240e:50:c800::210

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

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

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

time="2021-11-09T07:44:55Z" level=debug msg="[DNS] www.google.ru --> 172.217.14.99"
time="2021-11-09T07:45:02Z" level=debug msg="[Rule] find process name Process error: protocol not supported"
time="2021-11-09T07:45:02Z" level=debug msg="[Rule] find process name Process error: protocol not supported"
time="2021-11-09T07:44:55Z" level=debug msg="[Rule] find process name Process error: protocol not supported"
time="2021-11-09T07:44:55Z" level=debug msg="[Rule] find process name Process error: protocol not supported"
time="2021-11-09T07:44:56Z" level=debug msg="[Rule] find process name Process error: protocol not supported"
time="2021-11-09T07:44:55Z" level=debug msg="[Rule] find process name Process error: protocol not supported"
time="2021-11-09T07:44:56Z" level=debug msg="[DNS] firebaseremoteconfig.googleapis.com --> 172.217.4.170"
time="2021-11-09T07:44:56Z" level=debug msg="[DNS] resolve api-ipv4.ip.sb error: couldn't find ip"
time="2021-11-09T07:44:56Z" level=debug msg="[DNS] resolve api.ipify.org error: couldn't find ip"
time="2021-11-09T07:44:56Z" level=debug msg="[Rule] find process name Process error: protocol not supported"
time="2021-11-09T07:44:56Z" level=debug msg="[Rule] find process name Process error: protocol not supported"
time="2021-11-09T07:44:56Z" level=debug msg="[Rule] find process name Process error: protocol not supported"
time="2021-11-09T07:44:56Z" level=debug msg="[Rule] find process name Process error: protocol not supported"
time="2021-11-09T07:44:56Z" level=debug msg="[DNS] www.google.ru --> 172.217.14.99"
time="2021-11-09T07:44:56Z" level=debug msg="[DNS] reserve-5a846.firebaseio.com --> 35.201.97.85"
time="2021-11-09T07:44:56Z" level=debug msg="[DNS] firestore.googleapis.com --> 142.250.68.42"
time="2021-11-09T07:44:56Z" level=debug msg="[DNS] www.google.ru --> 172.217.14.99"
time="2021-11-09T07:44:56Z" level=debug msg="[DNS] www.google.ru --> 172.217.14.99"
time="2021-11-09T07:44:56Z" level=debug msg="[DNS] google.ru --> 142.250.72.131"
time="2021-11-09T07:44:56Z" level=debug msg="[DNS] google.ru --> 142.250.72.131"
time="2021-11-09T07:44:56Z" level=debug msg="[Rule] find process name Process error: protocol not supported"
time="2021-11-09T07:44:56Z" level=debug msg="[Rule] find process name Process error: protocol not supported"
time="2021-11-09T07:44:56Z" level=debug msg="[Rule] find process name Process error: protocol not supported"
time="2021-11-09T07:44:56Z" level=info msg="[TCP] 192.168.1.149:55312 --> 149.154.167.92:443 match RuleSet(Telegram) using Telegram[104.255.65.83]"
time="2021-11-09T07:45:02Z" level=debug msg="[Rule] find process name Process error: protocol not supported"
time="2021-11-09T07:44:56Z" level=debug msg="[DNS] firebaseremoteconfig.googleapis.com --> 172.217.4.170"
time="2021-11-09T07:45:02Z" level=debug msg="[Rule] find process name Process error: protocol not supported"
time="2021-11-09T07:45:02Z" level=debug msg="[Rule] find process name Process error: protocol not supported"
time="2021-11-09T07:45:02Z" level=debug msg="[Rule] find process name Process error: protocol not supported"
time="2021-11-09T07:45:02Z" level=debug msg="[Rule] find process name Process error: protocol not supported"
time="2021-11-09T07:45:02Z" level=debug msg="[Rule] find process name Process error: protocol not supported"
time="2021-11-09T07:45:02Z" level=debug msg="[Rule] find process name Process error: protocol not supported"
time="2021-11-09T07:45:02Z" level=debug msg="[Rule] find process name Process error: protocol not supported"
time="2021-11-09T07:45:02Z" level=debug msg="[Rule] find process name Process error: protocol not supported"
time="2021-11-09T07:45:02Z" level=debug msg="[Rule] find process name Process error: protocol not supported"
time="2021-11-09T07:45:02Z" level=debug msg="[Rule] find process name Process error: protocol not supported"
time="2021-11-09T07:45:02Z" level=debug msg="[Rule] find process name Process error: protocol not supported"
time="2021-11-09T07:45:02Z" level=debug msg="[Rule] find process name Process error: protocol not supported"
time="2021-11-09T07:45:02Z" level=debug msg="[Rule] find process name Process error: protocol not supported"
time="2021-11-09T07:45:02Z" level=debug msg="[Rule] find process name Process error: protocol not supported"
time="2021-11-09T07:45:02Z" level=debug msg="[Rule] find process name Process error: protocol not supported"
time="2021-11-09T07:45:02Z" level=debug msg="[Rule] find process name Process error: protocol not supported"
time="2021-11-09T07:45:02Z" level=debug msg="[Rule] find process name Process error: protocol not supported"
time="2021-11-09T07:45:02Z" level=debug msg="[Rule] find process name Process error: protocol not supported"
time="2021-11-09T07:45:02Z" level=debug msg="[Rule] find process name Process error: protocol not supported"
time="2021-11-09T07:45:02Z" level=debug msg="[Rule] find process name Process error: protocol not supported"
time="2021-11-09T07:44:55Z" level=debug msg="[Rule] find process name Process error: protocol not supported"
time="2021-11-09T07:44:56Z" level=debug msg="[DNS] google.ru --> 142.250.72.131"
time="2021-11-09T07:44:56Z" level=debug msg="[DNS] firebaseremoteconfig.googleapis.com --> 172.217.4.170"

#===================== 活动连接信息 =====================#
ghost commented 2 years ago

另外,日志中的level=debug msg="[Rule] find process name Process error: protocol not supported"是什么意思?

vernesong commented 2 years ago

TG都是IP链接不会有什么影响,你看看异常的时候是什么连接日志

matthuo333 commented 2 years ago

今天也出现类似问题。不定时出现间隔为30s 到 1分钟的所有节点失效情况。试图打开内核日志,但是并不起作用。

caliban511 commented 2 years ago

关掉IPv6相关后会好些的。

matthuo333 commented 2 years ago

在上游路由器中关ipv6? 如果检测是否关了ipv6?

ghost commented 2 years ago

关掉IPv6相关后会好些的。

并没有

github-actions[bot] commented 2 years ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 5 days

ghost commented 2 years ago

问题仍未解决

fengyang0317 commented 2 years ago

@perriernical 请问你的IP-CIDR6 rule生效了吗?我这写IP-CIDR6的rule,clash启动几分钟之后就失效了。 而且能访问的几分钟里,只能通过地址访问,用域名也访问不了。

github-actions[bot] commented 2 years ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 5 days

ghost commented 2 years ago

bump

github-actions[bot] commented 2 years ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 5 days