morytyann / OpenWrt-mihomo

Transparent Proxy with Mihomo on OpenWrt.
MIT License
1.41k stars 150 forks source link

[BUG]首次启动拉取的分流规则不完整 #225

Closed Yuko1997 closed 1 month ago

Yuko1997 commented 1 month ago

自查

确认

系统

OpenWrt

系统版本

ImmortalWrt 23.05.4

插件版本

1.8.5-1

硬件架构

x86_64

BUG 描述

第一次启动时拉取的分流规则不完整

预期行为

完整的配置文件

复现步骤

使用的订阅转换服务为https://nexconvert.com 订阅转换配置为https://github.com/Yuko1997/MyClashConfig/blob/main/Custom.ini 重启设备,或第一次启动插件时,获取的分流规则会丢失一部分,重载或重启服务后即可完整获取

部分分流规则丢失(以这个处于配置尾部的udp为参考) 1 5

重载后完整获取两万行 full

少见情况,拉下来空配置,重启又好了 null

插件配置

mihomo.status=status mihomo.config=config mihomo.config.enabled='1' mihomo.config.scheduled_restart='0' mihomo.config.cron_expression='0 3 *' mihomo.config.profile='subscription:subscription' mihomo.config.mixin='1' mihomo.config.test_profile='1' mihomo.config.fast_reload='0' mihomo.proxy=proxy mihomo.proxy.transparent_proxy='1' mihomo.proxy.tcp_transparent_proxy_mode='tproxy' mihomo.proxy.udp_transparent_proxy_mode='tproxy' mihomo.proxy.ipv4_dns_hijack='0' mihomo.proxy.ipv6_dns_hijack='0' mihomo.proxy.ipv4_proxy='1' mihomo.proxy.ipv6_proxy='0' mihomo.proxy.router_proxy='0' mihomo.proxy.lan_proxy='1' mihomo.proxy.access_control_mode='allow' mihomo.proxy.bypass_china_mainland_ip='0' mihomo.proxy.acl_tcp_dport='0-65535' mihomo.proxy.acl_udp_dport='0-65535' mihomo.proxy.acl_ip='192.168.7.102' '192.168.7.103' mihomo.subscription=subscription mihomo.subscription.name='test123' mihomo.subscription.url='https://api.nexconvert.com/sub?target=clash&url=' mihomo.subscription.user_agent='clash' mihomo.mixin=mixin mihomo.mixin.log_level='info' mihomo.mixin.mode='rule' mihomo.mixin.match_process='off' mihomo.mixin.ipv6='0' mihomo.mixin.tcp_keep_alive_idle='1800' mihomo.mixin.tcp_keep_alive_interval='15' mihomo.mixin.ui_name='metacubexd' mihomo.mixin.ui_url='https://mirror.ghproxy.com/https://github.com/MetaCubeX/Yacd-meta/archive/refs/heads/gh-pages.zip' mihomo.mixin.api_port='30075' mihomo.mixin.selection_cache='1' mihomo.mixin.allow_lan='1' mihomo.mixin.http_port='8080' mihomo.mixin.socks_port='1080' mihomo.mixin.mixed_port='38157' mihomo.mixin.redir_port='23481' mihomo.mixin.tproxy_port='62001' mihomo.mixin.authentication='0' mihomo.mixin.tun_stack='system' mihomo.mixin.tun_mtu='9000' mihomo.mixin.tun_gso='1' mihomo.mixin.tun_gso_max_size='65536' mihomo.mixin.tun_endpoint_independent_nat='0' mihomo.mixin.dns_port='1053' mihomo.mixin.dns_mode='redir-host' mihomo.mixin.fake_ip_range='198.18.0.1/16' mihomo.mixin.fake_ip_filter='0' mihomo.mixin.fake_ip_filters='+.lan' '+.local' mihomo.mixin.fake_ip_cache='1' mihomo.mixin.dns_respect_rules='0' mihomo.mixin.dns_doh_prefer_http3='1' mihomo.mixin.dns_ipv6='0' mihomo.mixin.dns_system_hosts='0' mihomo.mixin.dns_hosts='0' mihomo.mixin.hosts='0' mihomo.mixin.dns_nameserver='1' mihomo.mixin.dns_nameserver_policy='0' mihomo.mixin.geoip_format='dat' mihomo.mixin.geodata_loader='standard' mihomo.mixin.geosite_url='https://mirror.ghproxy.com/https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/geosite.dat' mihomo.mixin.geoip_mmdb_url='https://mirror.ghproxy.com/https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/geoip-lite.metadb' mihomo.mixin.geoip_dat_url='https://mirror.ghproxy.com/https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/geoip-lite.dat' mihomo.mixin.geoip_asn_url='https://mirror.ghproxy.com/https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/GeoLite2-ASN.mmdb' mihomo.mixin.geox_auto_update='1' mihomo.mixin.geox_update_interval='24' mihomo.mixin.api_secret='188861' mihomo.@authentication[0]=authentication mihomo.@authentication[0].enabled='0' mihomo.@authentication[0].username='mihomo' mihomo.@authentication[0].password='188861' mihomo.@host[0]=host mihomo.@host[0].enabled='0' mihomo.@host[0].domain_name='localhost' mihomo.@host[0].ip='127.0.0.1' '::1' mihomo.@nameserver[0]=nameserver mihomo.@nameserver[0].enabled='1' mihomo.@nameserver[0].type='default-nameserver' mihomo.@nameserver[0].nameserver='127.0.0.1:5338' mihomo.@nameserver[1]=nameserver mihomo.@nameserver[1].enabled='0' mihomo.@nameserver[1].type='proxy-server-nameserver' mihomo.@nameserver[1].nameserver='https://dns.alidns.com/dns-query' 'https://doh.pub/dns-query' mihomo.@nameserver[2]=nameserver mihomo.@nameserver[2].enabled='0' mihomo.@nameserver[2].type='nameserver' mihomo.@nameserver[2].nameserver='https://dns.alidns.com/dns-query' 'https://doh.pub/dns-query' mihomo.@nameserver[3]=nameserver mihomo.@nameserver[3].enabled='0' mihomo.@nameserver[3].type='fallback' mihomo.@nameserver[3].nameserver='https://dns.cloudflare.com/dns-query' 'https://dns.google/dns-query' mihomo.@nameserver_policy[0]=nameserver_policy mihomo.@nameserver_policy[0].enabled='1' mihomo.@nameserver_policy[0].matcher='geosite:cn,private' mihomo.@nameserver_policy[0].nameserver='https://dns.alidns.com/dns-query' 'https://doh.pub/dns-query' mihomo.@nameserver_policy[1]=nameserver_policy mihomo.@nameserver_policy[1].enabled='1' mihomo.@nameserver_policy[1].matcher='geosite:geolocation-!cn' mihomo.@nameserver_policy[1].nameserver='https://dns.cloudflare.com/dns-query' 'https://dns.google/dns-query' mihomo.editor=editor mihomo.log=log

配置文件

第一次启动拉取 config.txt 重载后完整配置 config.txt

插件日志

[2024-10-08 23:49:11] App is enabled. [2024-10-08 23:49:11] Starting... [2024-10-08 23:49:18] Use Subscription: TKV [2024-10-08 23:49:18] Mixin is enabled, mixin all config. [2024-10-08 23:49:21] Profile testing... [2024-10-08 23:49:23] Profile test passed! [2024-10-08 23:49:23] Start Core [2024-10-08 23:49:23] Transparent Proxy is enabled. [2024-10-08 23:49:23] Transparent Proxy: Start. [2024-10-08 23:49:23] Transparent Proxy: IPv4 Proxy is enabled, set proxy for IPv4 traffic. [2024-10-08 23:49:23] Transparent Proxy: Destination TCP Port to Proxy: 0-65535. [2024-10-08 23:49:23] Transparent Proxy: Destination UDP Port to Proxy: 0-65535. [2024-10-08 23:49:23] Transparent Proxy: Lan Proxy is enabled, set proxy for lan. [2024-10-08 23:49:23] Transparent Proxy: Access Control is using allow mode, set proxy for client which is in acl. [2024-10-08 23:49:23] Start Successful!

核心日志

time="2024-10-08T23:49:21.888725999+08:00" level=info msg="Start initial configuration in progress" time="2024-10-08T23:49:21.896100459+08:00" level=info msg="Geodata Loader mode: standard" time="2024-10-08T23:49:21.896158719+08:00" level=info msg="Geosite Matcher implementation: succinct" time="2024-10-08T23:49:21.99418612+08:00" level=info msg="Load GeoSite rule: cn" time="2024-10-08T23:49:23.489412226+08:00" level=info msg="Finished initial GeoSite rule CN => DIRECT, records: 92350" time="2024-10-08T23:49:23.489632666+08:00" level=info msg="Load GeoIP rule: cn" time="2024-10-08T23:49:23.50584112+08:00" level=info msg="Finished initial GeoIP rule cn => DIRECT, records: 7459" time="2024-10-08T23:49:23.506050467+08:00" level=info msg="Initial configuration complete, total time: 1617ms" configuration file /etc/mihomo/run/config.yaml test is successful time="2024-10-08T23:49:24.107106504+08:00" level=info msg="Start initial configuration in progress" time="2024-10-08T23:49:24.114015941+08:00" level=info msg="Geodata Loader mode: standard" time="2024-10-08T23:49:24.114072206+08:00" level=info msg="Geosite Matcher implementation: succinct" time="2024-10-08T23:49:24.16287934+08:00" level=info msg="Load GeoSite rule: cn" time="2024-10-08T23:49:25.735289929+08:00" level=info msg="Finished initial GeoSite rule CN => DIRECT, records: 92350" time="2024-10-08T23:49:25.735521657+08:00" level=info msg="Load GeoIP rule: cn" time="2024-10-08T23:49:25.751658936+08:00" level=info msg="Finished initial GeoIP rule cn => DIRECT, records: 7459" time="2024-10-08T23:49:25.751858833+08:00" level=info msg="Initial configuration complete, total time: 1644ms" time="2024-10-08T23:49:25.752749585+08:00" level=info msg="RESTful API listening at: [::]:30075" time="2024-10-08T23:49:25.779573434+08:00" level=info msg="Sniffer is loaded and working" time="2024-10-08T23:49:25.779631334+08:00" level=info msg="Use tcp concurrent" time="2024-10-08T23:49:25.779834584+08:00" level=info msg="DNS server listening at: [::]:1053" time="2024-10-08T23:49:25.780079361+08:00" level=info msg="HTTP proxy listening at: [::]:8080" time="2024-10-08T23:49:25.780436496+08:00" level=info msg="SOCKS proxy listening at: [::]:1080" time="2024-10-08T23:49:25.780741026+08:00" level=info msg="Redirect proxy listening at: [::]:23481" time="2024-10-08T23:49:25.781180428+08:00" level=info msg="TProxy server listening at: [::]:62001" time="2024-10-08T23:49:25.781391763+08:00" level=info msg="Mixed(http+socks) proxy listening at: [::]:38157" time="2024-10-08T23:49:25.809573778+08:00" level=info msg="Start initial Compatible provider GlobalTV" time="2024-10-08T23:49:25.809685798+08:00" level=info msg="Start initial Compatible provider AI" time="2024-10-08T23:49:25.809809758+08:00" level=info msg="Start initial Compatible provider Telegram" time="2024-10-08T23:49:25.809933463+08:00" level=info msg="Start initial Compatible provider Netflix" time="2024-10-08T23:49:25.810030243+08:00" level=info msg="Start initial Compatible provider Microsoft" time="2024-10-08T23:49:25.810152403+08:00" level=info msg="Start initial Compatible provider Spotify" time="2024-10-08T23:49:25.810251845+08:00" level=info msg="Start initial Compatible provider AdBlock" time="2024-10-08T23:49:25.810358495+08:00" level=info msg="Start initial Compatible provider Apple" time="2024-10-08T23:49:25.810432332+08:00" level=info msg="Start initial Compatible provider Auto - UrlTest" time="2024-10-08T23:49:25.810636115+08:00" level=info msg="Start initial Compatible provider Proxies" time="2024-10-08T23:49:25.810745592+08:00" level=info msg="Start initial Compatible provider Others" time="2024-10-08T23:49:25.811351869+08:00" level=info msg="Start initial Compatible provider IP-Attribution" time="2024-10-08T23:49:25.811839849+08:00" level=info msg="Start initial Compatible provider default" time="2024-10-08T23:49:25.811889349+08:00" level=info msg="Start initial Compatible provider Domestic" time="2024-10-08T23:49:25.811927261+08:00" level=info msg="Start initial Compatible provider Games" time="2024-10-08T23:49:25.811957006+08:00" level=info msg="Start initial Compatible provider AsianTV" time="2024-10-08T23:49:25.812016466+08:00" level=info msg="Start initial Compatible provider Speedtest" time="2024-10-08T23:49:25.812045806+08:00" level=info msg="Start initial Compatible provider Download" time="2024-10-08T23:49:25.812078041+08:00" level=info msg="Start initial Compatible provider Steam" time="2024-10-08T23:49:25.812114228+08:00" level=info msg="Start initial Compatible provider Priority" time="2024-10-08T23:49:25.812294303+08:00" level=info msg="UI already exists, skip downloading" time="2024-10-08T23:49:25.81325203+08:00" level=info msg="[GEO] last update time 2024-10-08 23:34:57.752366701 +0800 CST" time="2024-10-08T23:49:26.013807557+08:00" level=info msg="[TCP] 192.168.7.103:64060 --> nav-edge.smartscreen.microsoft.com:443 match DomainSuffix(microsoft.com) using Microsoft[🇭🇰 Hong Kong 02]"

附加信息

No response

morytyann commented 1 month ago

network,udp,games

你觉得应该有规则数量吗?

Yuko1997 commented 1 month ago

network,udp,games

你觉得应该有规则数量吗?

该条规则处于末尾,当它排在一万五千行时说明前面部分有缺失,在两万一千行时才是完整的,这就是我想表达的意思😓

morytyann commented 1 month ago

嗯,我想成MetaCubeXD面板了,把这个数字当成规则数量了,一会我测试下

morytyann commented 1 month ago

{4A9E574B-3DA8-4FB5-AC0A-DB317EBCB392}

订阅转换后端问题,我直接用curl下载,几乎每次大小都不一样。

morytyann commented 1 month ago

{0931E39B-8704-45E0-995A-B89660E94833}

使用dler的后端测试,可以稳定在869.0K

Yuko1997 commented 1 month ago

{0931E39B-8704-45E0-995A-B89660E94833}

使用dler的后端测试,可以稳定在869.0K

明白了,非常感谢😘