taamarin / box_for_magisk

Transparent Proxy for Android(root)
GNU General Public License v3.0
1.01k stars 111 forks source link

[bug汇报] 启动后手机异常耗电 #55

Closed btaskel closed 3 months ago

btaskel commented 8 months ago

miui 13.0.14 (kernelSU) 说实话我不知道是不是miui问题 无论在流量还是wifi下耗电均是客户端的数倍甚至数十倍,且这个情况在box4中也存在

1.已分应用代理所需应用。 2.确定是使用该模块产生的耗电量(已排除产生大量数据传输导致的耗电,在使用例如nekobox客户端时没有这么大的耗电)。 3.已尝试关闭ipv6。 4.使用sing-box和xray内核均有此情况。 5.已尝试切换小核来运行sing-box。

入站设置:

"inbounds": [ { "type": "tproxy", "tag": "tproxy-in", "listen": "::", "listen_port": 9898, "sniff": true, "sniff_override_destination": false } ],

路由设置:

"route": { "auto_detect_interface": false, "rules": [ { "outbound": "dns-out", "port": [ 53 ] }, { "domain_suffix": [ "api.installer.xiaomi.com", "appcenter.ms", "app-measurement.com", "firebase.io", "crashlytics.com", "google-analytics.com" ], "outbound": "block" }, { "domain_suffix": [ "googleapis.cn" ], "outbound": "proxy" }, { "geosite": [ "cn" ], "outbound": "bypass" }, { "geoip": [ "cn" ], "outbound": "bypass" }, { "geoip": [ "private" ], "outbound": "bypass" }, { "ip_cidr": [ "224.0.0.0/3", "ff00::/8" ], "outbound": "block", "source_ip_cidr": [ "224.0.0.0/3", "ff00::/8" ] } ] } 6fa6e79ff32151df206e3dac51c60e9f

tearmoon commented 8 months ago

sing-box_fakeip_client_config.json

尝试使用这个例子。

btaskel commented 8 months ago

sing-box_fakeip_client_config.json

尝试使用这个例子。

仍然存在此问题,极短的时间内就增加了大量耗电量

btaskel commented 8 months ago

sing-box_fakeip_client_config.json

尝试使用这个例子。

Asia/Hong_Kong 中国移动,中国电信 / LTE,LTE Mon Oct 23 22:16:15 HKT 2023 version=v1.4.0

10:16 pm [Info]: Good day 🐱 10:16 pm [Info]: Using kernel in /data/adb/box/bin/sing-box. 10:16 pm [Info]: sing-box version 1.6.0-beta.1

Environment: go1.21.2 android/arm64 Tags: with_gvisor,with_quic,with_dhcp,with_wireguard,with_ech,with_utls,with_clash_api Revision: bc4545f2ef41745e5f90c6899e5026845e440f82 CGO: enabled 10:16 pm [Info]: deleting and backup logs 10:16 pm [Info]: crontab disabled. 10:16 pm [Info]: client-list: [ sing-box ] 10:16 pm [Info]: choose: sing-box, start the service. 10:16 pm [Info]: config /data/adb/box/sing-box/config.json 10:16 pm [Debug]: yq file not found, start to download from github 10:16 pm [Debug]: Download https://github.com/taamarin/yq/releases/download/prerelease/yq_android_arm64 10:16 pm [Error]: Download busybox wget --no-check-certificate --user-agent box_for_root -O /data/adb/box/bin/yq https://github.com/taamarin/yq/releases/download/prerelease/yq_android_arm64 failed 10:16 pm [Info]: type [Tproxy] already exists in /data/adb/box/sing-box/config.json 10:16 pm [Info]: sing-box cgroup_memcg: false 10:16 pm [Info]: sing-box cgroup_cpuset: false 10:16 pm [Info]: sing-box cgroup_blkio: false 10:16 pm [Info]: sing-box skipped port detection. 10:16 pm [Info]: sing-box service is running. 10:16 pm [Info]: ProxyMode: whitelist, NetworkMode: tproxy 10:16 pm [Info]: sing-box has started with the 'root:net_admin' user group. 10:16 pm [Info]: sing-box status: S (sleeping) (PID: 2745) 10:16 pm [Info]: sing-box memory usage: 90 MB, swap: 0 KB 10:16 pm [Info]: sing-box CPU usage: 87.0% 10:16 pm [Info]: sing-box list of allowed CPUs : 0-3 10:16 pm [Info]: sing-box Which CPU running on : 3 10:16 pm [Info]: battery temperature: 33°C 10:16 pm [Info]: sing-box running time: 0:05 10:16 pm [Debug]: fakeip inet(v4/v6)_range: 198.18.0.0/15, fc00::/18 10:16 pm [Info]: Using Tproxy: tcp + udp. 10:16 pm [Info]: Creating iptables transparent proxy rules. 10:16 pm [Info]: ap+ transparent proxy. 10:16 pm [Info]: rndis+ ignore transparent proxy. 10:16 pm [Info]: proxy-mode: whitelist, package com.foxdebug.acodefree com.google.android.webview com.microsoft.bing com.github.android com.google.android.googlequicksearchbox com.google.android.partnersetup com.android.vending com.google.android.gms com.google.android.gsf com.google.android.apps.photos ceui.lisa.pixiv ch.protonmail.android com.google.android.tts com.dubox.drive com.termux com.twitter.android mark.via com.google.android.youtube org.telegram.messenger moe.tarsin.ehviewer org.mozilla.firefox_beta transparent proxy. 10:16 pm [Info]: Creating iptables transparent proxy rules done. 10:16 pm [Warning]: Disabling IPv6. 10:16 pm [Warning]: tproxy_port: 9898 out of sync with config 10:16 pm [Info]: sing-box connected. 10:23 pm [Warning]: Cleaning up iptables transparent proxy rules. 10:23 pm [Warning]: Cleaning up iptables transparent proxy rules done. 10:23 pm [Warning]: sing-box shutting down, service is stopped. 10:23 pm [Warning]: sing-box disconnected.

BaicaiD commented 3 months ago

我记得我在使用ipv6时,要是连接wifi就出现这情况,就疯狂跑占用cpu和网络资源,使用流量没问题。现在我换了规则集什么的,你要不试试我的,我现在一切正常ipv6也可以正常使用。https://github.com/BaicaiD/sing-box-subscribe/blob/main/config_template/config_android.json